mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
* display bounds change notification only if bounds changed * avoid empty notification messages.
This commit is contained in:
@ -169,12 +169,10 @@ export default {
|
|||||||
|
|
||||||
const bounds = this.openmct.time.bounds();
|
const bounds = this.openmct.time.bounds();
|
||||||
const isTimeBoundChanged = this.embed.bounds.start !== bounds.start
|
const isTimeBoundChanged = this.embed.bounds.start !== bounds.start
|
||||||
&& this.embed.bounds.end !== bounds.end;
|
|| this.embed.bounds.end !== bounds.end;
|
||||||
const isFixedTimespanMode = !this.openmct.time.clock();
|
const isFixedTimespanMode = !this.openmct.time.clock();
|
||||||
|
|
||||||
this.openmct.time.stopClock();
|
this.openmct.time.stopClock();
|
||||||
window.location.href = link;
|
|
||||||
|
|
||||||
let message = '';
|
let message = '';
|
||||||
if (isTimeBoundChanged) {
|
if (isTimeBoundChanged) {
|
||||||
this.openmct.time.bounds({
|
this.openmct.time.bounds({
|
||||||
@ -188,7 +186,11 @@ export default {
|
|||||||
message = 'Time bound values changed to fixed timespan mode';
|
message = 'Time bound values changed to fixed timespan mode';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.openmct.notifications.alert(message);
|
if (message.length) {
|
||||||
|
this.openmct.notifications.alert(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.location.href = link;
|
||||||
},
|
},
|
||||||
formatTime(unixTime, timeFormat) {
|
formatTime(unixTime, timeFormat) {
|
||||||
return Moment.utc(unixTime).format(timeFormat);
|
return Moment.utc(unixTime).format(timeFormat);
|
||||||
|
Reference in New Issue
Block a user