mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 04:14:32 +00:00
Add unsynced status class to legacy views (#2374)
This commit is contained in:
parent
ee1d92d4a9
commit
f601ab03e7
@ -48,12 +48,22 @@ define([
|
||||
let scope = $rootScope.$new();
|
||||
let legacyObject = convertToLegacyObject(domainObject);
|
||||
let isDestroyed = false;
|
||||
let unlistenToStatus;
|
||||
scope.domainObject = legacyObject;
|
||||
scope.model = legacyObject.getModel();
|
||||
|
||||
|
||||
return {
|
||||
show: function (container) {
|
||||
let statusCapability = legacyObject.getCapability('status');
|
||||
unlistenToStatus = statusCapability.listen((newStatus) => {
|
||||
container.classList.remove('s-status-timeconductor-unsynced');
|
||||
|
||||
if (newStatus.includes('timeconductor-unsynced')) {
|
||||
container.classList.add('s-status-timeconductor-unsynced');
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: implement "gestures" support ?
|
||||
let uses = legacyView.uses || [];
|
||||
let promises = [];
|
||||
@ -94,6 +104,7 @@ define([
|
||||
},
|
||||
destroy: function () {
|
||||
scope.$destroy();
|
||||
unlistenToStatus();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -564,3 +564,10 @@ mct-plot {
|
||||
top: 0; bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.s-status-timeconductor-unsynced {
|
||||
.t-object-alert.t-alert-unsynced {
|
||||
@extend .icon-alert-triangle;
|
||||
color: $colorPausedBg;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user