mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 21:53:08 +00:00
262d35804d
* Display a list of filters that are applied to telemetry objects in a telemetry table. * - Display 'Mixed' if filters have mixed values. - Use table configuration domain object to get composition. * Filter indicator styling WIP - Markup, class names added; - TODO: 'Mixed' and commas to be added via CSS, icon and bg coloring; * Filter indicators styling - CSS, markup; - Added dynamic labeling and titling for mixed/non-mixed filter states; - Theme colors defined and added; - Added new filter icon glyphs for both 16px and 12px fonts; - Revised/normalized font project and glyph file names; * Filter indicators styling - Adding missed Icomoon project file; * Filter indicators styling - Reverting mistakenly changed file; * Filter indicators styling - Minor fix to theme sass; - Sync maelstrom theme; * Fix indentation * Set label and title to empty string initially. * Keep the default snow.
111 lines
2.8 KiB
JavaScript
111 lines
2.8 KiB
JavaScript
define([
|
|
'lodash'
|
|
], function (
|
|
_
|
|
) {
|
|
|
|
var METADATA_BY_TYPE = {
|
|
'generator': {
|
|
values: [
|
|
{
|
|
key: "name",
|
|
name: "Name"
|
|
},
|
|
{
|
|
key: "utc",
|
|
name: "Time",
|
|
format: "utc",
|
|
hints: {
|
|
domain: 1
|
|
}
|
|
},
|
|
{
|
|
key: "yesterday",
|
|
name: "Yesterday",
|
|
format: "utc",
|
|
hints: {
|
|
domain: 2
|
|
}
|
|
},
|
|
{
|
|
key: "sin",
|
|
name: "Sine",
|
|
formatString: '%0.2f',
|
|
hints: {
|
|
range: 1
|
|
}
|
|
},
|
|
{
|
|
key: "cos",
|
|
name: "Cosine",
|
|
formatString: '%0.2f',
|
|
hints: {
|
|
range: 2
|
|
}
|
|
}
|
|
]
|
|
},
|
|
'example.state-generator': {
|
|
values: [
|
|
{
|
|
key: "name",
|
|
name: "Name"
|
|
},
|
|
{
|
|
key: "utc",
|
|
name: "Time",
|
|
format: "utc",
|
|
hints: {
|
|
domain: 1
|
|
}
|
|
},
|
|
{
|
|
key: "state",
|
|
source: "value",
|
|
name: "State",
|
|
format: "enum",
|
|
enumerations: [
|
|
{
|
|
value: 0,
|
|
string: "OFF"
|
|
},
|
|
{
|
|
value: 1,
|
|
string: "ON"
|
|
}
|
|
],
|
|
hints: {
|
|
range: 1
|
|
}
|
|
},
|
|
{
|
|
key: "value",
|
|
name: "Value",
|
|
hints: {
|
|
range: 2
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
function GeneratorMetadataProvider() {
|
|
|
|
}
|
|
|
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
|
return METADATA_BY_TYPE.hasOwnProperty(domainObject.type);
|
|
};
|
|
|
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
|
return _.extend(
|
|
{},
|
|
domainObject.telemetry,
|
|
METADATA_BY_TYPE[domainObject.type]
|
|
);
|
|
};
|
|
|
|
return GeneratorMetadataProvider;
|
|
|
|
});
|