Skip to main content

App

Struct App 

Source
pub struct App {
Show 40 fields pub focus: Panel, pub theme: ThemeMode, pub zoomed: bool, pub shapes: Vec<Option<Shape>>, pub user_badge: Option<Shape>, pub error: Option<String>, pub refresh_interval: Duration, pub loading: bool, pub detail: Option<Detail>, pub confirm: Option<Confirm>, pub flash: Option<(String, Instant)>, pub selected: [usize; 7], pub host: Option<String>, pub profiles: Vec<String>, pub profile: Option<String>, pub picker: Option<usize>, pub problems: Option<Problems>, pub upcoming: Option<Upcoming>, pub uc_path: Vec<String>, pub preview: Option<Preview>, pub wh_picker: Option<WhPicker>, pub preview_warehouse: Option<(String, String)>, pub cost: Option<CostView>, pub sql: Option<SqlConsole>, pub hist_search: Option<(String, usize)>, pub run_view: Option<RunView>, pub splash_until: Option<Instant>, pub updated_at: [Option<Instant>; 7], pub filters: [String; 7], pub filter_entry: bool, pub config: Config, pub jump: Option<Jump>, pub pane_order: Vec<usize>, pub hidden: [bool; 7], pub pane_cfg: Option<usize>, pub help: bool, pub help_scroll: u16, pub sql_complete: Option<SqlComplete>, pub secret_scope: Option<String>, pub secret_form: Option<SecretForm>, /* private fields */
}

Fields§

§focus: Panel§theme: ThemeMode§zoomed: bool§shapes: Vec<Option<Shape>>§user_badge: Option<Shape>§error: Option<String>§refresh_interval: Duration§loading: bool§detail: Option<Detail>§confirm: Option<Confirm>§flash: Option<(String, Instant)>§selected: [usize; 7]§host: Option<String>§profiles: Vec<String>

Available profiles from ~/.databrickscfg and the active one.

§profile: Option<String>§picker: Option<usize>

When Some, the workspace picker overlay is open at this index.

§problems: Option<Problems>

When Some, the problems overlay is open.

§upcoming: Option<Upcoming>§uc_path: Vec<String>

Current position in the Unity Catalog tree: [], [catalog] or [catalog, schema].

§preview: Option<Preview>§wh_picker: Option<WhPicker>§preview_warehouse: Option<(String, String)>

Session-remembered (id, name) of the warehouse used for previews.

§cost: Option<CostView>§sql: Option<SqlConsole>§hist_search: Option<(String, usize)>

Ctrl+R incremental search: (query, nth-newest match shown).

§run_view: Option<RunView>§splash_until: Option<Instant>

Splash screen deadline; None once dismissed.

§updated_at: [Option<Instant>; 7]

When each pane last received fresh data — drives the title flash.

§filters: [String; 7]

Per-pane search filter; empty string means no filter.

§filter_entry: bool

True while the user is typing a filter for the focused pane.

§config: Config

Persisted preferences (theme, warehouse per profile).

§jump: Option<Jump>

Ctrl+P fuzzy jump overlay.

§pane_order: Vec<usize>

Canonical pane indices in display order.

§hidden: [bool; 7]

Hidden flag per canonical pane index.

§pane_cfg: Option<usize>

When Some, the pane-arrangement overlay is open at this position.

§help: bool

True while the ? help overlay is open.

§help_scroll: u16

Scroll offset of the help overlay.

§sql_complete: Option<SqlComplete>

Tab-completion popup state for the SQL prompt.

§secret_scope: Option<String>

Drilled-into secret scope; None = the scopes listing.

§secret_form: Option<SecretForm>

Create-scope / add-secret input form.

Implementations§

Source§

impl App

Source

pub fn new(refresh_secs: u64, theme: ThemeMode) -> Self

Source

pub fn visible_panes(&self) -> Vec<usize>

Canonical pane indices currently shown, in display order.

Source

pub fn open_pane_cfg(&mut self)

Source

pub fn pane_cfg_next(&mut self)

Source

pub fn pane_cfg_prev(&mut self)

Source

pub fn pane_cfg_toggle(&mut self)

Space in the overlay: toggles visibility of the selected pane (refusing to hide the last visible one).

Source

pub fn pane_cfg_move(&mut self, delta: i32)

J/K in the overlay: moves the selected pane down/up in the order.

Source

pub fn persist_theme(&mut self)

Remembers the current theme across sessions.

Source

pub fn restore_warehouse_pref(&mut self)

Restores the remembered warehouse for the active profile.

Source

pub fn splash_active(&self) -> bool

Source

pub fn dismiss_splash(&mut self)

Source

pub fn any_fresh(&self) -> bool

True while any pane’s data just landed — keeps the flash decaying.

Source

pub fn open_picker(&mut self)

Source

pub fn picker_next(&mut self)

Source

pub fn picker_prev(&mut self)

Source

pub fn picker_select(&mut self) -> Option<Arc<DatabricksCli>>

Confirms the picker selection; returns the new CLI handle to use.

Source

pub fn open_jump(&mut self)

Source

pub fn jump_matches(&self) -> Vec<(usize, String, String)>

Everything loaded that matches the jump query, best first: (panel index, item name, kind/status label). Substring matches rank above in-order subsequence matches.

Source

pub fn jump_push(&mut self, c: char)

Source

pub fn jump_pop(&mut self)

Source

pub fn jump_next(&mut self)

Source

pub fn jump_prev(&mut self)

Source

pub fn jump_go(&mut self)

Jumps focus and selection to the highlighted match.

Source

pub fn open_problems(&mut self)

Collects everything unhealthy across the loaded panes — items whose status is failed, or whose most recent run failed — then scans every other configured workspace in the background.

Source

pub fn close_problems(&mut self)

Source

pub fn poll_problems(&mut self) -> bool

Source

pub fn problems_next(&mut self)

Source

pub fn problems_prev(&mut self)

Source

pub fn problems_jump(&mut self) -> Option<Arc<DatabricksCli>>

Jumps focus and selection to the highlighted problem’s pane item. A problem in another workspace switches to that workspace instead; the returned CLI handle must then replace the current one.

Source

pub fn open_upcoming(&mut self, cli: &Arc<DatabricksCli>)

u: what runs next — every job with a schedule or trigger, soonest first, fetched fresh so the countdowns are current.

Source

pub fn close_upcoming(&mut self)

Source

pub fn poll_upcoming(&mut self) -> bool

Source

pub fn upcoming_next(&mut self)

Source

pub fn upcoming_prev(&mut self)

Source

pub fn upcoming_jump(&mut self)

Jumps focus and selection to the highlighted job in the Jobs pane.

Source

pub fn fetch_host(&mut self, cli: &Arc<DatabricksCli>)

Resolves the workspace host in the background — auth describe can take seconds when it refreshes tokens, so it must not block the loop.

Source

pub fn poll_host(&mut self)

Source

pub fn selection(&self, idx: usize) -> usize

Selection index for a panel, clamped to the current list length.

Source

pub fn select_next(&mut self)

Source

pub fn select_prev(&mut self)

Source

pub fn filter_start(&mut self)

Opens filter entry for the focused pane, starting from scratch.

Source

pub fn filter_push(&mut self, c: char)

Source

pub fn filter_pop(&mut self)

Source

pub fn filter_accept(&mut self)

Keeps the filter applied and returns keys to normal navigation.

Source

pub fn filter_clear(&mut self)

Source

pub fn active_filter(&self) -> &str

The focused pane’s filter, if any.

Source

pub fn open_detail(&mut self, cli: &Arc<DatabricksCli>)

Source

pub fn uc_drill(&mut self, cli: &Arc<DatabricksCli>) -> bool

Descends one level in the Unity Catalog tree. Returns false when the selection is a leaf (caller should open the detail view instead).

Source

pub fn uc_up(&mut self, cli: &Arc<DatabricksCli>) -> bool

Ascends one level; returns false if already at the catalog root.

Source

pub fn secrets_drill(&mut self, cli: &Arc<DatabricksCli>) -> bool

Enter in the Secrets pane: descend from a scope into its keys. On a key it does nothing — secret values are never displayed — but still returns true so Enter never opens a (bogus) detail view.

Source

pub fn secrets_up(&mut self, cli: &Arc<DatabricksCli>) -> bool

Backspace inside a scope: back to the scopes listing.

Source

pub fn poll_secrets(&mut self) -> bool

Source

pub fn open_secret_form(&mut self)

a in the secrets pane: create a scope (top level) or add a secret (inside a scope).

Source

pub fn secret_form_push(&mut self, c: char)

Source

pub fn secret_form_pop(&mut self)

Source

pub fn secret_form_submit(&mut self, cli: &Arc<DatabricksCli>)

Enter in the form: advance to the value stage, or submit.

Source

pub fn request_secret_delete(&mut self)

x in the secrets pane: delete the selected scope or key.

Source

pub fn resource_name(&self, kind: &str, id: &str) -> Option<String>

Looks up a resource’s display name by id in the loaded panes — lets the cost view show “nightly-etl” instead of a job id.

Source

pub fn warehouses(&self) -> Vec<(String, String, bool)>

All known warehouses as (name, id, running).

Source

pub fn open_preview(&mut self, cli: &Arc<DatabricksCli>, force_pick: bool)

Runs a sample-data query for the selected table or view. With force_pick (or several warehouses and no remembered choice) a warehouse picker opens first.

Source

pub fn open_cost(&mut self, cli: &Arc<DatabricksCli>)

Opens the DBU usage view, resolving a warehouse like previews do.

Source

pub fn open_lineage(&mut self, cli: &Arc<DatabricksCli>)

Opens the lineage view for the selected table/view; needs a warehouse since lineage lives in system tables.

Source

pub fn close_cost(&mut self)

Source

pub fn open_sql(&mut self)

Opens the SQL console. With a table/view selected in the catalog pane, the prompt starts as an editable query against it.

Source

pub fn close_sql(&mut self)

Source

pub fn sql_tab(&mut self, cli: &Arc<DatabricksCli>)

Tab in the SQL prompt: complete catalog / schema / table / column names from the workspace, fetching each level once per session. A repeat press cycles to the next candidate.

Source

pub fn sql_complete_next(&mut self, delta: i32)

Tab / shift+tab with the popup open: cycle candidates.

Source

pub fn sql_complete_cancel(&mut self)

Esc: restore the typed prefix and close the popup.

Source

pub fn sql_complete_accept(&mut self)

Keeps the inserted candidate and closes the popup.

Source

pub fn poll_uc_names(&mut self) -> bool

Caches fetched completion names and fills the waiting popup.

Source

pub fn sql_input(&self) -> Option<String>

The statement currently in the prompt.

Source

pub fn sql_set_input(&mut self, s: &str)

Replaces the prompt contents (after an $EDITOR round-trip).

Source

pub fn hist_search_current(&self) -> Option<&String>

The history entry the active Ctrl+R search currently matches.

Source

pub fn hist_search_start(&mut self)

Source

pub fn hist_search_push(&mut self, c: char)

Source

pub fn hist_search_pop(&mut self)

Source

pub fn hist_search_older(&mut self)

Ctrl+R again: step to the next older match.

Source

pub fn hist_search_accept(&mut self)

Source

pub fn hist_search_cancel(&mut self)

Source

pub fn sql_push(&mut self, c: char)

Source

pub fn sql_pop(&mut self)

Backspace: deletes the character before the caret.

Source

pub fn sql_delete(&mut self)

Delete: removes the character under the caret.

Source

pub fn sql_left(&mut self)

Source

pub fn sql_right(&mut self)

Source

pub fn sql_hist_prev(&mut self)

↑ at the prompt: step back through history, stashing the draft.

Source

pub fn sql_hist_next(&mut self)

↓ at the prompt: step forward, back to the stashed draft at the end.

Source

pub fn sql_home(&mut self)

Source

pub fn sql_end(&mut self)

Source

pub fn sql_scroll(&mut self, delta: i32)

Source

pub fn sql_cols(&mut self, delta: i32)

Shift+←/→ in the console: page result columns.

Source

pub fn sql_run(&mut self, cli: &Arc<DatabricksCli>)

Runs the typed statement, resolving a warehouse like previews do.

Source

pub fn sql_export(&mut self)

Ctrl+S in the console: export the current results.

Source

pub fn preview_h(&mut self, delta: i32)

←/→ in a preview: page columns in the grid, switch rows in record view.

Source

pub fn preview_toggle_record(&mut self)

v/enter in a preview: transposed view of the top visible row.

Source

pub fn preview_filter_start(&mut self)

Source

pub fn preview_filter_push(&mut self, c: char)

Source

pub fn preview_filter_pop(&mut self)

Source

pub fn preview_filter_accept(&mut self)

Source

pub fn preview_filter_clear(&mut self)

Source

pub fn preview_export(&mut self)

e in a table preview: export the sampled rows.

Source

pub fn poll_sql(&mut self) -> bool

Source

pub fn poll_cost(&mut self) -> bool

Source

pub fn wh_picker_next(&mut self)

Source

pub fn wh_picker_prev(&mut self)

Source

pub fn wh_picker_cancel(&mut self)

Source

pub fn wh_picker_select(&mut self, cli: &Arc<DatabricksCli>)

Confirms the warehouse choice, remembers it, and starts the preview.

Source

pub fn close_preview(&mut self)

Source

pub fn poll_preview(&mut self) -> bool

Source

pub fn preview_scroll(&mut self, delta: i32)

Source

pub fn poll_uc(&mut self) -> bool

Source

pub fn open_grants(&mut self, cli: &Arc<DatabricksCli>)

Opens the access view for the selected item: effective UC grants or the workspace object ACL.

Source

pub fn open_run(&mut self, cli: &Arc<DatabricksCli>)

Drills from an open job or pipeline detail into its most recent run/update.

Source

pub fn close_run(&mut self)

Source

pub fn run_nav(&mut self, cli: &Arc<DatabricksCli>, delta: i32)

Moves to an older (delta > 0) or newer (delta < 0) run.

Source

pub fn run_toggle_output(&mut self, cli: &Arc<DatabricksCli>)

o in the run view: toggles the full output/log view, fetching all task outputs on first use.

Source

pub fn request_run_repair(&mut self)

r in the run view: rerun only the failed tasks of the shown run.

Source

pub fn run_toggle_timeline(&mut self)

t in the run view: per-task execution timeline of a job run.

Source

pub fn run_toggle_dag(&mut self)

d in the run view: dependency tree of the run’s tasks.

Source

pub fn run_toggle_grid(&mut self, cli: &Arc<DatabricksCli>)

g in the run view: history grid — every task’s state across the job’s recent runs, with duration trends.

Source

pub fn poll_grid(&mut self) -> bool

Source

pub fn run_toggle_raw(&mut self)

Source

pub fn run_scroll(&mut self, delta: i32)

Source

pub fn poll_run(&mut self, cli: &Arc<DatabricksCli>) -> bool

Applies run fetch results; also re-polls a live run every few seconds so an executing run’s tasks update on their own.

Source

pub fn close_detail(&mut self)

Source

pub fn toggle_raw(&mut self)

Source

pub fn poll_detail(&mut self) -> bool

Applies a finished detail fetch; returns true if the UI should redraw.

Source

pub fn detail_scroll(&mut self, delta: i32)

Source

pub fn request_action(&mut self)

Prepares a contextual action for the selected item, pending confirmation: start/stop for clusters, warehouses and pipelines, run-now for jobs.

Source

pub fn request_schedule_toggle(&mut self, cli: &Arc<DatabricksCli>)

S on the jobs pane: pause or resume the selected job’s schedule, trigger or continuous mode. No confirm — it’s a symmetric toggle, undone by pressing S again.

Source

pub fn request_run_cancel(&mut self)

s in the run view: cancel the shown run/update after a confirm.

Source

pub fn sql_cancel(&mut self, cli: &Arc<DatabricksCli>)

Cancels the in-flight console statement server-side; the polling task then sees CANCELED and surfaces it in the results pane.

Source

pub fn cancel_confirm(&mut self)

Source

pub fn confirm_execute(&mut self, cli: &Arc<DatabricksCli>)

Source

pub fn poll_action(&mut self, cli: &Arc<DatabricksCli>) -> bool

Applies a finished action; refreshes on success. Returns true on change.

Source

pub fn expire_flash(&mut self) -> bool

Drops the flash message once it has been visible long enough.

Source

pub fn open_in_browser(&self)

Opens the selected item (or the open detail view) in the workspace web UI.

Source

pub fn status_counts(&self) -> (usize, usize, usize, usize)

Counts of (ok, pending, failed, idle) items across all panels.

Source

pub fn last_refresh_age(&self) -> Duration

Source

pub fn spinner(&self) -> &'static str

Source

pub fn spinner_frame(&self) -> usize

Source

pub fn busy(&self) -> bool

True whenever any background work is in flight — the loop uses this to keep spinners ticking, not just during panel refreshes.

Source

pub fn tick_spinner(&mut self)

Source

pub fn toggle_zoom(&mut self)

Source

pub fn focus_next(&mut self)

Source

pub fn focus_prev(&mut self)

Source

pub fn needs_refresh(&self) -> bool

Source

pub fn start_refresh(&mut self, cli: &Arc<DatabricksCli>)

Source

pub fn poll_refresh(&mut self) -> bool

Applies any fetch results that have arrived; returns true if the UI should redraw.

Auto Trait Implementations§

§

impl !RefUnwindSafe for App

§

impl !UnwindSafe for App

§

impl Freeze for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.