mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
* [Notebook]: Unnecessary notification "Time bounds changed to fixed timespan mode" #2843 * removed stopclock call. Co-authored-by: Andrew Henry <akhenry@gmail.com> Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
@ -162,19 +162,31 @@ export default {
|
|||||||
}).show(this.embed.snapshot.src);
|
}).show(this.embed.snapshot.src);
|
||||||
},
|
},
|
||||||
changeLocation() {
|
changeLocation() {
|
||||||
this.openmct.time.stopClock();
|
|
||||||
this.openmct.time.bounds({
|
|
||||||
start: this.embed.bounds.start,
|
|
||||||
end: this.embed.bounds.end
|
|
||||||
});
|
|
||||||
|
|
||||||
const link = this.embed.historicLink;
|
const link = this.embed.historicLink;
|
||||||
if (!link) {
|
if (!link) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bounds = this.openmct.time.bounds();
|
||||||
|
const isTimeBoundChanged = this.embed.bounds.start !== bounds.start
|
||||||
|
&& this.embed.bounds.end !== bounds.end;
|
||||||
|
const isFixedTimespanMode = !this.openmct.time.clock();
|
||||||
|
|
||||||
window.location.href = link;
|
window.location.href = link;
|
||||||
const message = 'Time bounds changed to fixed timespan mode';
|
|
||||||
|
let message = '';
|
||||||
|
if (isTimeBoundChanged) {
|
||||||
|
this.openmct.time.bounds({
|
||||||
|
start: this.embed.bounds.start,
|
||||||
|
end: this.embed.bounds.end
|
||||||
|
});
|
||||||
|
message = 'Time bound values changed';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isFixedTimespanMode) {
|
||||||
|
message = 'Time bound values changed to fixed timespan mode';
|
||||||
|
}
|
||||||
|
|
||||||
this.openmct.notifications.alert(message);
|
this.openmct.notifications.alert(message);
|
||||||
},
|
},
|
||||||
formatTime(unixTime, timeFormat) {
|
formatTime(unixTime, timeFormat) {
|
||||||
|
Reference in New Issue
Block a user