Skip to content

Commit 0225945

Browse files
committed
Merge branch 'main' into release/5.0-b1
2 parents 8786c5d + e8846d3 commit 0225945

File tree

12 files changed

+297
-18
lines changed

12 files changed

+297
-18
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ protractor/logs
3232
# npm-debug log
3333
npm-debug.log
3434

35-
test_data/
36-
3735
# auto-env files for those that use them.
3836
.env
3937
dist

loader.js

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ define([
127127
aboutHtml: insertBuildInfo(AboutTemplate),
128128
});
129129

130+
// do not show telemetry if it falls out of bounds
131+
// even if there is no new telemetry
132+
openmct.telemetry.greedyLAD(false);
133+
130134
persistenceLoadedPromise.then(() => {
131135
openmct.start();
132136
window.openmct = openmct;

src/channelTable/channelTablePlugin/ChannelTable.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ define([
3535
this.tableRows = new ChannelTableRowCollection(this.openmct);
3636

3737
let sortOptions = this.configuration.getConfiguration().sortOptions;
38-
39-
//If no persisted sort order, default to sorting by time system, ascending.
40-
sortOptions = sortOptions || {
41-
key: this.openmct.time.timeSystem().key,
42-
direction: 'asc'
43-
};
4438

45-
this.tableRows.sortBy(sortOptions);
39+
if (sortOptions) {
40+
this.tableRows.sortBy(sortOptions);
41+
}
42+
4643
this.tableRows.on('resetRowsFromAllData', this.resetRowsFromAllData);
4744
}
4845

src/channelTable/channelTablePlugin/ChannelTableRowCollection.js

+29-6
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ define(
2323

2424
addOrUpdateRow(row) {
2525
if (this.isLADRow(row)) {
26-
this.removeRowsByObject(row.objectKeyString);
27-
super.addRows([row], 'add');
26+
this.addRows([row]);
2827
}
2928
}
3029

@@ -38,7 +37,7 @@ define(
3837
return !isStaleData;
3938
}
4039

41-
addOne (item) {
40+
addOne(item) {
4241
if (item.isDummyRow) {
4342
this.ladMap.set(item.objectKeyString, this.rows.length);
4443
this.rows.push(item);
@@ -48,28 +47,52 @@ define(
4847

4948
if (this.isNewerThanLAD(item)) {
5049
let rowIndex = this.ladMap.get(item.objectKeyString);
51-
let itemToReplace = this.rows[rowIndex];
5250
this.rows[rowIndex] = item;
53-
this.emit('remove', [itemToReplace]);
51+
this.removeExistingByKeystring(item.objectKeyString);
5452
this.emit('add', [item]);
5553
return true;
5654
}
5755
return false;
5856
}
5957

58+
addRows(rows) {
59+
let rowsToAdd = this.filterRows(rows);
60+
61+
if (rowsToAdd.length > 0) {
62+
rowsToAdd.forEach(this.addOne.bind(this));
63+
this.emit('add', rowsToAdd);
64+
}
65+
}
66+
6067
removeAllRowsForObject(objectKeyString) {
6168
super.removeAllRowsForObject(objectKeyString);
6269
this.rebuildLadMap();
6370
}
6471

72+
removeExistingByKeystring(keyString) {
73+
let removed = [];
74+
75+
this.rows.forEach((row) => {
76+
if (row.objectKeyString === keyString) {
77+
removed.push(row);
78+
79+
return false;
80+
} else {
81+
return true;
82+
}
83+
});
84+
85+
this.emit('remove', removed);
86+
}
87+
6588
rebuildLadMap() {
6689
this.ladMap.clear();
6790
this.rows.forEach((row, index) => {
6891
this.ladMap.set(row.objectKeyString, index);
6992
});
7093
}
7194

72-
reorder (reorderPlan) {
95+
reorder(reorderPlan) {
7396
let oldRows = this.rows.slice();
7497
reorderPlan.forEach(reorderEvent => {
7598
let item = oldRows[reorderEvent.oldIndex];

src/multipleHistoricalSessions/sessionSelector/historicalSessionSelector.vue

+1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export default {
256256
this.closeOverlay();
257257
},
258258
closeOverlay() {
259+
this.table.clearColumnFilters();
259260
if (this.overlay) {
260261
this.overlay.dismiss();
261262
delete this.overlay;

src/multipleHistoricalSessions/sessionTable/SessionTable.js

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ export default class SessionTable extends TelemetryTable {
9595
this.tableRows.clearRowsFromTableAndFilter(rows);
9696
}
9797

98+
clearColumnFilters() {
99+
Object.keys(this.tableRows.columnFilters)
100+
.forEach(filter => this.tableRows.setColumnFilter(filter, ''));
101+
}
102+
98103
clearAndUpdateData(data) {
99104
this.data = data;
100105
this.clearData();

src/packetQuery/components/PacketQueryView.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export default {
195195
196196
this.initializeQueryModel();
197197
198-
this.openmct.forms.showForm(formStructure, options)
198+
this.openmct.forms.showCustomForm(formStructure, options)
199199
.then(this.resolveFormPromise.bind(this));
200200
201201
this.runQueryButton = this.formElement.querySelector('.c-button.c-button--major');

src/services/mcws/MIO.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ export default class MIO {
7878
}
7979

8080
async getMetadata() {
81-
const response = await this.request(this.metadataUrl, 'GET', { output: 'json' });
82-
const metadataResponse = await response.json();
81+
const metadataResponse = await this.request(this.metadataUrl, 'GET', { output: 'json' });
8382

8483
return {
8584
get(subject, predicate) {

test_data/ChannelDictionary.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[
2+
{
3+
"channel_id": "CPU-0001",
4+
"channel_name": "CPU_UTIL",
5+
"data_type": "FLOAT",
6+
"something": "whatever",
7+
"dn_units": "percentage",
8+
"dn_to_eu": "OFF",
9+
"eu_units": "none",
10+
"channel_format": "F32"
11+
},
12+
{
13+
"channel_id": "ENG-0001",
14+
"channel_name": "main_engine_turn_on",
15+
"data_type": "ENUM",
16+
"dn_units": "none",
17+
"dn_to_eu": "OFF",
18+
"eu_units": "none",
19+
"channel_format": "I8"
20+
},
21+
{
22+
"channel_id": "ENG-0002",
23+
"channel_name": "someone_set_us_up",
24+
"data_type": "ENUM",
25+
"dn_units": "none",
26+
"dn_to_eu": "OFF",
27+
"eu_units": "none",
28+
"channel_format": "I8"
29+
}
30+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[
2+
{
3+
"channel_id": "ENG-0002",
4+
"channel_type": "ENUM",
5+
"channel_format": "I8",
6+
"enum_value": "0",
7+
"enum_string": "UNINITIALIZED"
8+
},
9+
{
10+
"channel_id": "ENG-0002",
11+
"channel_type": "ENUM",
12+
"channel_format": "I8",
13+
"enum_value": "1",
14+
"enum_string": "RECV_ONLY_STATE"
15+
},
16+
{
17+
"channel_id": "ENG-0002",
18+
"channel_type": "ENUM",
19+
"channel_format": "I8",
20+
"enum_value": "2",
21+
"enum_string": "ACTIVE_WINDOW"
22+
},
23+
{
24+
"channel_id": "ENG-0002",
25+
"channel_type": "ENUM",
26+
"channel_format": "I8",
27+
"enum_value": "3",
28+
"enum_string": "CONTINGENCY_STATE"
29+
}
30+
]

test_data/EVRDictionary.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"record_type": "evr_dictionary",
4+
"evr_id": "1",
5+
"evr_name": "TEST_CBM_EVR_BKGD_DONE",
6+
"level": "ACTIVITY_HI",
7+
"module": "TEST_CBM",
8+
"ops_cat": "",
9+
"nargs": "5",
10+
"format": "Established background state for mode %d with bkgd row %d, x-band id %d, uhf id %d, eha row %d"
11+
},
12+
{
13+
"record_type": "evr_dictionary",
14+
"evr_id": "2",
15+
"evr_name": "TEST_CBM_EVR_BKGD_START",
16+
"level": "ACTIVITY_LO",
17+
"module": "TEST_CBM",
18+
"ops_cat": "",
19+
"nargs": "5",
20+
"format": "Start background state for mode %d with bkgd row %d, x-band id %d, uhf id %d, eha row %d"
21+
}
22+
]

0 commit comments

Comments
 (0)