mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
chore: upgrade eventemitter to v5.0.2 (#7709)
* chore: upgrade eventemitter to v5.0.2 * fix: pass context to eventHelpers * fix: no need to destroy router as it is destroyed during openmct teardown * fix: register `CreateAction` and retrieve it from the registry * test: fix tests * refactor: import action key consts * fix: update usage. don't use getters Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com> --------- Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
This commit is contained in:
@ -72,11 +72,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { COPY_TO_CLIPBOARD_ACTION_KEY } from '@/plugins/displayLayout/actions/CopyToClipboardAction.js';
|
||||
import { COPY_TO_NOTEBOOK_ACTION_KEY } from '@/plugins/notebook/actions/CopyToNotebookAction.js';
|
||||
import {
|
||||
getDefaultNotebook,
|
||||
getNotebookSectionAndPage
|
||||
} from '@/plugins/notebook/utils/notebook-storage.js';
|
||||
import stalenessMixin from '@/ui/mixins/staleness-mixin';
|
||||
import { VIEW_HISTORICAL_DATA_ACTION_KEY } from '@/ui/preview/ViewHistoricalDataAction.js';
|
||||
|
||||
import tooltipHelpers from '../../../api/tooltips/tooltipMixins.js';
|
||||
import conditionalStylesMixin from '../mixins/objectStyles-mixin.js';
|
||||
@ -84,7 +87,11 @@ import LayoutFrame from './LayoutFrame.vue';
|
||||
|
||||
const DEFAULT_TELEMETRY_DIMENSIONS = [10, 5];
|
||||
const DEFAULT_POSITION = [1, 1];
|
||||
const CONTEXT_MENU_ACTIONS = ['copyToClipboard', 'copyToNotebook', 'viewHistoricalData'];
|
||||
const CONTEXT_MENU_ACTIONS = [
|
||||
COPY_TO_CLIPBOARD_ACTION_KEY,
|
||||
COPY_TO_NOTEBOOK_ACTION_KEY,
|
||||
VIEW_HISTORICAL_DATA_ACTION_KEY
|
||||
];
|
||||
|
||||
export default {
|
||||
makeDefinition(openmct, gridSize, domainObject, position) {
|
||||
@ -381,7 +388,7 @@ export default {
|
||||
|
||||
return CONTEXT_MENU_ACTIONS.map((actionKey) => {
|
||||
const action = this.openmct.actions.getAction(actionKey);
|
||||
if (action.key === 'copyToNotebook') {
|
||||
if (action.key === COPY_TO_NOTEBOOK_ACTION_KEY) {
|
||||
action.name = defaultNotebookName;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user