mirror of
https://github.com/nasa/openmct.git
synced 2025-02-06 11:09:21 +00:00
[Telemetry Table] Address issues found during testing Table Performance (#7529)
Fix exporting from Limited Mode: #7268 (comment) Fix UI issues: #7268 (comment) Apply configuration changes made in Edit Properties. --------- Co-authored-by: Jesse Mazzella <jesse.d.mazzella@nasa.gov> Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
parent
cb4c59a464
commit
64862634f3
@ -392,6 +392,7 @@ async function setTimeConductorMode(page, isFixedTimespan = true) {
|
|||||||
await page.getByRole('menuitem', { name: /Real-Time/ }).click();
|
await page.getByRole('menuitem', { name: /Real-Time/ }).click();
|
||||||
await page.waitForURL(/tc\.mode=local/);
|
await page.waitForURL(/tc\.mode=local/);
|
||||||
}
|
}
|
||||||
|
await page.getByLabel('Submit time offsets').or(page.getByLabel('Submit time bounds')).click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -662,5 +663,6 @@ export {
|
|||||||
setRealTimeMode,
|
setRealTimeMode,
|
||||||
setStartOffset,
|
setStartOffset,
|
||||||
setTimeConductorBounds,
|
setTimeConductorBounds,
|
||||||
|
setTimeConductorMode,
|
||||||
waitForPlotsToRender
|
waitForPlotsToRender
|
||||||
};
|
};
|
||||||
|
@ -20,10 +20,31 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
import { createDomainObjectWithDefaults, setTimeConductorBounds } from '../../../../appActions.js';
|
import {
|
||||||
|
createDomainObjectWithDefaults,
|
||||||
|
setTimeConductorBounds,
|
||||||
|
setTimeConductorMode
|
||||||
|
} from '../../../../appActions.js';
|
||||||
import { expect, test } from '../../../../pluginFixtures.js';
|
import { expect, test } from '../../../../pluginFixtures.js';
|
||||||
|
|
||||||
test.describe('Telemetry Table', () => {
|
test.describe('Telemetry Table', () => {
|
||||||
|
let table;
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
table = await createDomainObjectWithDefaults(page, { type: 'Telemetry Table' });
|
||||||
|
});
|
||||||
|
|
||||||
|
test('Limits to 50 rows by default', async ({ page }) => {
|
||||||
|
await createDomainObjectWithDefaults(page, {
|
||||||
|
type: 'Sine Wave Generator',
|
||||||
|
parent: table.uuid
|
||||||
|
});
|
||||||
|
await page.goto(table.url);
|
||||||
|
await setTimeConductorMode(page, false);
|
||||||
|
const rows = page.getByLabel('table content').getByLabel('Table Row');
|
||||||
|
await expect(rows).toHaveCount(50);
|
||||||
|
});
|
||||||
|
|
||||||
test('unpauses and filters data when paused by button and user changes bounds', async ({
|
test('unpauses and filters data when paused by button and user changes bounds', async ({
|
||||||
page
|
page
|
||||||
}) => {
|
}) => {
|
||||||
@ -34,7 +55,6 @@ test.describe('Telemetry Table', () => {
|
|||||||
|
|
||||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
|
||||||
const table = await createDomainObjectWithDefaults(page, { type: 'Telemetry Table' });
|
|
||||||
await createDomainObjectWithDefaults(page, {
|
await createDomainObjectWithDefaults(page, {
|
||||||
type: 'Sine Wave Generator',
|
type: 'Sine Wave Generator',
|
||||||
parent: table.uuid
|
parent: table.uuid
|
||||||
@ -78,7 +98,6 @@ test.describe('Telemetry Table', () => {
|
|||||||
test('Supports filtering telemetry by regular text search', async ({ page }) => {
|
test('Supports filtering telemetry by regular text search', async ({ page }) => {
|
||||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
|
||||||
const table = await createDomainObjectWithDefaults(page, { type: 'Telemetry Table' });
|
|
||||||
await createDomainObjectWithDefaults(page, {
|
await createDomainObjectWithDefaults(page, {
|
||||||
type: 'Event Message Generator',
|
type: 'Event Message Generator',
|
||||||
parent: table.uuid
|
parent: table.uuid
|
||||||
@ -121,7 +140,6 @@ test.describe('Telemetry Table', () => {
|
|||||||
test('Supports filtering using Regex', async ({ page }) => {
|
test('Supports filtering using Regex', async ({ page }) => {
|
||||||
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
await page.goto('./', { waitUntil: 'domcontentloaded' });
|
||||||
|
|
||||||
const table = await createDomainObjectWithDefaults(page, { type: 'Telemetry Table' });
|
|
||||||
await createDomainObjectWithDefaults(page, {
|
await createDomainObjectWithDefaults(page, {
|
||||||
type: 'Event Message Generator',
|
type: 'Event Message Generator',
|
||||||
parent: table.uuid
|
parent: table.uuid
|
||||||
|
@ -75,8 +75,6 @@ test.describe('Visual - Example Imagery', () => {
|
|||||||
await page.goto(exampleImagery.url, { waitUntil: 'domcontentloaded' });
|
await page.goto(exampleImagery.url, { waitUntil: 'domcontentloaded' });
|
||||||
|
|
||||||
await setRealTimeMode(page, true);
|
await setRealTimeMode(page, true);
|
||||||
//Temporary to close the dialog
|
|
||||||
await page.getByLabel('Submit time offsets').click();
|
|
||||||
|
|
||||||
await expect(page.getByLabel('Image Wrapper')).toBeVisible();
|
await expect(page.getByLabel('Image Wrapper')).toBeVisible();
|
||||||
|
|
||||||
|
@ -114,7 +114,11 @@ export default class TelemetryTable extends EventEmitter {
|
|||||||
this.clearAndResubscribe();
|
this.clearAndResubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRowLimit() {
|
updateRowLimit(rowLimit) {
|
||||||
|
if (rowLimit) {
|
||||||
|
this.rowLimit = rowLimit;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.telemetryMode === 'performance') {
|
if (this.telemetryMode === 'performance') {
|
||||||
this.tableRows.setLimit(this.rowLimit);
|
this.tableRows.setLimit(this.rowLimit);
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
export default function getTelemetryTableType(options = {}) {
|
export default function getTelemetryTableType(options = {}) {
|
||||||
const { telemetryMode = 'performance', persistModeChanges = true, rowLimit = 50 } = options;
|
const { telemetryMode = 'performance', persistModeChange = true, rowLimit = 50 } = options;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: 'Telemetry Table',
|
name: 'Telemetry Table',
|
||||||
@ -32,12 +32,12 @@ export default function getTelemetryTableType(options = {}) {
|
|||||||
form: [
|
form: [
|
||||||
{
|
{
|
||||||
key: 'telemetryMode',
|
key: 'telemetryMode',
|
||||||
name: 'Telemetry Mode',
|
name: 'Data Mode',
|
||||||
control: 'select',
|
control: 'select',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: 'performance',
|
value: 'performance',
|
||||||
name: 'Performance Mode'
|
name: 'Limited (Performance) Mode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'unlimited',
|
value: 'unlimited',
|
||||||
@ -48,15 +48,15 @@ export default function getTelemetryTableType(options = {}) {
|
|||||||
property: ['configuration', 'telemetryMode']
|
property: ['configuration', 'telemetryMode']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Persist Telemetry Mode Changes',
|
name: 'Persist Data Mode Changes',
|
||||||
control: 'toggleSwitch',
|
control: 'toggleSwitch',
|
||||||
cssClass: 'l-input',
|
cssClass: 'l-input',
|
||||||
key: 'persistModeChanges',
|
key: 'persistModeChange',
|
||||||
property: ['configuration', 'persistModeChanges']
|
property: ['configuration', 'persistModeChange']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Performance Mode Row Limit',
|
name: 'Limited Data Mode Row Limit',
|
||||||
control: 'toggleSwitch',
|
control: 'numberfield',
|
||||||
cssClass: 'l-input',
|
cssClass: 'l-input',
|
||||||
key: 'rowLimit',
|
key: 'rowLimit',
|
||||||
property: ['configuration', 'rowLimit']
|
property: ['configuration', 'rowLimit']
|
||||||
@ -68,7 +68,7 @@ export default function getTelemetryTableType(options = {}) {
|
|||||||
columnWidths: {},
|
columnWidths: {},
|
||||||
hiddenColumns: {},
|
hiddenColumns: {},
|
||||||
telemetryMode,
|
telemetryMode,
|
||||||
persistModeChanges,
|
persistModeChange,
|
||||||
rowLimit
|
rowLimit
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,8 @@ export default {
|
|||||||
totalNumberOfRows: 0,
|
totalNumberOfRows: 0,
|
||||||
rowContext: {},
|
rowContext: {},
|
||||||
telemetryMode: configuration.telemetryMode,
|
telemetryMode: configuration.telemetryMode,
|
||||||
persistModeChanges: configuration.persistModeChanges
|
persistModeChange: configuration.persistModeChange,
|
||||||
|
afterLoadActions: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -458,10 +459,8 @@ export default {
|
|||||||
},
|
},
|
||||||
loading: {
|
loading: {
|
||||||
handler(isLoading) {
|
handler(isLoading) {
|
||||||
if (isLoading) {
|
if (!isLoading) {
|
||||||
this.setLoadingPromise();
|
this.runAfterLoadActions();
|
||||||
} else {
|
|
||||||
this.loadFinishResolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.viewActionsCollection) {
|
if (this.viewActionsCollection) {
|
||||||
@ -538,6 +537,8 @@ export default {
|
|||||||
this.table.on('outstanding-requests', this.outstandingRequests);
|
this.table.on('outstanding-requests', this.outstandingRequests);
|
||||||
this.table.on('telemetry-staleness', this.handleStaleness);
|
this.table.on('telemetry-staleness', this.handleStaleness);
|
||||||
|
|
||||||
|
this.table.configuration.on('change', this.handleConfigurationChanges);
|
||||||
|
|
||||||
this.table.tableRows.on('add', this.rowsAdded);
|
this.table.tableRows.on('add', this.rowsAdded);
|
||||||
this.table.tableRows.on('remove', this.rowsRemoved);
|
this.table.tableRows.on('remove', this.rowsRemoved);
|
||||||
this.table.tableRows.on('sort', this.throttledUpdateVisibleRows);
|
this.table.tableRows.on('sort', this.throttledUpdateVisibleRows);
|
||||||
@ -567,6 +568,8 @@ export default {
|
|||||||
this.table.off('outstanding-requests', this.outstandingRequests);
|
this.table.off('outstanding-requests', this.outstandingRequests);
|
||||||
this.table.off('telemetry-staleness', this.handleStaleness);
|
this.table.off('telemetry-staleness', this.handleStaleness);
|
||||||
|
|
||||||
|
this.table.configuration.off('change', this.handleConfigurationChanges);
|
||||||
|
|
||||||
this.table.tableRows.off('add', this.rowsAdded);
|
this.table.tableRows.off('add', this.rowsAdded);
|
||||||
this.table.tableRows.off('remove', this.rowsRemoved);
|
this.table.tableRows.off('remove', this.rowsRemoved);
|
||||||
this.table.tableRows.off('sort', this.throttledUpdateVisibleRows);
|
this.table.tableRows.off('sort', this.throttledUpdateVisibleRows);
|
||||||
@ -581,11 +584,34 @@ export default {
|
|||||||
this.table.destroy();
|
this.table.destroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setLoadingPromise() {
|
addToAfterLoadActions(func) {
|
||||||
this.loadFinishResolve = null;
|
this.afterLoadActions.push(func);
|
||||||
this.isFinishedLoading = new Promise((resolve, reject) => {
|
},
|
||||||
this.loadFinishResolve = resolve;
|
runAfterLoadActions() {
|
||||||
});
|
if (this.afterLoadActions.length > 0) {
|
||||||
|
this.afterLoadActions.forEach((action) => action());
|
||||||
|
this.afterLoadActions = [];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleConfigurationChanges(changes) {
|
||||||
|
const { rowLimit, telemetryMode, persistModeChange } = changes;
|
||||||
|
|
||||||
|
this.persistModeChange = persistModeChange;
|
||||||
|
|
||||||
|
if (this.rowLimit !== rowLimit) {
|
||||||
|
this.rowLimit = rowLimit;
|
||||||
|
this.table.updateRowLimit(rowLimit);
|
||||||
|
|
||||||
|
if (this.telemetryMode !== telemetryMode) {
|
||||||
|
// need to clear and resubscribe, if different, handled below
|
||||||
|
this.table.clearAndResubscribe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.telemetryMode !== telemetryMode) {
|
||||||
|
this.telemetryMode = telemetryMode;
|
||||||
|
this.table.updateTelemetryMode(telemetryMode);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateVisibleRows() {
|
updateVisibleRows() {
|
||||||
if (!this.updatingView) {
|
if (!this.updatingView) {
|
||||||
@ -1042,7 +1068,7 @@ export default {
|
|||||||
let row = allRows[i];
|
let row = allRows[i];
|
||||||
row.marked = true;
|
row.marked = true;
|
||||||
|
|
||||||
if (row !== baseRow) {
|
if (row !== baseRow && this.markedRows.indexOf(row) === -1) {
|
||||||
this.markedRows.push(row);
|
this.markedRows.push(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1166,11 +1192,9 @@ export default {
|
|||||||
{
|
{
|
||||||
label,
|
label,
|
||||||
emphasis: true,
|
emphasis: true,
|
||||||
callback: async () => {
|
callback: () => {
|
||||||
|
this.addToAfterLoadActions(callback);
|
||||||
this.updateTelemetryMode();
|
this.updateTelemetryMode();
|
||||||
await this.isFinishedLoading;
|
|
||||||
|
|
||||||
callback();
|
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
@ -1187,7 +1211,7 @@ export default {
|
|||||||
updateTelemetryMode() {
|
updateTelemetryMode() {
|
||||||
this.telemetryMode = this.telemetryMode === 'unlimited' ? 'performance' : 'unlimited';
|
this.telemetryMode = this.telemetryMode === 'unlimited' ? 'performance' : 'unlimited';
|
||||||
|
|
||||||
if (this.persistModeChanges) {
|
if (this.persistModeChange) {
|
||||||
this.table.configuration.setTelemetryMode(this.telemetryMode);
|
this.table.configuration.setTelemetryMode(this.telemetryMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
:title="rowCountTitle"
|
:title="rowCountTitle"
|
||||||
class="c-table-indicator__elem c-table-indicator__row-count"
|
class="c-table-indicator__elem c-table-indicator__row-count"
|
||||||
>
|
>
|
||||||
{{ rowCount }} Rows
|
{{ rowCount }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
@ -113,7 +113,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
rowCount() {
|
rowCount() {
|
||||||
return this.isUnlimitedMode ? this.totalRows : 'LATEST 50';
|
return this.isUnlimitedMode ? `${this.totalRows} ROWS` : `LATEST ${this.totalRows} ROWS`;
|
||||||
},
|
},
|
||||||
rowCountTitle() {
|
rowCountTitle() {
|
||||||
return this.isUnlimitedMode
|
return this.isUnlimitedMode
|
||||||
@ -121,12 +121,12 @@ export default {
|
|||||||
: 'performance mode limited to 50 rows';
|
: 'performance mode limited to 50 rows';
|
||||||
},
|
},
|
||||||
telemetryModeButtonLabel() {
|
telemetryModeButtonLabel() {
|
||||||
return this.isUnlimitedMode ? 'SHOW LATEST 50' : 'SHOW ALL';
|
return this.isUnlimitedMode ? 'SHOW LIMITED' : 'SHOW UNLIMITED';
|
||||||
},
|
},
|
||||||
telemetryModeButtonTitle() {
|
telemetryModeButtonTitle() {
|
||||||
return this.isUnlimitedMode
|
return this.isUnlimitedMode
|
||||||
? 'Change to Performance mode (latest 50 values)'
|
? 'Change to Limited (Performance) Mode'
|
||||||
: 'Change to show all values';
|
: 'Change to Unlimited Mode';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.hasMixedFilters) {
|
if (this.hasMixedFilters) {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
:style="{ top: rowTop }"
|
:style="{ top: rowTop }"
|
||||||
class="noselect"
|
class="noselect"
|
||||||
:class="[rowClass, { 'is-selected': marked }]"
|
:class="[rowClass, { 'is-selected': marked }]"
|
||||||
|
:aria-label="ariaLabel"
|
||||||
v-on="listeners"
|
v-on="listeners"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
@ -99,6 +100,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
ariaLabel() {
|
||||||
|
return this.marked ? 'Selected Table Row' : 'Table Row';
|
||||||
|
},
|
||||||
listeners() {
|
listeners() {
|
||||||
let listenersObject = {
|
let listenersObject = {
|
||||||
click: this.markRow
|
click: this.markRow
|
||||||
|
@ -499,7 +499,9 @@ select {
|
|||||||
color: $colorSelectFg;
|
color: $colorSelectFg;
|
||||||
box-shadow: $shdwSelect;
|
box-shadow: $shdwSelect;
|
||||||
background-repeat: no-repeat, no-repeat;
|
background-repeat: no-repeat, no-repeat;
|
||||||
background-position: right 0.4em top 80%, 0 0;
|
background-position:
|
||||||
|
right 0.4em top 80%,
|
||||||
|
0 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: $controlCr;
|
border-radius: $controlCr;
|
||||||
padding: 2px 20px 2px $interiorMargin;
|
padding: 2px 20px 2px $interiorMargin;
|
||||||
@ -718,15 +720,15 @@ select {
|
|||||||
.c-super-menu__item-description {
|
.c-super-menu__item-description {
|
||||||
flex: 1 1 70%;
|
flex: 1 1 70%;
|
||||||
|
|
||||||
[class*="__icon"] {
|
[class*='__icon'] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="__name"] {
|
[class*='__name'] {
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*="__item-description"] {
|
[class*='__item-description'] {
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1133,7 +1135,7 @@ input[type='range'] {
|
|||||||
// Hidden by default; requires a hover 1 - 3 levels above to display
|
// Hidden by default; requires a hover 1 - 3 levels above to display
|
||||||
@include transition(opacity, $transOutTime);
|
@include transition(opacity, $transOutTime);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user