Skip to content

Commit 59c61e7

Browse files
committed
[Features] Added option to specify a type to exclusively apply the Autoflow view to
1 parent 4ae3557 commit 59c61e7

File tree

2 files changed

+52
-42
lines changed

2 files changed

+52
-42
lines changed

platform/features/autoflow/plugin.js

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,48 @@ define([
77
AutoflowTabularController,
88
MCTAutoflowTable
99
) {
10-
return function (openmct) {
11-
openmct.legacyRegistry.register("platform/features/autoflow", {
12-
"name": "WARP Telemetry Adapter",
13-
"description": "Retrieves telemetry from the WARP Server and provides related types and views.",
14-
"resources": "res",
15-
"extensions": {
16-
"views": [
17-
{
18-
"key": "autoflow",
19-
"name": "Autoflow Tabular",
20-
"cssClass": "icon-packet",
21-
"description": "A tabular view of packet contents.",
22-
"template": autoflowTabularTemplate,
23-
"needs": [
24-
"telemetry"
25-
],
26-
"delegation": true
27-
}
28-
],
29-
"controllers": [
30-
{
31-
"key": "AutoflowTabularController",
32-
"implementation": AutoflowTabularController,
33-
"depends": [
34-
"$scope",
35-
"$timeout",
36-
"telemetrySubscriber"
37-
]
38-
}
39-
],
40-
"directives": [
41-
{
42-
"key": "mctAutoflowTable",
43-
"implementation": MCTAutoflowTable
44-
}
45-
]
46-
}
47-
});
48-
openmct.legacyRegistry.enable("platform/features/autoflow");
10+
return function (options) {
11+
return function (openmct) {
12+
openmct.legacyRegistry.register("platform/features/autoflow", {
13+
"name": "WARP Telemetry Adapter",
14+
"description": "Retrieves telemetry from the WARP Server and provides related types and views.",
15+
"resources": "res",
16+
"extensions": {
17+
"views": [
18+
{
19+
"key": "autoflow",
20+
"name": "Autoflow Tabular",
21+
"cssClass": "icon-packet",
22+
"description": "A tabular view of packet contents.",
23+
"template": autoflowTabularTemplate,
24+
"type": options && options.type,
25+
"needs": [
26+
"telemetry"
27+
],
28+
"delegation": true
29+
}
30+
],
31+
"controllers": [
32+
{
33+
"key": "AutoflowTabularController",
34+
"implementation": AutoflowTabularController,
35+
"depends": [
36+
"$scope",
37+
"$timeout",
38+
"telemetrySubscriber"
39+
]
40+
}
41+
],
42+
"directives": [
43+
{
44+
"key": "mctAutoflowTable",
45+
"implementation": MCTAutoflowTable
46+
}
47+
]
48+
}
49+
});
50+
openmct.legacyRegistry.enable("platform/features/autoflow");
51+
};
4952
};
5053
});
5154

src/plugins/plugins.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,16 @@ define([
5757
};
5858
};
5959

60-
plugins.AutoflowView = function () {
61-
return AutoflowPlugin;
62-
};
60+
/**
61+
* A tabular view showing the latest values of multiple telemetry points at
62+
* once. Formatted so that labels and values are aligned.
63+
*
64+
* @param {Object} [options] Optional settings to apply to the autoflow
65+
* tabular view. Currently supports one option, 'type'.
66+
* @param {string} [options.type] The key of an object type to apply this view
67+
* to exclusively.
68+
*/
69+
plugins.AutoflowView = AutoflowPlugin;
6370

6471
var conductorInstalled = false;
6572

0 commit comments

Comments
 (0)