Skip to main content

App

Struct App 

Source
pub struct App {
Show 30 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; 6], pub host: Option<String>, pub profiles: Vec<String>, pub profile: Option<String>, pub picker: Option<usize>, pub problems: Option<Problems>, 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>; 6], pub filters: [String; 6], pub filter_entry: bool, pub config: Config, /* 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; 6]§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.

§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>; 6]

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

§filters: [String; 6]

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).

Implementations§

Source§

impl App

Source

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

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_problems(&mut self)

Collects everything unhealthy across the loaded panes: items whose status is failed, or whose most recent run failed.

Source

pub fn problems_next(&mut self)

Source

pub fn problems_prev(&mut self)

Source

pub fn problems_jump(&mut self)

Jumps focus and selection to the highlighted problem’s pane item.

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 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_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_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_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_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 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.