mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 23:36:41 +00:00
Merge branch 'master' into mct6555
This commit is contained in:
commit
bd1433db62
1
.github/workflows/e2e-couchdb.yml
vendored
1
.github/workflows/e2e-couchdb.yml
vendored
@ -49,6 +49,7 @@ jobs:
|
|||||||
- name: Run CouchDB Tests and publish to deploysentinel
|
- name: Run CouchDB Tests and publish to deploysentinel
|
||||||
env:
|
env:
|
||||||
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
DEPLOYSENTINEL_API_KEY: ${{ secrets.DEPLOYSENTINEL_API_KEY }}
|
||||||
|
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha }}
|
||||||
run: npm run test:e2e:couchdb
|
run: npm run test:e2e:couchdb
|
||||||
|
|
||||||
- name: Publish Results to Codecov.io
|
- name: Publish Results to Codecov.io
|
||||||
|
@ -29,7 +29,8 @@ relates to how we've extended it (i.e. ./e2e/baseFixtures.js) and assumptions ma
|
|||||||
const { test } = require('../../baseFixtures.js');
|
const { test } = require('../../baseFixtures.js');
|
||||||
|
|
||||||
test.describe('baseFixtures tests', () => {
|
test.describe('baseFixtures tests', () => {
|
||||||
test('Verify that tests fail if console.error is thrown', async ({ page }) => {
|
//Skip this test for now https://github.com/nasa/openmct/issues/6785
|
||||||
|
test.fixme('Verify that tests fail if console.error is thrown', async ({ page }) => {
|
||||||
test.fail();
|
test.fail();
|
||||||
//Go to baseURL
|
//Go to baseURL
|
||||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
@ -26,7 +26,11 @@ necessarily be used for reference when writing new tests in this area.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const { test, expect } = require('../../../../pluginFixtures');
|
const { test, expect } = require('../../../../pluginFixtures');
|
||||||
const { createDomainObjectWithDefaults, selectInspectorTab } = require('../../../../appActions');
|
const {
|
||||||
|
createDomainObjectWithDefaults,
|
||||||
|
selectInspectorTab,
|
||||||
|
waitForPlotsToRender
|
||||||
|
} = require('../../../../appActions');
|
||||||
|
|
||||||
test.describe('Stacked Plot', () => {
|
test.describe('Stacked Plot', () => {
|
||||||
let stackedPlot;
|
let stackedPlot;
|
||||||
@ -227,4 +231,45 @@ test.describe('Stacked Plot', () => {
|
|||||||
page.locator('[aria-label="Plot Series Properties"] .c-object-label')
|
page.locator('[aria-label="Plot Series Properties"] .c-object-label')
|
||||||
).toContainText(swgC.name);
|
).toContainText(swgC.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('the legend toggles between aggregate and per child', async ({ page }) => {
|
||||||
|
await page.goto(stackedPlot.url);
|
||||||
|
|
||||||
|
// Go into edit mode
|
||||||
|
await page.click('button[title="Edit"]');
|
||||||
|
|
||||||
|
await selectInspectorTab(page, 'Config');
|
||||||
|
|
||||||
|
let legendProperties = await page.locator('[aria-label="Legend Properties"]');
|
||||||
|
await legendProperties.locator('[title="Display legends per sub plot."]~div input').uncheck();
|
||||||
|
|
||||||
|
await assertAggregateLegendIsVisible(page);
|
||||||
|
|
||||||
|
// Save (exit edit mode)
|
||||||
|
await page.locator('button[title="Save"]').click();
|
||||||
|
await page.locator('li[title="Save and Finish Editing"]').click();
|
||||||
|
|
||||||
|
await assertAggregateLegendIsVisible(page);
|
||||||
|
|
||||||
|
await page.reload();
|
||||||
|
|
||||||
|
await assertAggregateLegendIsVisible(page);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asserts that aggregate stacked plot legend is visible
|
||||||
|
* @param {import('@playwright/test').Page} page
|
||||||
|
*/
|
||||||
|
async function assertAggregateLegendIsVisible(page) {
|
||||||
|
// Wait for plot series data to load
|
||||||
|
await waitForPlotsToRender(page);
|
||||||
|
// Wait for plot legend to be shown
|
||||||
|
await page.waitForSelector('.js-stacked-plot-legend', { state: 'attached' });
|
||||||
|
// There should be 3 legend items
|
||||||
|
expect(
|
||||||
|
await page
|
||||||
|
.locator('.js-stacked-plot-legend .c-plot-legend__wrapper div.plot-legend-item')
|
||||||
|
.count()
|
||||||
|
).toBe(3);
|
||||||
|
}
|
||||||
|
@ -24,6 +24,7 @@ import CouchDocument from './CouchDocument';
|
|||||||
import CouchObjectQueue from './CouchObjectQueue';
|
import CouchObjectQueue from './CouchObjectQueue';
|
||||||
import { PENDING, CONNECTED, DISCONNECTED, UNKNOWN } from './CouchStatusIndicator';
|
import { PENDING, CONNECTED, DISCONNECTED, UNKNOWN } from './CouchStatusIndicator';
|
||||||
import { isNotebookOrAnnotationType } from '../../notebook/notebook-constants.js';
|
import { isNotebookOrAnnotationType } from '../../notebook/notebook-constants.js';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
const REV = '_rev';
|
const REV = '_rev';
|
||||||
const ID = '_id';
|
const ID = '_id';
|
||||||
@ -42,6 +43,8 @@ class CouchObjectProvider {
|
|||||||
this.batchIds = [];
|
this.batchIds = [];
|
||||||
this.onEventMessage = this.onEventMessage.bind(this);
|
this.onEventMessage = this.onEventMessage.bind(this);
|
||||||
this.onEventError = this.onEventError.bind(this);
|
this.onEventError = this.onEventError.bind(this);
|
||||||
|
this.flushPersistenceQueue = _.debounce(this.flushPersistenceQueue.bind(this));
|
||||||
|
this.persistenceQueue = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -668,9 +671,12 @@ class CouchObjectProvider {
|
|||||||
if (!this.objectQueue[key].pending) {
|
if (!this.objectQueue[key].pending) {
|
||||||
this.objectQueue[key].pending = true;
|
this.objectQueue[key].pending = true;
|
||||||
const queued = this.objectQueue[key].dequeue();
|
const queued = this.objectQueue[key].dequeue();
|
||||||
let document = new CouchDocument(key, queued.model);
|
let couchDocument = new CouchDocument(key, queued.model);
|
||||||
document.metadata.created = Date.now();
|
couchDocument.metadata.created = Date.now();
|
||||||
this.request(key, 'PUT', document)
|
this.#enqueueForPersistence({
|
||||||
|
key,
|
||||||
|
document: couchDocument
|
||||||
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.#checkResponse(response, queued.intermediateResponse, key);
|
this.#checkResponse(response, queued.intermediateResponse, key);
|
||||||
})
|
})
|
||||||
@ -683,6 +689,42 @@ class CouchObjectProvider {
|
|||||||
return intermediateResponse.promise;
|
return intermediateResponse.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#enqueueForPersistence({ key, document }) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.persistenceQueue.push({
|
||||||
|
key,
|
||||||
|
document,
|
||||||
|
resolve,
|
||||||
|
reject
|
||||||
|
});
|
||||||
|
this.flushPersistenceQueue();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async flushPersistenceQueue() {
|
||||||
|
if (this.persistenceQueue.length > 1) {
|
||||||
|
const batch = {
|
||||||
|
docs: this.persistenceQueue.map((queued) => queued.document)
|
||||||
|
};
|
||||||
|
const response = await this.request('_bulk_docs', 'POST', batch);
|
||||||
|
response.forEach((responseMetadatum) => {
|
||||||
|
const queued = this.persistenceQueue.find(
|
||||||
|
(queuedMetadatum) => queuedMetadatum.key === responseMetadatum.id
|
||||||
|
);
|
||||||
|
if (responseMetadatum.ok) {
|
||||||
|
queued.resolve(responseMetadatum);
|
||||||
|
} else {
|
||||||
|
queued.reject(responseMetadatum);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.persistenceQueue.length === 1) {
|
||||||
|
const { key, document, resolve, reject } = this.persistenceQueue[0];
|
||||||
|
|
||||||
|
this.request(key, 'PUT', document).then(resolve).catch(reject);
|
||||||
|
}
|
||||||
|
this.persistenceQueue = [];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
|
@ -243,6 +243,135 @@ describe('the plugin', () => {
|
|||||||
expect(requestMethod).toEqual('GET');
|
expect(requestMethod).toEqual('GET');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('batches persistence', () => {
|
||||||
|
let successfulMockPromise;
|
||||||
|
let partialFailureMockPromise;
|
||||||
|
let objectsToPersist;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
successfulMockPromise = Promise.resolve({
|
||||||
|
json: () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
id: 'object-1',
|
||||||
|
ok: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'object-2',
|
||||||
|
ok: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'object-3',
|
||||||
|
ok: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
partialFailureMockPromise = Promise.resolve({
|
||||||
|
json: () => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
id: 'object-1',
|
||||||
|
ok: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'object-2',
|
||||||
|
ok: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'object-3',
|
||||||
|
ok: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
objectsToPersist = [
|
||||||
|
{
|
||||||
|
identifier: {
|
||||||
|
namespace: '',
|
||||||
|
key: 'object-1'
|
||||||
|
},
|
||||||
|
name: 'object-1',
|
||||||
|
type: 'folder',
|
||||||
|
modified: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
identifier: {
|
||||||
|
namespace: '',
|
||||||
|
key: 'object-2'
|
||||||
|
},
|
||||||
|
name: 'object-2',
|
||||||
|
type: 'folder',
|
||||||
|
modified: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
identifier: {
|
||||||
|
namespace: '',
|
||||||
|
key: 'object-3'
|
||||||
|
},
|
||||||
|
name: 'object-3',
|
||||||
|
type: 'folder',
|
||||||
|
modified: 0
|
||||||
|
}
|
||||||
|
];
|
||||||
|
});
|
||||||
|
it('for multiple simultaneous successful saves', async () => {
|
||||||
|
fetch.and.returnValue(successfulMockPromise);
|
||||||
|
|
||||||
|
await Promise.all(
|
||||||
|
objectsToPersist.map((objectToPersist) => openmct.objects.save(objectToPersist))
|
||||||
|
);
|
||||||
|
|
||||||
|
const requestUrl = fetch.calls.mostRecent().args[0];
|
||||||
|
const requestMethod = fetch.calls.mostRecent().args[1].method;
|
||||||
|
const requestBody = JSON.parse(fetch.calls.mostRecent().args[1].body);
|
||||||
|
|
||||||
|
expect(fetch).toHaveBeenCalledTimes(1);
|
||||||
|
expect(requestUrl.includes('_bulk_docs')).toBeTrue();
|
||||||
|
expect(requestMethod).toEqual('POST');
|
||||||
|
expect(
|
||||||
|
objectsToPersist.every(
|
||||||
|
(object, index) => object.identifier.key === requestBody.docs[index]._id
|
||||||
|
)
|
||||||
|
).toBeTrue();
|
||||||
|
});
|
||||||
|
it('for multiple simultaneous saves with partial failure', async () => {
|
||||||
|
fetch.and.returnValue(partialFailureMockPromise);
|
||||||
|
|
||||||
|
let saveResults = await Promise.all(
|
||||||
|
objectsToPersist.map((objectToPersist) =>
|
||||||
|
openmct.objects
|
||||||
|
.save(objectToPersist)
|
||||||
|
.then(() => true)
|
||||||
|
.catch(() => false)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
expect(saveResults[0]).toBeTrue();
|
||||||
|
expect(saveResults[1]).toBeFalse();
|
||||||
|
expect(saveResults[2]).toBeTrue();
|
||||||
|
});
|
||||||
|
it('except for a single save', async () => {
|
||||||
|
fetch.and.returnValue({
|
||||||
|
json: () => {
|
||||||
|
return {
|
||||||
|
id: 'object-1',
|
||||||
|
ok: true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await openmct.objects.save(objectsToPersist[0]);
|
||||||
|
|
||||||
|
const requestUrl = fetch.calls.mostRecent().args[0];
|
||||||
|
const requestMethod = fetch.calls.mostRecent().args[1].method;
|
||||||
|
|
||||||
|
expect(fetch).toHaveBeenCalledTimes(1);
|
||||||
|
expect(requestUrl.includes('_bulk_docs')).toBeFalse();
|
||||||
|
expect(requestUrl.endsWith('object-1')).toBeTrue();
|
||||||
|
expect(requestMethod).toEqual('PUT');
|
||||||
|
});
|
||||||
|
});
|
||||||
describe('implements server-side search', () => {
|
describe('implements server-side search', () => {
|
||||||
let mockPromise;
|
let mockPromise;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
<mct-chart
|
<mct-chart
|
||||||
:rectangles="rectangles"
|
:rectangles="rectangles"
|
||||||
:highlights="highlights"
|
:highlights="highlights"
|
||||||
|
:show-limit-line-labels="limitLineLabels"
|
||||||
:annotated-points="annotatedPoints"
|
:annotated-points="annotatedPoints"
|
||||||
:annotation-selections="annotationSelections"
|
:annotation-selections="annotationSelections"
|
||||||
:hidden-y-axis-ids="hiddenYAxisIds"
|
:hidden-y-axis-ids="hiddenYAxisIds"
|
||||||
@ -231,7 +232,7 @@ export default {
|
|||||||
limitLineLabels: {
|
limitLineLabels: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorPalette: {
|
colorPalette: {
|
||||||
|
@ -33,18 +33,23 @@
|
|||||||
/>
|
/>
|
||||||
<mct-plot
|
<mct-plot
|
||||||
:class="[plotLegendExpandedStateClass, plotLegendPositionClass]"
|
:class="[plotLegendExpandedStateClass, plotLegendPositionClass]"
|
||||||
:init-grid-lines="gridLines"
|
:init-grid-lines="gridLinesProp"
|
||||||
:init-cursor-guide="cursorGuide"
|
:init-cursor-guide="cursorGuide"
|
||||||
:options="options"
|
:options="options"
|
||||||
:limit-line-labels="limitLineLabels"
|
:limit-line-labels="limitLineLabelsProp"
|
||||||
|
:parent-y-tick-width="parentYTickWidth"
|
||||||
|
:color-palette="colorPalette"
|
||||||
@loadingUpdated="loadingUpdated"
|
@loadingUpdated="loadingUpdated"
|
||||||
@statusUpdated="setStatus"
|
@statusUpdated="setStatus"
|
||||||
@configLoaded="updateReady"
|
@configLoaded="updateReady"
|
||||||
@lockHighlightPoint="lockHighlightPointUpdated"
|
@lockHighlightPoint="lockHighlightPointUpdated"
|
||||||
@highlights="highlightsUpdated"
|
@highlights="highlightsUpdated"
|
||||||
|
@plotYTickWidth="onYTickWidthChange"
|
||||||
|
@cursorGuide="onCursorGuideChange"
|
||||||
|
@gridLines="onGridLinesChange"
|
||||||
>
|
>
|
||||||
<plot-legend
|
<plot-legend
|
||||||
v-if="configReady"
|
v-if="configReady && hideLegend === false"
|
||||||
:cursor-locked="lockHighlightPoint"
|
:cursor-locked="lockHighlightPoint"
|
||||||
:highlights="highlights"
|
:highlights="highlights"
|
||||||
@legendHoverChanged="legendHoverChanged"
|
@legendHoverChanged="legendHoverChanged"
|
||||||
@ -79,14 +84,50 @@ export default {
|
|||||||
compact: false
|
compact: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
gridLines: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cursorGuide: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
parentLimitLineLabels: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
colorPalette: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
parentYTickWidth: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {
|
||||||
|
leftTickWidth: 0,
|
||||||
|
rightTickWidth: 0,
|
||||||
|
hasMultipleLeftAxes: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideLegend: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//Don't think we need this as it appears to be stacked plot specific
|
|
||||||
// hideExportButtons: false
|
|
||||||
cursorGuide: false,
|
|
||||||
gridLines: !this.options.compact,
|
|
||||||
loading: false,
|
loading: false,
|
||||||
status: '',
|
status: '',
|
||||||
staleObjects: [],
|
staleObjects: [],
|
||||||
@ -99,6 +140,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
limitLineLabelsProp() {
|
||||||
|
return this.parentLimitLineLabels ?? this.limitLineLabels;
|
||||||
|
},
|
||||||
|
gridLinesProp() {
|
||||||
|
return this.gridLines ?? !this.options.compact;
|
||||||
|
},
|
||||||
staleClass() {
|
staleClass() {
|
||||||
if (this.staleObjects.length !== 0) {
|
if (this.staleObjects.length !== 0) {
|
||||||
return 'is-stale';
|
return 'is-stale';
|
||||||
@ -117,6 +164,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
gridLines(newGridLines) {
|
||||||
|
this.gridLines = newGridLines;
|
||||||
|
},
|
||||||
|
cursorGuide(newCursorGuide) {
|
||||||
|
this.cursorGuide = newCursorGuide;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
eventHelpers.extend(this);
|
eventHelpers.extend(this);
|
||||||
this.imageExporter = new ImageExporter(this.openmct);
|
this.imageExporter = new ImageExporter(this.openmct);
|
||||||
@ -188,6 +243,7 @@ export default {
|
|||||||
},
|
},
|
||||||
loadingUpdated(loading) {
|
loadingUpdated(loading) {
|
||||||
this.loading = loading;
|
this.loading = loading;
|
||||||
|
this.$emit('loadingUpdated', ...arguments);
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this.stalenessSubscription) {
|
if (this.stalenessSubscription) {
|
||||||
@ -223,9 +279,11 @@ export default {
|
|||||||
},
|
},
|
||||||
lockHighlightPointUpdated(data) {
|
lockHighlightPointUpdated(data) {
|
||||||
this.lockHighlightPoint = data;
|
this.lockHighlightPoint = data;
|
||||||
|
this.$emit('lockHighlightPoint', ...arguments);
|
||||||
},
|
},
|
||||||
highlightsUpdated(data) {
|
highlightsUpdated(data) {
|
||||||
this.highlights = data;
|
this.highlights = data;
|
||||||
|
this.$emit('highlights', ...arguments);
|
||||||
},
|
},
|
||||||
legendHoverChanged(data) {
|
legendHoverChanged(data) {
|
||||||
this.limitLineLabels = data;
|
this.limitLineLabels = data;
|
||||||
@ -238,6 +296,16 @@ export default {
|
|||||||
},
|
},
|
||||||
updateReady(ready) {
|
updateReady(ready) {
|
||||||
this.configReady = ready;
|
this.configReady = ready;
|
||||||
|
this.$emit('configLoaded', ...arguments);
|
||||||
|
},
|
||||||
|
onYTickWidthChange() {
|
||||||
|
this.$emit('plotYTickWidth', ...arguments);
|
||||||
|
},
|
||||||
|
onCursorGuideChange() {
|
||||||
|
this.$emit('cursorGuide', ...arguments);
|
||||||
|
},
|
||||||
|
onGridLinesChange() {
|
||||||
|
this.$emit('gridLines', ...arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -114,7 +114,7 @@ export default {
|
|||||||
showLimitLineLabels: {
|
showLimitLineLabels: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hiddenYAxisIds: {
|
hiddenYAxisIds: {
|
||||||
@ -725,7 +725,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
showLabels(seriesKey) {
|
showLabels(seriesKey) {
|
||||||
return this.showLimitLineLabels.seriesKey && this.showLimitLineLabels.seriesKey === seriesKey;
|
return this.showLimitLineLabels?.seriesKey === seriesKey;
|
||||||
},
|
},
|
||||||
getLimitElement(limit) {
|
getLimitElement(limit) {
|
||||||
let point = {
|
let point = {
|
||||||
|
@ -55,7 +55,8 @@ export default class LegendModel extends Model {
|
|||||||
showValueWhenExpanded: true,
|
showValueWhenExpanded: true,
|
||||||
showMaximumWhenExpanded: true,
|
showMaximumWhenExpanded: true,
|
||||||
showMinimumWhenExpanded: true,
|
showMinimumWhenExpanded: true,
|
||||||
showUnitsWhenExpanded: true
|
showUnitsWhenExpanded: true,
|
||||||
|
showLegendsForChildren: true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,12 @@
|
|||||||
<div v-if="isStackedPlotObject || !isNestedWithinAStackedPlot" class="grid-properties">
|
<div v-if="isStackedPlotObject || !isNestedWithinAStackedPlot" class="grid-properties">
|
||||||
<ul class="l-inspector-part js-legend-properties">
|
<ul class="l-inspector-part js-legend-properties">
|
||||||
<h2 class="--first" title="Legend settings for this object">Legend</h2>
|
<h2 class="--first" title="Legend settings for this object">Legend</h2>
|
||||||
|
<li v-if="isStackedPlotObject" class="grid-row">
|
||||||
|
<div class="grid-cell label" title="Display legends per sub plot.">
|
||||||
|
Show legend per plot
|
||||||
|
</div>
|
||||||
|
<div class="grid-cell value">{{ showLegendsForChildren ? 'Yes' : 'No' }}</div>
|
||||||
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div
|
<div
|
||||||
class="grid-cell label"
|
class="grid-cell label"
|
||||||
@ -139,6 +145,7 @@ export default {
|
|||||||
showMinimumWhenExpanded: '',
|
showMinimumWhenExpanded: '',
|
||||||
showMaximumWhenExpanded: '',
|
showMaximumWhenExpanded: '',
|
||||||
showUnitsWhenExpanded: '',
|
showUnitsWhenExpanded: '',
|
||||||
|
showLegendsForChildren: '',
|
||||||
loaded: false,
|
loaded: false,
|
||||||
plotSeries: [],
|
plotSeries: [],
|
||||||
yAxes: []
|
yAxes: []
|
||||||
@ -218,6 +225,7 @@ export default {
|
|||||||
this.showMinimumWhenExpanded = this.config.legend.get('showMinimumWhenExpanded');
|
this.showMinimumWhenExpanded = this.config.legend.get('showMinimumWhenExpanded');
|
||||||
this.showMaximumWhenExpanded = this.config.legend.get('showMaximumWhenExpanded');
|
this.showMaximumWhenExpanded = this.config.legend.get('showMaximumWhenExpanded');
|
||||||
this.showUnitsWhenExpanded = this.config.legend.get('showUnitsWhenExpanded');
|
this.showUnitsWhenExpanded = this.config.legend.get('showUnitsWhenExpanded');
|
||||||
|
this.showLegendsForChildren = this.config.legend.get('showLegendsForChildren');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getConfig() {
|
getConfig() {
|
||||||
|
@ -35,7 +35,11 @@
|
|||||||
:y-axis="config.yAxis"
|
:y-axis="config.yAxis"
|
||||||
@seriesUpdated="updateSeriesConfigForObject"
|
@seriesUpdated="updateSeriesConfigForObject"
|
||||||
/>
|
/>
|
||||||
<ul v-if="isStackedPlotObject || !isStackedPlotNestedObject" class="l-inspector-part">
|
<ul
|
||||||
|
v-if="isStackedPlotObject || !isStackedPlotNestedObject"
|
||||||
|
class="l-inspector-part"
|
||||||
|
aria-label="Legend Properties"
|
||||||
|
>
|
||||||
<h2 class="--first" title="Legend options">Legend</h2>
|
<h2 class="--first" title="Legend options">Legend</h2>
|
||||||
<legend-form class="grid-properties" :legend="config.legend" />
|
<legend-form class="grid-properties" :legend="config.legend" />
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -21,6 +21,16 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<li v-if="isStackedPlotObject" class="grid-row">
|
||||||
|
<div class="grid-cell label" title="Display legends per sub plot.">Show legend per plot</div>
|
||||||
|
<div class="grid-cell value">
|
||||||
|
<input
|
||||||
|
v-model="showLegendsForChildren"
|
||||||
|
type="checkbox"
|
||||||
|
@change="updateForm('showLegendsForChildren')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div
|
<div
|
||||||
class="grid-cell label"
|
class="grid-cell label"
|
||||||
@ -128,7 +138,7 @@ import { coerce, objectPath, validate } from './formUtil';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct', 'domainObject'],
|
inject: ['openmct', 'domainObject', 'path'],
|
||||||
props: {
|
props: {
|
||||||
legend: {
|
legend: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -148,9 +158,18 @@ export default {
|
|||||||
showMinimumWhenExpanded: '',
|
showMinimumWhenExpanded: '',
|
||||||
showMaximumWhenExpanded: '',
|
showMaximumWhenExpanded: '',
|
||||||
showUnitsWhenExpanded: '',
|
showUnitsWhenExpanded: '',
|
||||||
|
showLegendsForChildren: '',
|
||||||
validation: {}
|
validation: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isStackedPlotObject() {
|
||||||
|
return this.path.find(
|
||||||
|
(pathObject, pathObjIndex) =>
|
||||||
|
pathObjIndex === 0 && pathObject?.type === 'telemetry.plot.stacked'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
this.initFormValues();
|
this.initFormValues();
|
||||||
@ -200,6 +219,11 @@ export default {
|
|||||||
modelProp: 'showUnitsWhenExpanded',
|
modelProp: 'showUnitsWhenExpanded',
|
||||||
coerce: Boolean,
|
coerce: Boolean,
|
||||||
objectPath: 'configuration.legend.showUnitsWhenExpanded'
|
objectPath: 'configuration.legend.showUnitsWhenExpanded'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
modelProp: 'showLegendsForChildren',
|
||||||
|
coerce: Boolean,
|
||||||
|
objectPath: 'configuration.legend.showLegendsForChildren'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
@ -213,6 +237,7 @@ export default {
|
|||||||
this.showMinimumWhenExpanded = this.legend.get('showMinimumWhenExpanded');
|
this.showMinimumWhenExpanded = this.legend.get('showMinimumWhenExpanded');
|
||||||
this.showMaximumWhenExpanded = this.legend.get('showMaximumWhenExpanded');
|
this.showMaximumWhenExpanded = this.legend.get('showMaximumWhenExpanded');
|
||||||
this.showUnitsWhenExpanded = this.legend.get('showUnitsWhenExpanded');
|
this.showUnitsWhenExpanded = this.legend.get('showUnitsWhenExpanded');
|
||||||
|
this.showLegendsForChildren = this.legend.get('showLegendsForChildren');
|
||||||
},
|
},
|
||||||
updateForm(formKey) {
|
updateForm(formKey) {
|
||||||
const newVal = this[formKey];
|
const newVal = this[formKey];
|
||||||
|
@ -181,9 +181,14 @@ export default {
|
|||||||
},
|
},
|
||||||
toggleHover(hover) {
|
toggleHover(hover) {
|
||||||
this.hover = hover;
|
this.hover = hover;
|
||||||
this.$emit('legendHoverChanged', {
|
this.$emit(
|
||||||
seriesKey: this.hover ? this.seriesObject.keyString : ''
|
'legendHoverChanged',
|
||||||
});
|
this.hover
|
||||||
|
? {
|
||||||
|
seriesKey: this.seriesObject.keyString
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -27,9 +27,10 @@
|
|||||||
:class="[plotLegendExpandedStateClass, plotLegendPositionClass]"
|
:class="[plotLegendExpandedStateClass, plotLegendPositionClass]"
|
||||||
>
|
>
|
||||||
<plot-legend
|
<plot-legend
|
||||||
v-if="compositionObjectsConfigLoaded"
|
v-if="compositionObjectsConfigLoaded && showLegendsForChildren === false"
|
||||||
:cursor-locked="!!lockHighlightPoint"
|
:cursor-locked="!!lockHighlightPoint"
|
||||||
:highlights="highlights"
|
:highlights="highlights"
|
||||||
|
class="js-stacked-plot-legend"
|
||||||
@legendHoverChanged="legendHoverChanged"
|
@legendHoverChanged="legendHoverChanged"
|
||||||
@expanded="updateExpanded"
|
@expanded="updateExpanded"
|
||||||
@position="updatePosition"
|
@position="updatePosition"
|
||||||
@ -46,6 +47,7 @@
|
|||||||
:cursor-guide="cursorGuide"
|
:cursor-guide="cursorGuide"
|
||||||
:show-limit-line-labels="showLimitLineLabels"
|
:show-limit-line-labels="showLimitLineLabels"
|
||||||
:parent-y-tick-width="maxTickWidth"
|
:parent-y-tick-width="maxTickWidth"
|
||||||
|
:hide-legend="showLegendsForChildren === false"
|
||||||
@plotYTickWidth="onYTickWidthChange"
|
@plotYTickWidth="onYTickWidthChange"
|
||||||
@loadingUpdated="loadingUpdated"
|
@loadingUpdated="loadingUpdated"
|
||||||
@cursorGuide="onCursorGuideChange"
|
@cursorGuide="onCursorGuideChange"
|
||||||
@ -66,6 +68,7 @@ import ColorPalette from '@/ui/color/ColorPalette';
|
|||||||
import PlotLegend from '../legend/PlotLegend.vue';
|
import PlotLegend from '../legend/PlotLegend.vue';
|
||||||
import StackedPlotItem from './StackedPlotItem.vue';
|
import StackedPlotItem from './StackedPlotItem.vue';
|
||||||
import ImageExporter from '../../../exporters/ImageExporter';
|
import ImageExporter from '../../../exporters/ImageExporter';
|
||||||
|
import eventHelpers from '../lib/eventHelpers';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -96,19 +99,28 @@ export default {
|
|||||||
colorPalette: new ColorPalette(),
|
colorPalette: new ColorPalette(),
|
||||||
compositionObjectsConfigLoaded: false,
|
compositionObjectsConfigLoaded: false,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
|
showLegendsForChildren: true,
|
||||||
expanded: false
|
expanded: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
plotLegendPositionClass() {
|
plotLegendPositionClass() {
|
||||||
|
if (this.showLegendsForChildren) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
return `plot-legend-${this.position}`;
|
return `plot-legend-${this.position}`;
|
||||||
},
|
},
|
||||||
plotLegendExpandedStateClass() {
|
plotLegendExpandedStateClass() {
|
||||||
if (this.expanded) {
|
let legendExpandedStateClass = '';
|
||||||
return 'plot-legend-expanded';
|
|
||||||
} else {
|
if (this.showLegendsForChildren !== true && this.expanded) {
|
||||||
return 'plot-legend-collapsed';
|
legendExpandedStateClass = 'plot-legend-expanded';
|
||||||
|
} else if (this.showLegendsForChildren !== true && !this.expanded) {
|
||||||
|
legendExpandedStateClass = 'plot-legend-collapsed';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return legendExpandedStateClass;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Returns the maximum width of the left and right y axes ticks of this stacked plots children
|
* Returns the maximum width of the left and right y axes ticks of this stacked plots children
|
||||||
@ -137,9 +149,11 @@ export default {
|
|||||||
this.destroy();
|
this.destroy();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
eventHelpers.extend(this);
|
||||||
//We only need to initialize the stacked plot config for legend properties
|
//We only need to initialize the stacked plot config for legend properties
|
||||||
const configId = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
const configId = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
||||||
this.config = this.getConfig(configId);
|
this.config = this.getConfig(configId);
|
||||||
|
this.showLegendsForChildren = this.config.legend.get('showLegendsForChildren');
|
||||||
|
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
this.imageExporter = new ImageExporter(this.openmct);
|
this.imageExporter = new ImageExporter(this.openmct);
|
||||||
@ -183,11 +197,21 @@ export default {
|
|||||||
|
|
||||||
return this.configLoaded[id] === true;
|
return this.configLoaded[id] === true;
|
||||||
});
|
});
|
||||||
|
if (this.compositionObjectsConfigLoaded) {
|
||||||
|
this.listenTo(
|
||||||
|
this.config.legend,
|
||||||
|
'change:showLegendsForChildren',
|
||||||
|
this.updateShowLegendsForChildren,
|
||||||
|
this
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
this.composition.off('add', this.addChild);
|
this.composition.off('add', this.addChild);
|
||||||
this.composition.off('remove', this.removeChild);
|
this.composition.off('remove', this.removeChild);
|
||||||
this.composition.off('reorder', this.compositionReorder);
|
this.composition.off('reorder', this.compositionReorder);
|
||||||
|
|
||||||
|
this.stopListening();
|
||||||
},
|
},
|
||||||
|
|
||||||
addChild(child) {
|
addChild(child) {
|
||||||
@ -305,6 +329,9 @@ export default {
|
|||||||
updatePosition(position) {
|
updatePosition(position) {
|
||||||
this.position = position;
|
this.position = position;
|
||||||
},
|
},
|
||||||
|
updateShowLegendsForChildren(showLegendsForChildren) {
|
||||||
|
this.showLegendsForChildren = showLegendsForChildren;
|
||||||
|
},
|
||||||
updateReady(ready) {
|
updateReady(ready) {
|
||||||
this.configReady = ready;
|
this.configReady = ready;
|
||||||
},
|
},
|
||||||
|
@ -23,14 +23,13 @@
|
|||||||
<div :aria-label="`Stacked Plot Item ${childObject.name}`"></div>
|
<div :aria-label="`Stacked Plot Item ${childObject.name}`"></div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import MctPlot from '../MctPlot.vue';
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import conditionalStylesMixin from './mixins/objectStyles-mixin';
|
import conditionalStylesMixin from './mixins/objectStyles-mixin';
|
||||||
import stalenessMixin from '@/ui/mixins/staleness-mixin';
|
import stalenessMixin from '@/ui/mixins/staleness-mixin';
|
||||||
import StalenessUtils from '@/utils/staleness';
|
import StalenessUtils from '@/utils/staleness';
|
||||||
import configStore from '@/plugins/plot/configuration/ConfigStore';
|
import configStore from '@/plugins/plot/configuration/ConfigStore';
|
||||||
import PlotConfigurationModel from '@/plugins/plot/configuration/PlotConfigurationModel';
|
import PlotConfigurationModel from '@/plugins/plot/configuration/PlotConfigurationModel';
|
||||||
import ProgressBar from '../../../ui/components/ProgressBar.vue';
|
import Plot from '../Plot.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [conditionalStylesMixin, stalenessMixin],
|
mixins: [conditionalStylesMixin, stalenessMixin],
|
||||||
@ -63,7 +62,7 @@ export default {
|
|||||||
showLimitLineLabels: {
|
showLimitLineLabels: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorPalette: {
|
colorPalette: {
|
||||||
@ -81,6 +80,12 @@ export default {
|
|||||||
hasMultipleLeftAxes: false
|
hasMultipleLeftAxes: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
hideLegend: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -104,6 +109,9 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
|
hideLegend(newHideLegend) {
|
||||||
|
this.updateComponentProp('hideLegend', newHideLegend);
|
||||||
|
},
|
||||||
staleObjects() {
|
staleObjects() {
|
||||||
this.isStale = this.staleObjects.length > 0;
|
this.isStale = this.staleObjects.length > 0;
|
||||||
this.updateComponentProp('isStale', this.isStale);
|
this.updateComponentProp('isStale', this.isStale);
|
||||||
@ -163,7 +171,6 @@ export default {
|
|||||||
const onConfigLoaded = this.onConfigLoaded;
|
const onConfigLoaded = this.onConfigLoaded;
|
||||||
const onCursorGuideChange = this.onCursorGuideChange;
|
const onCursorGuideChange = this.onCursorGuideChange;
|
||||||
const onGridLinesChange = this.onGridLinesChange;
|
const onGridLinesChange = this.onGridLinesChange;
|
||||||
const setStatus = this.setStatus;
|
|
||||||
|
|
||||||
const openmct = this.openmct;
|
const openmct = this.openmct;
|
||||||
const path = this.path;
|
const path = this.path;
|
||||||
@ -192,8 +199,7 @@ export default {
|
|||||||
this.component = new Vue({
|
this.component = new Vue({
|
||||||
el: viewContainer,
|
el: viewContainer,
|
||||||
components: {
|
components: {
|
||||||
MctPlot,
|
Plot
|
||||||
ProgressBar
|
|
||||||
},
|
},
|
||||||
provide: {
|
provide: {
|
||||||
openmct,
|
openmct,
|
||||||
@ -209,7 +215,6 @@ export default {
|
|||||||
onConfigLoaded,
|
onConfigLoaded,
|
||||||
onCursorGuideChange,
|
onCursorGuideChange,
|
||||||
onGridLinesChange,
|
onGridLinesChange,
|
||||||
setStatus,
|
|
||||||
isMissing,
|
isMissing,
|
||||||
loading: false
|
loading: false
|
||||||
};
|
};
|
||||||
@ -220,29 +225,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
<div v-if="!isMissing" ref="plotWrapper"
|
<Plot ref="plotComponent" v-if="!isMissing"
|
||||||
class="l-view-section u-style-receiver js-style-receiver"
|
:class="{'is-stale': isStale}"
|
||||||
:class="{'s-status-timeconductor-unsynced': status && status === 'timeconductor-unsynced', 'is-stale': isStale}">
|
:grid-lines="gridLines"
|
||||||
<progress-bar
|
:hide-legend="hideLegend"
|
||||||
v-show="loading !== false"
|
:cursor-guide="cursorGuide"
|
||||||
class="c-telemetry-table__progress-bar"
|
:parent-limit-line-labels="limitLineLabels"
|
||||||
:model="{progressPerc: undefined}" />
|
:options="options"
|
||||||
<mct-plot
|
:parent-y-tick-width="parentYTickWidth"
|
||||||
:init-grid-lines="gridLines"
|
:color-palette="colorPalette"
|
||||||
:init-cursor-guide="cursorGuide"
|
@loadingUpdated="loadingUpdated"
|
||||||
:parent-y-tick-width="parentYTickWidth"
|
@configLoaded="onConfigLoaded"
|
||||||
:limit-line-labels="limitLineLabels"
|
@lockHighlightPoint="onLockHighlightPointUpdated"
|
||||||
:color-palette="colorPalette"
|
@highlights="onHighlightsUpdated"
|
||||||
:options="options"
|
@plotYTickWidth="onYTickWidthChange"
|
||||||
@plotYTickWidth="onYTickWidthChange"
|
@cursorGuide="onCursorGuideChange"
|
||||||
@lockHighlightPoint="onLockHighlightPointUpdated"
|
@gridLines="onGridLinesChange"/>`
|
||||||
@highlights="onHighlightsUpdated"
|
|
||||||
@configLoaded="onConfigLoaded"
|
|
||||||
@cursorGuide="onCursorGuideChange"
|
|
||||||
@gridLines="onGridLinesChange"
|
|
||||||
@statusUpdated="setStatus"
|
|
||||||
@loadingUpdated="loadingUpdated"/>
|
|
||||||
</div>`
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.isEditing) {
|
if (this.isEditing) {
|
||||||
@ -315,10 +313,6 @@ export default {
|
|||||||
onGridLinesChange() {
|
onGridLinesChange() {
|
||||||
this.$emit('gridLines', ...arguments);
|
this.$emit('gridLines', ...arguments);
|
||||||
},
|
},
|
||||||
setStatus(status) {
|
|
||||||
this.status = status;
|
|
||||||
this.updateComponentProp('status', status);
|
|
||||||
},
|
|
||||||
setSelection() {
|
setSelection() {
|
||||||
let childContext = {};
|
let childContext = {};
|
||||||
childContext.item = this.childObject;
|
childContext.item = this.childObject;
|
||||||
@ -331,12 +325,12 @@ export default {
|
|||||||
},
|
},
|
||||||
getProps() {
|
getProps() {
|
||||||
return {
|
return {
|
||||||
|
hideLegend: this.hideLegend,
|
||||||
limitLineLabels: this.showLimitLineLabels,
|
limitLineLabels: this.showLimitLineLabels,
|
||||||
gridLines: this.gridLines,
|
gridLines: this.gridLines,
|
||||||
cursorGuide: this.cursorGuide,
|
cursorGuide: this.cursorGuide,
|
||||||
parentYTickWidth: this.parentYTickWidth,
|
parentYTickWidth: this.parentYTickWidth,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
status: this.status,
|
|
||||||
colorPalette: this.colorPalette,
|
colorPalette: this.colorPalette,
|
||||||
isStale: this.isStale
|
isStale: this.isStale
|
||||||
};
|
};
|
||||||
|
@ -490,12 +490,12 @@ describe('the plugin', function () {
|
|||||||
max: 10
|
max: 10
|
||||||
});
|
});
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
expect(plotViewComponentObject.$children[0].component.$children[1].xScale.domain()).toEqual(
|
expect(
|
||||||
{
|
plotViewComponentObject.$children[0].component.$children[0].$children[1].xScale.domain()
|
||||||
min: 0,
|
).toEqual({
|
||||||
max: 10
|
min: 0,
|
||||||
}
|
max: 10
|
||||||
);
|
});
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -509,7 +509,8 @@ describe('the plugin', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
const yAxesScales = plotViewComponentObject.$children[0].component.$children[1].yScale;
|
const yAxesScales =
|
||||||
|
plotViewComponentObject.$children[0].component.$children[0].$children[1].yScale;
|
||||||
yAxesScales.forEach((yAxisScale) => {
|
yAxesScales.forEach((yAxisScale) => {
|
||||||
expect(yAxisScale.scale.domain()).toEqual({
|
expect(yAxisScale.scale.domain()).toEqual({
|
||||||
min: 10,
|
min: 10,
|
||||||
|
@ -93,10 +93,6 @@ mct-plot {
|
|||||||
min-height: $plotMinH;
|
min-height: $plotMinH;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.is-stale {
|
|
||||||
@include isStaleHolder();
|
|
||||||
}
|
|
||||||
|
|
||||||
&[s-selected] {
|
&[s-selected] {
|
||||||
.is-editing & {
|
.is-editing & {
|
||||||
border: $editMarqueeBorder;
|
border: $editMarqueeBorder;
|
||||||
|
Loading…
Reference in New Issue
Block a user