Compare commits

...

3 Commits

Author SHA1 Message Date
Mandlik, Nikhil K. (ARC-TI)[KBR Wyle Services, LLC]
d67889eba2 add snapshots to large view 2021-02-18 18:03:27 -08:00
Nikhil Mandlik
965ac5d1f8 add snapshotContainer on openmct 2021-02-16 13:24:29 -08:00
Nikhil Mandlik
4494c70727 Search component does not show 'clearInput' button when passed a value to component as props #3661 2021-02-01 14:00:23 -08:00
4 changed files with 39 additions and 6 deletions

View File

@@ -62,6 +62,12 @@ export default {
return defaultNotebookObject;
},
linkToObject() {
return '#/browse/' + this.objectPath
.map(o => o && this.openmct.objects.makeKeyString(o.identifier))
.reverse()
.join('/');
},
async showMenu(event) {
const notebookTypes = [];
const elementBoundingClientRect = this.$el.getBoundingClientRect();
@@ -102,11 +108,10 @@ export default {
|| document.getElementsByClassName('l-shell__main-container')[0];
const bounds = this.openmct.time.bounds();
const objectPath = this.objectPath || this.openmct.router.path;
const link = !this.ignoreLink
? window.location.hash
: null;
const objectPath = this.objectPath || this.openmct.router.path;
: this.linkToObject();
const snapshotMeta = {
bounds,
link,

View File

@@ -87,6 +87,7 @@ export default function NotebookPlugin() {
openmct.types.addType('notebook', notebookType);
const snapshotContainer = new SnapshotContainer(openmct);
openmct.snapshotContainer = snapshotContainer;
const notebookSnapshotIndicator = new Vue ({
provide: {
openmct,

View File

@@ -41,21 +41,29 @@ export default {
this.$listeners,
{
input: function (event) {
vm.$emit('input', event.target.value);
vm.active = (event.target.value.length > 0);
vm.changeInputValue(event.target.value);
}
}
);
}
},
mounted() {
this.changeInputValue(this.value);
},
watch: {
value(inputValue) {
if (!inputValue.length) {
this.clearInput();
} else {
this.changeInputValue(inputValue);
}
}
},
methods: {
changeInputValue(value) {
this.$emit('input', value);
this.active = (value.length > 0);
},
clearInput() {
// Clear the user's input and set 'active' to false
this.$emit('clear', '');

View File

@@ -13,6 +13,12 @@
</div>
</div>
<div class="l-browse-bar__end">
<NotebookMenuSwitcher v-if="notebookEnabled"
:domain-object="domainObject"
:object-path="path"
:ignoreLink="true"
class="c-notebook-snapshot-menubutton"
/>
<view-switcher
:v-if="!hideViewSwitcher"
:views="views"
@@ -39,6 +45,8 @@
<script>
import ViewSwitcher from '../../ui/layout/ViewSwitcher.vue';
import NotebookMenuSwitcher from '@/plugins/notebook/components/NotebookMenuSwitcher.vue';
const HIDDEN_ACTIONS = [
'remove',
'move',
@@ -50,6 +58,7 @@ export default {
'openmct'
],
components: {
NotebookMenuSwitcher,
ViewSwitcher
},
props: {
@@ -88,7 +97,9 @@ export default {
return {
type: this.openmct.types.get(this.domainObject.type),
statusBarItems: [],
menuActionItems: []
menuActionItems: [],
notebookEnabled: this.openmct.types.get('notebook'),
path: []
};
},
watch: {
@@ -106,6 +117,14 @@ export default {
this.actionCollection.on('update', this.updateActionItems);
this.updateActionItems(this.actionCollection.getActionsObject());
}
if (this.notebookEnabled) {
this.openmct.objects
.getOriginalPath(this.domainObject.identifier)
.then(objectPath => {
this.path = objectPath;
});
}
},
methods: {
setView(view) {