-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable selecting data sources and blueprints and recordings in them (#…
…5646) ### What * Part of #5645 If you click a recording you will now see what blueprints are in the same data source. You can also select the data source directly to see all recordings and blueprints in it. Selecting a blueprint is now also possible. I also added the size of the store to the selection panel. https://github.com/rerun-io/rerun/assets/1148717/e353339b-56c1-4924-9523-59afea2b5da0 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/5646/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5646/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5646/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5646) - [Docs preview](https://rerun.io/preview/920381f809c2d96122511ff18de54795d7db7bd6/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/920381f809c2d96122511ff18de54795d7db7bd6/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
31 changed files
with
543 additions
and
209 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
use re_log_types::StoreKind; | ||
use re_viewer_context::{UiVerbosity, ViewerContext}; | ||
|
||
use crate::item_ui::entity_db_button_ui; | ||
|
||
impl crate::DataUi for re_smart_channel::SmartChannelSource { | ||
fn data_ui( | ||
&self, | ||
ctx: &ViewerContext<'_>, | ||
ui: &mut egui::Ui, | ||
verbosity: UiVerbosity, | ||
_query: &re_data_store::LatestAtQuery, | ||
_store: &re_data_store::DataStore, | ||
) { | ||
ui.label(self.to_string()); | ||
|
||
if verbosity == UiVerbosity::Small { | ||
return; | ||
} | ||
|
||
// TODO(emilk): show if we're still connected to this data source | ||
|
||
// Find all stores from this data source | ||
// (e.g. find the recordings and blueprint in this .rrd file). | ||
let mut recordings = vec![]; | ||
let mut blueprints = vec![]; | ||
|
||
for other in ctx | ||
.store_context | ||
.bundle | ||
.entity_dbs_from_channel_source(self) | ||
{ | ||
match other.store_kind() { | ||
StoreKind::Recording => { | ||
recordings.push(other); | ||
} | ||
StoreKind::Blueprint => { | ||
blueprints.push(other); | ||
} | ||
} | ||
} | ||
|
||
{ | ||
ui.add_space(8.0); | ||
ui.strong("Recordings in this data source"); | ||
ui.indent("recordings", |ui| { | ||
for entity_db in recordings { | ||
entity_db_button_ui(ctx, ui, entity_db, true); | ||
} | ||
}); | ||
} | ||
|
||
{ | ||
ui.add_space(8.0); | ||
ui.strong("Blueprints in this data source"); | ||
ui.indent("blueprints", |ui| { | ||
for entity_db in blueprints { | ||
entity_db_button_ui(ctx, ui, entity_db, true); | ||
} | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.