mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 08:25:31 +00:00
[Example] Add domain
Add a second domain to example telemetry, to support addition of a domain selector to the time conductor; nasa/openmctweb#115
This commit is contained in:
parent
0260e6fff4
commit
0b0cee3afb
@ -34,6 +34,10 @@
|
||||
{
|
||||
"key": "time",
|
||||
"name": "Time"
|
||||
},
|
||||
{
|
||||
"key": "yesterday",
|
||||
"name": "Yesterday"
|
||||
}
|
||||
],
|
||||
"ranges": [
|
||||
@ -61,4 +65,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var firstObservedTime = Math.floor(Date.now() / 1000);
|
||||
var ONE_DAY = 1000 * 60 * 60 * 24,
|
||||
firstObservedTime = Math.floor(Date.now() / 1000);
|
||||
|
||||
/**
|
||||
*
|
||||
@ -56,8 +57,8 @@ define(
|
||||
};
|
||||
|
||||
generatorData.getDomainValue = function (i, domain) {
|
||||
return (i + offset) * 1000 +
|
||||
(domain !== 'delta' ? (firstObservedTime * 1000) : 0);
|
||||
return (i + offset) * 1000 + firstObservedTime * 1000 -
|
||||
(domain === 'yesterday' ? ONE_DAY : 0);
|
||||
};
|
||||
|
||||
generatorData.getRangeValue = function (i, range) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user