MCPcopy Create free account
hub / github.com/elastic/devfiler / draw_executable_table

Method draw_executable_table

src/ui/tabs/executables.rs:230–280  ·  view source on GitHub ↗
(&mut self, ui: &mut Ui)

Source from the content-addressed store, hash-verified

228 }
229
230 fn draw_executable_table(&mut self, ui: &mut Ui) -> usize {
231 let mut exe_count = 0;
232
233 let table = TableBuilder::new(ui)
234 .striped(true)
235 .resizable(true)
236 .cell_layout(Layout::left_to_right(Align::Center))
237 .column(Column::initial(235.0))
238 .column(Column::initial(290.0))
239 .column(Column::initial(180.0))
240 .column(Column::remainder().clip(true))
241 .max_scroll_height(f32::INFINITY);
242
243 table
244 .header(20.0, |mut header| {
245 for (text, selected_value) in [
246 ("File ID", SortColumn::FileId),
247 ("Build ID", SortColumn::BuildId),
248 ("Symbols", SortColumn::Symbols),
249 ("File Name", SortColumn::FileName),
250 ] {
251 header.col(|ui| {
252 ui.selectable_value(&mut self.sort_field, selected_value, text);
253 });
254 }
255 })
256 .body(|mut body| {
257 let execs = query_executables(&self.filter, &self.sort_field);
258
259 for (file_id, meta) in execs.iter() {
260 exe_count += 1;
261 let name = meta.file_name.as_deref().unwrap_or(NO_NAME);
262
263 body.row(20.0, |mut row| {
264 row.col(|ui| {
265 ui.monospace(file_id.format_hex());
266 });
267 row.col(|ui| {
268 ui.monospace(meta.build_id.as_deref().unwrap_or("<none>"));
269 });
270 row.col(|ui| {
271 ui.label(symb_status_text(meta.symb_status));
272 });
273 row.col(|ui| {
274 ui.label(name);
275 });
276 });
277 }
278 });
279 exe_count
280 }
281}
282
283fn symb_status_text(status: SymbStatus) -> String {

Callers 1

updateMethod · 0.80

Calls 3

query_executablesFunction · 0.85
symb_status_textFunction · 0.85
iterMethod · 0.80

Tested by

no test coverage detected