Search & Notebook Tagging - Mct4820 (#5203)

* implement new search and tagging for notebooks
* add example tags, remove inspector reference
* include annotations in mct
* fix performance tests


Co-authored-by: John Hill <john.c.hill@nasa.gov>
Co-authored-by: unlikelyzero <jchill2@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
Scott Bell
2022-06-03 22:12:42 +02:00
committed by GitHub
parent 2aec1ee854
commit 3c70cf1767
57 changed files with 3220 additions and 929 deletions

View File

@@ -22,7 +22,7 @@
<template>
<div
class="c-notebook__entry c-ne has-local-controls"
class="c-notebook__entry c-ne has-local-controls has-tag-applier"
@dragover="changeCursor"
@drop.capture="cancelEditMode"
@drop.prevent="dropOnEntry"
@@ -67,6 +67,13 @@
>
</div>
</template>
<TagEditor
:domain-object="domainObject"
:annotation-query="annotationQuery"
:annotation-type="openmct.annotation.ANNOTATION_TYPES.NOTEBOOK"
:annotation-search-type="openmct.objects.SEARCH_TYPES.NOTEBOOK_ANNOTATIONS"
:target-specific-details="{entryId: entry.id}"
/>
<div class="c-snapshots c-ne__embeds">
<NotebookEmbed
v-for="embed in entry.embeds"
@@ -115,6 +122,7 @@
<script>
import NotebookEmbed from './NotebookEmbed.vue';
import TagEditor from '../../../ui/components/tags/TagEditor.vue';
import TextHighlight from '../../../utils/textHighlight/TextHighlight.vue';
import { createNewEmbed } from '../utils/notebook-entries';
import { saveNotebookImageDomainObject, updateNamespaceOfDomainObject } from '../utils/notebook-image';
@@ -124,7 +132,8 @@ import Moment from 'moment';
export default {
components: {
NotebookEmbed,
TextHighlight
TextHighlight,
TagEditor
},
inject: ['openmct', 'snapshotContainer'],
props: {
@@ -169,6 +178,14 @@ export default {
createdOnDate() {
return this.formatTime(this.entry.createdOn, 'YYYY-MM-DD');
},
annotationQuery() {
const targetKeyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
return {
targetKeyString,
entryId: this.entry.id
};
},
createdOnTime() {
return this.formatTime(this.entry.createdOn, 'HH:mm:ss');
},