Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Timelist] Fixed Time use Now as start time - 5772 #6497

Merged
merged 39 commits into from
Jul 14, 2023
Merged
Changes from 9 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0b535eb
Selectively filter activities only for realtime
michaelrogers Nov 7, 2022
775ae85
Remove unnecessary logic
michaelrogers Nov 7, 2022
d03a1f0
Adjust hideAll and showAll flags for non-realtime mode
michaelrogers Jan 19, 2023
be32144
Filter out past events for fixed time
michaelrogers Mar 29, 2023
fd0851b
Merge branch 'master' into mct5772-v2
michaelrogers Mar 29, 2023
eb89470
Merge branch 'master' into mct5772-v2
michaelrogers Mar 30, 2023
7d205e3
Set the timestamp on bounds change
michaelrogers Mar 31, 2023
eb18368
Cleanup
michaelrogers Mar 31, 2023
4a3c245
Removed duplicated listing since handled by different method
michaelrogers Apr 3, 2023
4c29e6d
Inverted variable
michaelrogers Apr 3, 2023
7f6a049
removed setting showAll flag
michaelrogers Apr 7, 2023
232ac5b
Remove unusued showAll value
michaelrogers Apr 11, 2023
e1c2a3c
Merge branch 'master' into mct5772-v2
shefalijoshi Apr 24, 2023
185ed82
Removed noCurrent state and isCurrent logic check based on noCurrent
michaelrogers Apr 24, 2023
b4f504d
Merge branch 'master' into mct5772-v2
shefalijoshi May 8, 2023
63fb73c
Set formatted start / end to utc mode to synchronize with current tim…
michaelrogers May 10, 2023
85560a5
Merge branch 'master' of https://github.com/nasa/openmct into mct5772-v2
shefalijoshi Jun 8, 2023
0dff8b0
Add missed file
shefalijoshi Jun 9, 2023
ffad437
Lint fixes
shefalijoshi Jun 9, 2023
ab1b2b5
Formatter improvements to use the Time API and lint fix
michaelrogers Jun 16, 2023
e257666
Merge branch 'master' into mct5772-v2
michaelrogers Jun 16, 2023
f5850b9
Updated test to use Time API formatter instead of moment directly
michaelrogers Jun 16, 2023
2fae902
Linting fix to pluginSpec
michaelrogers Jun 16, 2023
a055c51
Prettier one line
michaelrogers Jun 16, 2023
4e20369
Add activity filter for time bounds
michaelrogers Jun 23, 2023
fa4cccc
Remove error on unmount for HMR
michaelrogers Jun 23, 2023
ab9581e
Include activities that have not concluded before start time
michaelrogers Jun 23, 2023
f76cd80
Merge branch 'master' into mct5772-v2
michaelrogers Jun 23, 2023
7f09606
Remove time format
michaelrogers Jun 23, 2023
3e774de
Lint fixes
michaelrogers Jun 28, 2023
0705ccc
Added check for activities that straddle start/end bounds and externa…
michaelrogers Jul 3, 2023
b829bb7
Merge branch 'master' into mct5772-v2
akhenry Jul 13, 2023
daac1ad
Merge branch 'master' into mct5772-v2
khalidadil Jul 14, 2023
19813ae
Changed the time bounds of timelist tests. This is needed since the n…
shefalijoshi Jul 14, 2023
6997319
Merge branch 'mct5772-v2' of https://github.com/nasa/openmct into mct…
shefalijoshi Jul 14, 2023
ab7cd11
Fix timeformat for timelist to exclude milliseconds
shefalijoshi Jul 14, 2023
99b10ec
Fix time format for timelist activities
shefalijoshi Jul 14, 2023
d7c8591
Merge branch 'master' into mct5772-v2
shefalijoshi Jul 14, 2023
62a163d
Merge branch 'master' into mct5772-v2
khalidadil Jul 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions src/plugins/timelist/Timelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,22 @@ export default {
this.listActivities();
}
},
updateTimestamp(_bounds, isTick) {
updateTimestamp(bounds, isTick) {
if (isTick === true && this.openmct.time.clock() !== undefined) {
this.updateTimeStampAndListActivities(this.openmct.time.clock().currentValue());
} else if (isTick === false && this.openmct.time.clock() === undefined) {
// set the start time for fixed time using the selected bounds start
this.updateTimeStampAndListActivities(bounds.start);
}
},
setViewFromClock(newClock) {
this.filterValue = this.domainObject.configuration.filter;
const isFixedTime = newClock === undefined;
if (isFixedTime) {
this.isRealTime = newClock !== undefined;
if (!this.isRealTime) {
this.hideAll = false;
this.showAll = true;
this.updateTimeStampAndListActivities(this.openmct.time.bounds()?.start);
} else {
this.setSort();
this.setViewBounds();
this.updateTimeStampAndListActivities(this.openmct.time.clock().currentValue());
}
},
Expand Down Expand Up @@ -357,21 +358,24 @@ export default {
this.listActivities();
},
filterActivities(activity, index) {

const hasFilterMatch = this.filterByName(activity.name);

if (hasFilterMatch === false || this.hideAll === true) {
return false;
}

if (this.showAll === true) {
if (this.isEditing && this.showAll) {
return true;
}

//current event or future start event or past end event
const isCurrent = (this.noCurrent === false && this.timestamp >= activity.start && this.timestamp <= activity.end);
const isPast = (this.timestamp > activity.end && (this.viewBounds.pastEnd === undefined || activity.end >= this.viewBounds.pastEnd(this.timestamp)));
const isFuture = (this.timestamp < activity.start && (this.viewBounds.futureStart === undefined || activity.start <= this.viewBounds.futureStart(this.timestamp)));
const isPast = (this.timestamp > activity.end && (this.viewBounds?.pastEnd === undefined || activity.end >= this.viewBounds?.pastEnd(this.timestamp)));
const isFuture = (this.timestamp < activity.start && (this.viewBounds?.futureStart === undefined || activity.start <= this.viewBounds?.futureStart(this.timestamp)));

if (!this.isRealTime) {
return isCurrent || isFuture;
}

return isCurrent || isPast || isFuture;
},
Expand Down