mirror of
https://github.com/nasa/openmct.git
synced 2025-01-02 03:16:41 +00:00
[Timeline] De-namespace capabilities
WTD-1239.
This commit is contained in:
parent
3e0534c4c3
commit
c5b786e5e0
@ -6,7 +6,7 @@ define(
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the `warp.timespan` capability for Activity objects.
|
* Implements the `timespan` capability for Activity objects.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param $q Angular's $q, for promise-handling
|
* @param $q Angular's $q, for promise-handling
|
||||||
@ -33,10 +33,10 @@ define(
|
|||||||
|
|
||||||
// Only applies to timeline objects
|
// Only applies to timeline objects
|
||||||
ActivityTimespanCapability.appliesTo = function (model) {
|
ActivityTimespanCapability.appliesTo = function (model) {
|
||||||
return model && (model.type === 'warp.activity');
|
return model && (model.type === 'activity');
|
||||||
};
|
};
|
||||||
|
|
||||||
return ActivityTimespanCapability;
|
return ActivityTimespanCapability;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -17,7 +17,7 @@ define(
|
|||||||
* Get a list of resource types which have associated
|
* Get a list of resource types which have associated
|
||||||
* costs for this object. Returned values are machine-readable
|
* costs for this object. Returned values are machine-readable
|
||||||
* keys, and should be paired with external metadata for
|
* keys, and should be paired with external metadata for
|
||||||
* presentation (see category of extension `warp.resources`).
|
* presentation (see category of extension `resources`).
|
||||||
* @returns {string[]} resource types
|
* @returns {string[]} resource types
|
||||||
*/
|
*/
|
||||||
resources: function () {
|
resources: function () {
|
||||||
@ -48,9 +48,9 @@ define(
|
|||||||
|
|
||||||
// Only applies to subsystem modes.
|
// Only applies to subsystem modes.
|
||||||
CostCapability.appliesTo = function (model) {
|
CostCapability.appliesTo = function (model) {
|
||||||
return (model || {}).type === 'warp.mode';
|
return (model || {}).type === 'mode';
|
||||||
};
|
};
|
||||||
|
|
||||||
return CostCapability;
|
return CostCapability;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -33,7 +33,7 @@ define(
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Add battery state of charge
|
// Add battery state of charge
|
||||||
if (domainObject.getModel().type === 'warp.timeline' &&
|
if (domainObject.getModel().type === 'timeline' &&
|
||||||
result.power &&
|
result.power &&
|
||||||
domainObject.getModel().capacity > 0) {
|
domainObject.getModel().capacity > 0) {
|
||||||
|
|
||||||
@ -68,11 +68,11 @@ define(
|
|||||||
// Only applies to timeline objects
|
// Only applies to timeline objects
|
||||||
GraphCapability.appliesTo = function (model) {
|
GraphCapability.appliesTo = function (model) {
|
||||||
return model &&
|
return model &&
|
||||||
((model.type === 'warp.timeline') ||
|
((model.type === 'timeline') ||
|
||||||
(model.type === 'warp.activity'));
|
(model.type === 'activity'));
|
||||||
};
|
};
|
||||||
|
|
||||||
return GraphCapability;
|
return GraphCapability;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -59,10 +59,10 @@ define(
|
|||||||
|
|
||||||
// Only applies to timeline objects
|
// Only applies to timeline objects
|
||||||
TimelineTimespanCapability.appliesTo = function (model) {
|
TimelineTimespanCapability.appliesTo = function (model) {
|
||||||
return model && (model.type === 'warp.timeline');
|
return model && (model.type === 'timeline');
|
||||||
};
|
};
|
||||||
|
|
||||||
return TimelineTimespanCapability;
|
return TimelineTimespanCapability;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -189,10 +189,10 @@ define(
|
|||||||
// Only applies to timelines and activities
|
// Only applies to timelines and activities
|
||||||
UtilizationCapability.appliesTo = function (model) {
|
UtilizationCapability.appliesTo = function (model) {
|
||||||
return model &&
|
return model &&
|
||||||
((model.type === 'warp.timeline') ||
|
((model.type === 'timeline') ||
|
||||||
(model.type === 'warp.activity'));
|
(model.type === 'activity'));
|
||||||
};
|
};
|
||||||
|
|
||||||
return UtilizationCapability;
|
return UtilizationCapability;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user