From 7c54ec4f9f72fa1c4db25d3b4339937582e24d1b Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 23 Oct 2018 11:11:54 -0700 Subject: [PATCH] Tree listens for composition --- src/ui/components/controls/ObjectLabel.vue | 12 ++++- src/ui/components/layout/tree-item.vue | 61 +++++++++++++--------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/src/ui/components/controls/ObjectLabel.vue b/src/ui/components/controls/ObjectLabel.vue index 0b63ffdd80..d95906b70c 100644 --- a/src/ui/components/controls/ObjectLabel.vue +++ b/src/ui/components/controls/ObjectLabel.vue @@ -15,7 +15,17 @@ export default { inject: ['openmct'], props: { 'domainObject': Object, - 'urlLink': String + 'path': Array + }, + computed: { + urlLink() { + if (!this.path) { + return; + } + return '#/browse/' + this.path + .map(o => this.openmct.objects.makeKeyString(o)) + .join('/'); + } }, data() { return { diff --git a/src/ui/components/layout/tree-item.vue b/src/ui/components/layout/tree-item.vue index 9892f4f540..2596bf3398 100644 --- a/src/ui/components/layout/tree-item.vue +++ b/src/ui/components/layout/tree-item.vue @@ -7,7 +7,7 @@ :expanded="expanded" @click="toggleChildren"> - +