2016-02-26 19:09:51 +00:00
|
|
|
/*****************************************************************************
|
2017-04-05 21:35:12 +00:00
|
|
|
* Open MCT, Copyright (c) 2014-2017, United States Government
|
2016-02-26 19:09:51 +00:00
|
|
|
* as represented by the Administrator of the National Aeronautics and Space
|
|
|
|
* Administration. All rights reserved.
|
|
|
|
*
|
2016-07-12 23:21:58 +00:00
|
|
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
2016-02-26 19:09:51 +00:00
|
|
|
* "License"); you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
2016-07-12 23:21:58 +00:00
|
|
|
* Open MCT includes source code licensed under additional open source
|
2016-02-26 19:09:51 +00:00
|
|
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
|
|
* this source code distribution or the Licensing information page available
|
|
|
|
* at runtime from the About dialog for additional information.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
define([
|
|
|
|
"./src/directives/MCTTable",
|
2016-12-07 02:04:47 +00:00
|
|
|
"./src/controllers/TelemetryTableController",
|
2016-02-26 19:09:51 +00:00
|
|
|
"./src/controllers/TableOptionsController",
|
|
|
|
'../../commonUI/regions/src/Region',
|
|
|
|
'../../commonUI/browse/src/InspectorRegion',
|
2016-09-30 17:25:22 +00:00
|
|
|
"text!./res/templates/table-options-edit.html",
|
2016-12-07 02:04:47 +00:00
|
|
|
"text!./res/templates/telemetry-table.html",
|
2016-02-26 19:09:51 +00:00
|
|
|
"legacyRegistry"
|
|
|
|
], function (
|
|
|
|
MCTTable,
|
2016-12-07 02:04:47 +00:00
|
|
|
TelemetryTableController,
|
2016-02-26 19:09:51 +00:00
|
|
|
TableOptionsController,
|
|
|
|
Region,
|
|
|
|
InspectorRegion,
|
2016-09-30 17:25:22 +00:00
|
|
|
tableOptionsEditTemplate,
|
2016-12-07 02:04:47 +00:00
|
|
|
telemetryTableTemplate,
|
2016-02-26 19:09:51 +00:00
|
|
|
legacyRegistry
|
|
|
|
) {
|
|
|
|
/**
|
|
|
|
* Two region parts are defined here. One that appears only in browse
|
|
|
|
* mode, and one that appears only in edit mode. For not they both point
|
|
|
|
* to the same representation, but a different key could be used here to
|
|
|
|
* include a customized representation for edit mode.
|
|
|
|
*/
|
|
|
|
var tableInspector = new InspectorRegion(),
|
|
|
|
tableOptionsEditRegion = new Region({
|
|
|
|
name: "table-options",
|
|
|
|
title: "Table Options",
|
|
|
|
modes: ['edit'],
|
|
|
|
content: {
|
|
|
|
key: "table-options-edit"
|
|
|
|
}
|
|
|
|
});
|
|
|
|
tableInspector.addRegion(tableOptionsEditRegion);
|
|
|
|
|
|
|
|
legacyRegistry.register("platform/features/table", {
|
|
|
|
"extensions": {
|
|
|
|
"types": [
|
|
|
|
{
|
|
|
|
"key": "table",
|
2016-12-07 02:04:47 +00:00
|
|
|
"name": "Telemetry Table",
|
2017-02-22 01:22:36 +00:00
|
|
|
"cssClass": "icon-tabular-realtime",
|
2016-12-07 02:04:47 +00:00
|
|
|
"description": "A table of values over a given time period. The table will be automatically updated with new values as they become available",
|
2016-03-24 19:05:10 +00:00
|
|
|
"priority": 861,
|
2016-02-26 19:09:51 +00:00
|
|
|
"features": "creation",
|
|
|
|
"delegates": [
|
|
|
|
"telemetry"
|
|
|
|
],
|
2017-12-07 21:04:46 +00:00
|
|
|
"inspector": "table-options-edit",
|
2016-02-26 19:09:51 +00:00
|
|
|
"contains": [
|
|
|
|
{
|
|
|
|
"has": "telemetry"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"model": {
|
|
|
|
"composition": []
|
|
|
|
},
|
|
|
|
"views": [
|
|
|
|
"table"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"controllers": [
|
|
|
|
{
|
2016-12-07 02:04:47 +00:00
|
|
|
"key": "TelemetryTableController",
|
|
|
|
"implementation": TelemetryTableController,
|
2016-12-17 00:34:41 +00:00
|
|
|
"depends": ["$scope", "$timeout", "openmct"]
|
2016-03-02 17:16:46 +00:00
|
|
|
},
|
2016-02-26 19:09:51 +00:00
|
|
|
{
|
|
|
|
"key": "TableOptionsController",
|
|
|
|
"implementation": TableOptionsController,
|
|
|
|
"depends": ["$scope"]
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
"views": [
|
|
|
|
{
|
2016-12-07 02:04:47 +00:00
|
|
|
"name": "Telemetry Table",
|
2016-02-26 19:09:51 +00:00
|
|
|
"key": "table",
|
2017-02-15 23:02:39 +00:00
|
|
|
"cssClass": "icon-tabular-realtime",
|
2016-12-07 02:04:47 +00:00
|
|
|
"template": telemetryTableTemplate,
|
2016-03-02 17:16:46 +00:00
|
|
|
"needs": [
|
|
|
|
"telemetry"
|
|
|
|
],
|
|
|
|
"delegation": true,
|
2016-05-23 23:48:31 +00:00
|
|
|
"editable": false
|
2016-02-26 19:09:51 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"directives": [
|
|
|
|
{
|
|
|
|
"key": "mctTable",
|
|
|
|
"implementation": MCTTable,
|
|
|
|
"depends": ["$timeout"]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"representations": [
|
|
|
|
{
|
|
|
|
"key": "table-options-edit",
|
2016-09-30 17:25:22 +00:00
|
|
|
"template": tableOptionsEditTemplate
|
2016-02-26 19:09:51 +00:00
|
|
|
}
|
2016-04-22 16:44:34 +00:00
|
|
|
],
|
|
|
|
"stylesheets": [
|
|
|
|
{
|
|
|
|
"stylesheetUrl": "css/table.css",
|
|
|
|
"priority": "mandatory"
|
|
|
|
}
|
2016-02-26 19:09:51 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|