-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix import/export, channel table order, frame summary view, EMD View,…
… issue installing over older persistence
- Loading branch information
Showing
12 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
import TableRowCollection from 'openmct.tables.collections.TableRowCollection'; | ||
|
||
export default class FrameWatchRowCollection extends TableRowCollection { | ||
constructor(openmct) { | ||
super(openmct); | ||
addRows(rows) { | ||
let rowsToAdd = this.filterRows(rows); | ||
let newRowsToAdd = []; | ||
|
||
rowsToAdd.forEach(rowToAdd => { | ||
const matchIndex = this.rows.find(row => row.rowId === rowToAdd.rowId) | ||
|
||
this.createRowMapEntries = this.createRowMapEntries.bind(this); | ||
this.removeRowMapEntries = this.removeRowMapEntries.bind(this); | ||
this.rowMap = {}; | ||
|
||
this.on('remove', this.removeRowMapEntries); | ||
this.on('add', this.createRowMapEntries); | ||
} | ||
|
||
createRowMapEntries(row) { | ||
this.rowMap[row.rowId] = row; | ||
} | ||
|
||
removeRowMapEntries(rows) { | ||
rows.forEach((row) => { | ||
delete this.rowMap[row.rowId]; | ||
if (matchIndex !== undefined) { | ||
this.emit('remove', [this.rows[matchIndex]]); | ||
this.rows[matchIndex] = rowToAdd; | ||
this.emit('add', [this.rows[matchIndex]]); | ||
} else { | ||
newRowsToAdd.push(rowToAdd); | ||
} | ||
}); | ||
|
||
if (newRowsToAdd.length > 0) { | ||
this.sortAndMergeRows(newRowsToAdd); | ||
this.emit('add', newRowsToAdd); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export default function existingNamespaceUpdateInterceptor(openmct, usersNamespace, shouldCheck) { | ||
let loggedNamespaceCheck = false; | ||
|
||
openmct.objects.addGetInterceptor({ | ||
appliesTo: (identifier, domainObject) => { | ||
return shouldCheck; | ||
}, | ||
invoke: (identifier, object) => { | ||
if (object.location === usersNamespace.key) { | ||
object.location = usersNamespace.id; | ||
openmct.objects.mutate(object, 'location', usersNamespace.id); | ||
} | ||
|
||
// turn off if we've checked the user folder | ||
if (!loggedNamespaceCheck && (object.location === usersNamespace.key || object.location === usersNamespace.id)) { | ||
localStorage.setItem(`r5.0_old_namespace_checked:${usersNamespace.key}`, 'true'); | ||
loggedNamespaceCheck = true; | ||
} | ||
|
||
return object; | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters