Merge remote-tracking branch 'github/master' into open477

Resolve conflicts to complete merge of #477

Conflicts:
	platform/commonUI/general/bundle.json
	platform/commonUI/themes/espresso/res/css/theme-espresso.css
	platform/commonUI/themes/snow/res/css/theme-snow.css
This commit is contained in:
Victor Woeltjen
2016-01-27 12:53:46 -08:00
225 changed files with 10800 additions and 5816 deletions

View File

@@ -0,0 +1,253 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/indicators/ClockIndicator",
"./src/services/TickerService",
"./src/controllers/ClockController",
"./src/controllers/TimerController",
"./src/controllers/RefreshingController",
"./src/actions/StartTimerAction",
"./src/actions/RestartTimerAction",
'legacyRegistry'
], function (
ClockIndicator,
TickerService,
ClockController,
TimerController,
RefreshingController,
StartTimerAction,
RestartTimerAction,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/clock", {
"name": "Clocks/Timers",
"descriptions": "Domain objects for displaying current & relative times.",
"configuration": {
"paths": {
"moment-duration-format": "moment-duration-format"
},
"shim": {
"moment-duration-format": {
"deps": [
"moment"
]
}
}
},
"extensions": {
"constants": [
{
"key": "CLOCK_INDICATOR_FORMAT",
"value": "YYYY/MM/DD HH:mm:ss"
}
],
"indicators": [
{
"implementation": ClockIndicator,
"depends": [
"tickerService",
"CLOCK_INDICATOR_FORMAT"
],
"priority": "preferred"
}
],
"services": [
{
"key": "tickerService",
"implementation": TickerService,
"depends": [
"$timeout",
"now"
]
}
],
"controllers": [
{
"key": "ClockController",
"implementation": ClockController,
"depends": [
"$scope",
"tickerService"
]
},
{
"key": "TimerController",
"implementation": TimerController,
"depends": [
"$scope",
"$window",
"now"
]
},
{
"key": "RefreshingController",
"implementation": RefreshingController,
"depends": [
"$scope",
"tickerService"
]
}
],
"views": [
{
"key": "clock",
"type": "clock",
"editable": false,
"templateUrl": "templates/clock.html"
},
{
"key": "timer",
"type": "timer",
"editable": false,
"templateUrl": "templates/timer.html"
}
],
"actions": [
{
"key": "timer.start",
"implementation": StartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Start",
"glyph": "ï",
"priority": "preferred"
},
{
"key": "timer.restart",
"implementation": RestartTimerAction,
"depends": [
"now"
],
"category": "contextual",
"name": "Restart at 0",
"glyph": "r",
"priority": "preferred"
}
],
"types": [
{
"key": "clock",
"name": "Clock",
"glyph": "C",
"features": [
"creation"
],
"properties": [
{
"key": "clockFormat",
"name": "Display Format",
"control": "composite",
"items": [
{
"control": "select",
"options": [
{
"value": "YYYY/MM/DD hh:mm:ss",
"name": "YYYY/MM/DD hh:mm:ss"
},
{
"value": "YYYY/DDD hh:mm:ss",
"name": "YYYY/DDD hh:mm:ss"
},
{
"value": "hh:mm:ss",
"name": "hh:mm:ss"
}
]
},
{
"control": "select",
"options": [
{
"value": "clock12",
"name": "12hr"
},
{
"value": "clock24",
"name": "24hr"
}
]
}
]
}
],
"model": {
"clockFormat": [
"YYYY/MM/DD hh:mm:ss",
"clock12"
]
}
},
{
"key": "timer",
"name": "Timer",
"glyph": "õ",
"features": [
"creation"
],
"properties": [
{
"key": "timestamp",
"control": "datetime",
"name": "Target"
},
{
"key": "timerFormat",
"control": "select",
"options": [
{
"value": "long",
"name": "DDD hh:mm:ss"
},
{
"value": "short",
"name": "hh:mm:ss"
}
]
}
],
"model": {
"timerFormat": "DDD hh:mm:ss"
}
}
],
"licenses": [
{
"name": "moment-duration-format",
"version": "1.3.0",
"author": "John Madhavan-Reese",
"description": "Duration parsing/formatting",
"website": "https://github.com/jsmreese/moment-duration-format",
"copyright": "Copyright 2014 John Madhavan-Reese",
"license": "license-mit",
"link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE"
}
]
}
});
});

View File

@@ -1,178 +0,0 @@
{
"name": "Clocks/Timers",
"descriptions": "Domain objects for displaying current & relative times.",
"configuration": {
"paths": {
"moment-duration-format": "moment-duration-format"
},
"shim": {
"moment-duration-format": {
"deps": [ "moment" ]
}
}
},
"extensions": {
"constants": [
{
"key": "CLOCK_INDICATOR_FORMAT",
"value": "YYYY/MM/DD HH:mm:ss"
}
],
"indicators": [
{
"implementation": "indicators/ClockIndicator.js",
"depends": [ "tickerService", "CLOCK_INDICATOR_FORMAT" ],
"priority": "preferred"
}
],
"services": [
{
"key": "tickerService",
"implementation": "services/TickerService.js",
"depends": [ "$timeout", "now" ]
}
],
"controllers": [
{
"key": "ClockController",
"implementation": "controllers/ClockController.js",
"depends": [ "$scope", "tickerService" ]
},
{
"key": "TimerController",
"implementation": "controllers/TimerController.js",
"depends": [ "$scope", "$window", "now" ]
},
{
"key": "RefreshingController",
"implementation": "controllers/RefreshingController.js",
"depends": [ "$scope", "tickerService" ]
}
],
"views": [
{
"key": "clock",
"type": "clock",
"templateUrl": "templates/clock.html"
},
{
"key": "timer",
"type": "timer",
"templateUrl": "templates/timer.html"
}
],
"actions": [
{
"key": "timer.start",
"implementation": "actions/StartTimerAction.js",
"depends": ["now"],
"category": "contextual",
"name": "Start",
"glyph": "\u00EF",
"priority": "preferred"
},
{
"key": "timer.restart",
"implementation": "actions/RestartTimerAction.js",
"depends": ["now"],
"category": "contextual",
"name": "Restart at 0",
"glyph": "r",
"priority": "preferred"
}
],
"types": [
{
"key": "clock",
"name": "Clock",
"glyph": "C",
"features": [ "creation" ],
"properties": [
{
"key": "clockFormat",
"name": "Display Format",
"control": "composite",
"items": [
{
"control": "select",
"options": [
{
"value": "YYYY/MM/DD hh:mm:ss",
"name": "YYYY/MM/DD hh:mm:ss"
},
{
"value": "YYYY/DDD hh:mm:ss",
"name": "YYYY/DDD hh:mm:ss"
},
{
"value": "hh:mm:ss",
"name": "hh:mm:ss"
}
]
},
{
"control": "select",
"options": [
{
"value": "clock12",
"name": "12hr"
},
{
"value": "clock24",
"name": "24hr"
}
]
}
]
}
],
"model": {
"clockFormat": [ "YYYY/MM/DD hh:mm:ss", "clock12" ]
}
},
{
"key": "timer",
"name": "Timer",
"glyph": "\u00F5",
"features": [ "creation" ],
"properties": [
{
"key": "timestamp",
"control": "datetime",
"name": "Target"
},
{
"key": "timerFormat",
"control": "select",
"options": [
{
"value": "long",
"name": "DDD hh:mm:ss"
},
{
"value": "short",
"name": "hh:mm:ss"
}
]
}
],
"model": {
"timerFormat": "DDD hh:mm:ss"
}
}
],
"licenses": [
{
"name": "moment-duration-format",
"version": "1.3.0",
"author": "John Madhavan-Reese",
"description": "Duration parsing/formatting",
"website": "https://github.com/jsmreese/moment-duration-format",
"copyright": "Copyright 2014 John Madhavan-Reese",
"license": "license-mit",
"link": "https://github.com/jsmreese/moment-duration-format/blob/master/LICENSE"
}
]
}
}

View File

@@ -19,10 +19,18 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/*global define,requirejs*/
requirejs.config({
shim: {
'platform/features/clock/lib/moment-duration-format': {
deps: [ 'moment' ]
}
}
});
define(
['moment', 'moment-duration-format'],
['moment', '../../lib/moment-duration-format'],
function (moment) {
"use strict";

View File

@@ -0,0 +1,92 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/ConductorRepresenter",
"./src/ConductorTelemetryDecorator",
"./src/ConductorService",
'legacyRegistry'
], function (
ConductorRepresenter,
ConductorTelemetryDecorator,
ConductorService,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/conductor", {
"extensions": {
"representers": [
{
"implementation": ConductorRepresenter,
"depends": [
"throttle",
"conductorService",
"$compile",
"views[]"
]
}
],
"components": [
{
"type": "decorator",
"provides": "telemetryService",
"implementation": ConductorTelemetryDecorator,
"depends": [
"conductorService"
]
}
],
"services": [
{
"key": "conductorService",
"implementation": ConductorService,
"depends": [
"now",
"TIME_CONDUCTOR_DOMAINS"
]
}
],
"templates": [
{
"key": "time-conductor",
"templateUrl": "templates/time-conductor.html"
}
],
"constants": [
{
"key": "TIME_CONDUCTOR_DOMAINS",
"value": [
{
"key": "time",
"name": "UTC",
"format": "utc"
}
],
"priority": "fallback",
"comment": "Placeholder; to be replaced by inspection of available domains."
}
]
}
});
});

View File

@@ -1,46 +0,0 @@
{
"extensions": {
"representers": [
{
"implementation": "ConductorRepresenter.js",
"depends": [
"throttle",
"conductorService",
"$compile",
"views[]"
]
}
],
"components": [
{
"type": "decorator",
"provides": "telemetryService",
"implementation": "ConductorTelemetryDecorator.js",
"depends": [ "conductorService" ]
}
],
"services": [
{
"key": "conductorService",
"implementation": "ConductorService.js",
"depends": [ "now", "TIME_CONDUCTOR_DOMAINS" ]
}
],
"templates": [
{
"key": "time-conductor",
"templateUrl": "templates/time-conductor.html"
}
],
"constants": [
{
"key": "TIME_CONDUCTOR_DOMAINS",
"value": [
{ "key": "time", "name": "UTC", "format": "utc" }
],
"priority": "fallback",
"comment": "Placeholder; to be replaced by inspection of available domains."
}
]
}
}

View File

@@ -30,7 +30,7 @@ define(
"<mct-include key=\"'time-conductor'\" ",
"ng-model='ngModel' ",
"parameters='parameters' ",
"class='l-time-controller'>",
"class='holder flex-elem flex-fixed l-time-controller'>",
"</mct-include>"
].join(''),
THROTTLE_MS = 200,
@@ -159,8 +159,8 @@ define(
this.wireScope();
this.conductorElement =
this.$compile(TEMPLATE)(this.conductorScope());
this.element.after(this.conductorElement[0]);
this.element.addClass('l-controls-visible l-time-controller-visible');
this.element.parent().parent().after(this.conductorElement[0]);
this.element.parent().parent().addClass('l-controls-visible l-time-controller-visible');
GLOBAL_SHOWING = true;
}
};

View File

@@ -19,7 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,describe,it,expect,beforeEach,waitsFor,afterEach,jasmine*/
/*global define,describe,xdescribe,it,expect,beforeEach,
waitsFor,afterEach,jasmine*/
define(
["../src/ConductorRepresenter", "./TestTimeConductor"],
@@ -40,10 +41,11 @@ define(
'removeClass',
'css',
'after',
'remove'
'remove',
'parent'
];
describe("ConductorRepresenter", function () {
xdescribe("ConductorRepresenter", function () {
var mockThrottle,
mockConductorService,
mockCompile,
@@ -74,6 +76,7 @@ define(
testViews = [ { someKey: "some value" } ];
mockScope = jasmine.createSpyObj('scope', SCOPE_METHODS);
mockElement = jasmine.createSpyObj('element', ELEMENT_METHODS);
mockElement.parent.andReturn(mockElement);
mockConductor = new TestTimeConductor();
mockCompiledTemplate = jasmine.createSpy('template');
mockNewScope = jasmine.createSpyObj('newScope', SCOPE_METHODS);

View File

@@ -0,0 +1,81 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/EventListController",
"./src/directives/MCTDataTable",
"./src/policies/MessagesViewPolicy",
'legacyRegistry'
], function (
EventListController,
MCTDataTable,
MessagesViewPolicy,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/events", {
"name": "Event Messages",
"description": "List of time-ordered event messages",
"extensions": {
"views": [
{
"key": "messages",
"name": "Messages",
"glyph": "5",
"description": "Scrolling list of messages.",
"templateUrl": "templates/messages.html",
"needs": [
"telemetry"
],
"delegation": true
}
],
"controllers": [
{
"key": "EventListController",
"implementation": EventListController,
"depends": [
"$scope",
"telemetryFormatter"
]
}
],
"directives": [
{
"key": "mctDataTable",
"implementation": MCTDataTable,
"depends": [
"$window"
]
}
],
"policies": [
{
"category": "view",
"implementation": MessagesViewPolicy
}
]
}
});
});

View File

@@ -1,37 +0,0 @@
{
"name": "Event Messages",
"description": "List of time-ordered event messages",
"extensions": {
"views": [
{
"key": "messages",
"name": "Messages",
"glyph": "5",
"description": "Scrolling list of messages.",
"templateUrl": "templates/messages.html",
"needs": [ "telemetry" ],
"delegation": true
}
],
"controllers": [
{
"key": "EventListController",
"implementation": "EventListController.js",
"depends": [ "$scope", "telemetryFormatter" ]
}
],
"directives": [
{
"key": "mctDataTable",
"implementation": "directives/MCTDataTable.js",
"depends": [ "$window" ]
}
],
"policies": [
{
"category": "view",
"implementation": "policies/MessagesViewPolicy.js"
}
]
}
}

View File

@@ -0,0 +1,80 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/policies/ImageryViewPolicy",
"./src/controllers/ImageryController",
"./src/directives/MCTBackgroundImage",
'legacyRegistry'
], function (
ImageryViewPolicy,
ImageryController,
MCTBackgroundImage,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/imagery", {
"name": "Plot view for telemetry",
"extensions": {
"views": [
{
"name": "Imagery",
"key": "imagery",
"glyph": "ã",
"templateUrl": "templates/imagery.html",
"priority": "preferred",
"needs": [
"telemetry"
],
"editable": false
}
],
"policies": [
{
"category": "view",
"implementation": ImageryViewPolicy
}
],
"controllers": [
{
"key": "ImageryController",
"implementation": ImageryController,
"depends": [
"$scope",
"telemetryHandler"
]
}
],
"directives": [
{
"key": "mctBackgroundImage",
"implementation": MCTBackgroundImage,
"depends": [
"$document"
]
}
]
}
});
});

View File

@@ -1,35 +0,0 @@
{
"name": "Plot view for telemetry",
"extensions": {
"views": [
{
"name": "Imagery",
"key": "imagery",
"glyph": "\u00E3",
"templateUrl": "templates/imagery.html",
"priority": "preferred",
"needs": [ "telemetry" ]
}
],
"policies": [
{
"category": "view",
"implementation": "policies/ImageryViewPolicy.js"
}
],
"controllers": [
{
"key": "ImageryController",
"implementation": "controllers/ImageryController.js",
"depends": [ "$scope", "telemetryHandler" ]
}
],
"directives": [
{
"key": "mctBackgroundImage",
"implementation": "directives/MCTBackgroundImage.js",
"depends": [ "$document" ]
}
]
}
}

View File

@@ -0,0 +1,320 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/LayoutController",
"./src/FixedController",
"./src/LayoutCompositionPolicy",
'legacyRegistry'
], function (
LayoutController,
FixedController,
LayoutCompositionPolicy,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/layout", {
"name": "Layout components.",
"description": "Plug in adding Layout capabilities.",
"extensions": {
"views": [
{
"key": "layout",
"name": "Display Layout",
"glyph": "L",
"type": "layout",
"templateUrl": "templates/layout.html",
"editable": true,
"uses": []
},
{
"key": "fixed",
"name": "Fixed Position",
"glyph": "3",
"type": "telemetry.panel",
"templateUrl": "templates/fixed.html",
"uses": [
"composition"
],
"gestures": [
"drop"
],
"toolbar": {
"sections": [
{
"items": [
{
"method": "add",
"glyph": "+",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Box",
"glyph": "à",
"key": "fixed.box"
},
{
"name": "Line",
"glyph": "â",
"key": "fixed.line"
},
{
"name": "Text",
"glyph": "ä",
"key": "fixed.text"
},
{
"name": "Image",
"glyph": "ã",
"key": "fixed.image"
}
]
}
]
},
{
"items": [
{
"method": "order",
"glyph": "á",
"control": "menu-button",
"options": [
{
"name": "Move to Top",
"glyph": "^",
"key": "top"
},
{
"name": "Move Up",
"glyph": "^",
"key": "up"
},
{
"name": "Move Down",
"glyph": "v",
"key": "down"
},
{
"name": "Move to Bottom",
"glyph": "v",
"key": "bottom"
}
]
},
{
"property": "fill",
"glyph": "",
"control": "color"
},
{
"property": "stroke",
"glyph": "â",
"control": "color"
},
{
"property": "color",
"glyph": "ä",
"mandatory": true,
"control": "color"
},
{
"property": "url",
"glyph": "ã",
"control": "dialog-button",
"title": "Image Properties",
"dialog": {
"control": "textfield",
"name": "Image URL",
"required": true
}
},
{
"property": "text",
"glyph": "G",
"control": "dialog-button",
"title": "Text Properties",
"dialog": {
"control": "textfield",
"name": "Text",
"required": true
}
},
{
"method": "showTitle",
"glyph": "ç",
"control": "button",
"description": "Show telemetry element title."
},
{
"method": "hideTitle",
"glyph": "å",
"control": "button",
"description": "Hide telemetry element title."
}
]
},
{
"items": [
{
"method": "remove",
"control": "button",
"glyph": "Z"
}
]
}
]
}
}
],
"representations": [
{
"key": "frame",
"templateUrl": "templates/frame.html"
}
],
"controllers": [
{
"key": "LayoutController",
"implementation": LayoutController,
"depends": [
"$scope"
]
},
{
"key": "FixedController",
"implementation": FixedController,
"depends": [
"$scope",
"$q",
"dialogService",
"telemetryHandler",
"telemetryFormatter",
"throttle"
]
}
],
"templates": [
{
"key": "fixed.telemetry",
"templateUrl": "templates/elements/telemetry.html"
},
{
"key": "fixed.box",
"templateUrl": "templates/elements/box.html"
},
{
"key": "fixed.line",
"templateUrl": "templates/elements/line.html"
},
{
"key": "fixed.text",
"templateUrl": "templates/elements/text.html"
},
{
"key": "fixed.image",
"templateUrl": "templates/elements/image.html"
}
],
"policies": [
{
"category": "composition",
"implementation": LayoutCompositionPolicy
}
],
"types": [
{
"key": "layout",
"name": "Display Layout",
"glyph": "L",
"description": "A layout in which multiple telemetry panels may be displayed.",
"features": "creation",
"model": {
"composition": []
},
"properties": [
{
"name": "Layout Grid",
"control": "composite",
"pattern": "^(\\d*[1-9]\\d*)?$",
"items": [
{
"name": "Horizontal grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
},
{
"name": "Vertical grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
}
],
"key": "layoutGrid",
"conversion": "number[]"
}
]
},
{
"key": "telemetry.panel",
"name": "Telemetry Panel",
"glyph": "t",
"description": "A panel for collecting telemetry elements.",
"delegates": [
"telemetry"
],
"features": "creation",
"contains": [
{
"has": "telemetry"
}
],
"model": {
"composition": []
},
"properties": [
{
"name": "Layout Grid",
"control": "composite",
"items": [
{
"name": "Horizontal grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
},
{
"name": "Vertical grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
}
],
"pattern": "^(\\d*[1-9]\\d*)?$",
"property": "layoutGrid",
"conversion": "number[]"
}
]
}
]
}
});
});

View File

@@ -1,267 +0,0 @@
{
"name": "Layout components.",
"description": "Plug in adding Layout capabilities.",
"extensions": {
"views": [
{
"key": "layout",
"name": "Display Layout",
"glyph": "L",
"type": "layout",
"templateUrl": "templates/layout.html",
"uses": [],
"gestures": [ "drop" ]
},
{
"key": "fixed",
"name": "Fixed Position",
"glyph": "3",
"type": "telemetry.panel",
"templateUrl": "templates/fixed.html",
"uses": [ "composition" ],
"gestures": [ "drop" ],
"toolbar": {
"sections": [
{
"items": [
{
"method": "add",
"glyph": "+",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Box",
"glyph": "\u00E0",
"key": "fixed.box"
},
{
"name": "Line",
"glyph": "\u00E2",
"key": "fixed.line"
},
{
"name": "Text",
"glyph": "\u00E4",
"key": "fixed.text"
},
{
"name": "Image",
"glyph": "\u00E3",
"key": "fixed.image"
}
]
}
]
},
{
"items": [
{
"method": "order",
"glyph": "\u00E1",
"control": "menu-button",
"options": [
{
"name": "Move to Top",
"glyph": "^",
"key": "top"
},
{
"name": "Move Up",
"glyph": "^",
"key": "up"
},
{
"name": "Move Down",
"glyph": "v",
"key": "down"
},
{
"name": "Move to Bottom",
"glyph": "v",
"key": "bottom"
}
]
},
{
"property": "fill",
"glyph": "\ue606",
"control": "color"
},
{
"property": "stroke",
"glyph": "\u00E2",
"control": "color"
},
{
"property": "color",
"glyph": "\u00E4",
"mandatory": true,
"control": "color"
},
{
"property": "url",
"glyph": "\u00E3",
"control": "dialog-button",
"title": "Image Properties",
"dialog": {
"control": "textfield",
"name": "Image URL",
"required": true
}
},
{
"property": "text",
"glyph": "G",
"control": "dialog-button",
"title": "Text Properties",
"dialog": {
"control": "textfield",
"name": "Text",
"required": true
}
},
{
"method": "showTitle",
"glyph": "\u00E7",
"control": "button",
"description": "Show telemetry element title."
},
{
"method": "hideTitle",
"glyph": "\u00E5",
"control": "button",
"description": "Hide telemetry element title."
}
]
},
{
"items": [
{
"method": "remove",
"control": "button",
"glyph": "Z"
}
]
}
]
}
}
],
"representations": [
{
"key": "frame",
"templateUrl": "templates/frame.html"
}
],
"controllers": [
{
"key": "LayoutController",
"implementation": "LayoutController.js",
"depends": [ "$scope" ]
},
{
"key": "FixedController",
"implementation": "FixedController.js",
"depends": [
"$scope",
"$q",
"dialogService",
"telemetryHandler",
"telemetryFormatter",
"throttle"
]
}
],
"templates": [
{
"key": "fixed.telemetry",
"templateUrl": "templates/elements/telemetry.html"
},
{
"key": "fixed.box",
"templateUrl": "templates/elements/box.html"
},
{
"key": "fixed.line",
"templateUrl": "templates/elements/line.html"
},
{
"key": "fixed.text",
"templateUrl": "templates/elements/text.html"
},
{
"key": "fixed.image",
"templateUrl": "templates/elements/image.html"
}
],
"policies": [
{
"category": "composition",
"implementation": "LayoutCompositionPolicy.js"
}
],
"types": [
{
"key": "layout",
"name": "Display Layout",
"glyph": "L",
"description": "A layout in which multiple telemetry panels may be displayed.",
"features": "creation",
"model": { "composition": [] },
"properties": [
{
"name": "Layout Grid",
"control": "composite",
"pattern": "^(\\d*[1-9]\\d*)?$",
"items": [
{
"name": "Horizontal grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
},
{
"name": "Vertical grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
}
],
"key": "layoutGrid",
"conversion": "number[]"
}
]
},
{
"key": "telemetry.panel",
"name": "Telemetry Panel",
"glyph": "t",
"description": "A panel for collecting telemetry elements.",
"delegates": [ "telemetry" ],
"features": "creation",
"contains": [ { "has": "telemetry" } ],
"model": { "composition": [] },
"properties": [
{
"name": "Layout Grid",
"control": "composite",
"items": [
{
"name": "Horizontal grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
},
{
"name": "Vertical grid (px)",
"control": "textfield",
"cssclass": "l-small l-numeric"
}
],
"pattern": "^(\\d*[1-9]\\d*)?$",
"property": "layoutGrid",
"conversion": "number[]"
}
]
}
]
}
}

View File

@@ -31,7 +31,6 @@
mct-object="childObject">
</mct-representation>
</div>
<!-- Drag handles -->
<span ng-show="domainObject.hasCapability('editor')">

View File

@@ -273,12 +273,15 @@ define(
}
// Position a panel after a drop event
function handleDrop(e, id, position) {
function handleDrop(e, id, position, editableDomainObject) {
// Don't handle this event if it has already been handled
// color is set to "" to let the CSS theme determine the default color
if (e.defaultPrevented) {
return;
}
if (editableDomainObject){
$scope.setEditable(editableDomainObject);
}
e.preventDefault();
// Store the position of this element.
addElement({

View File

@@ -62,10 +62,15 @@ define(
}
// Position a panel after a drop event
function handleDrop(e, id, position) {
//An editableDomainObject is provided, as the drop may have
// triggered a transition to edit mode.
function handleDrop(e, id, position, editableDomainObject) {
if (e.defaultPrevented) {
return;
}
if (editableDomainObject){
$scope.setEditable(editableDomainObject);
}
// Ensure that configuration field is populated
$scope.configuration = $scope.configuration || {};
// Make sure there is a "panels" field in the

View File

@@ -0,0 +1,75 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/EmbeddedPageController",
'legacyRegistry'
], function (
EmbeddedPageController,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/pages", {
"extensions": {
"types": [
{
"key": "example.page",
"name": "Web Page",
"glyph": "ê",
"description": "A component to display a web page or image with a valid URL. Can be added to a Display Layout.",
"features": [
"creation"
],
"properties": [
{
"key": "url",
"name": "URL",
"control": "textfield",
"pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$",
"required": true
}
]
}
],
"views": [
{
"templateUrl": "iframe.html",
"name": "Page",
"type": "example.page",
"key": "example.page",
"editable": false
}
],
"controllers": [
{
"key": "EmbeddedPageController",
"implementation": EmbeddedPageController,
"depends": [
"$sce"
]
}
]
}
});
});

View File

@@ -1,37 +0,0 @@
{
"extensions": {
"types": [
{
"key": "example.page",
"name": "Web Page",
"glyph": "\u00EA",
"description": "A component to display a web page or image with a valid URL. Can be added to a Display Layout.",
"features": [ "creation" ],
"properties": [
{
"key": "url",
"name": "URL",
"control": "textfield",
"pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$",
"required": true
}
]
}
],
"views": [
{
"templateUrl": "iframe.html",
"name": "Page",
"type": "example.page",
"key": "example.page"
}
],
"controllers": [
{
"key": "EmbeddedPageController",
"implementation": "EmbeddedPageController.js",
"depends": ["$sce"]
}
]
}
}

View File

@@ -0,0 +1,92 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/MCTChart",
"./src/PlotController",
"./src/policies/PlotViewPolicy",
'legacyRegistry'
], function (
MCTChart,
PlotController,
PlotViewPolicy,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/plot", {
"name": "Plot view for telemetry",
"extensions": {
"views": [
{
"name": "Plot",
"key": "plot",
"glyph": "6",
"templateUrl": "templates/plot.html",
"needs": [
"telemetry"
],
"priority": "preferred",
"delegation": true
}
],
"directives": [
{
"key": "mctChart",
"implementation": MCTChart,
"depends": [
"$interval",
"$log"
]
}
],
"controllers": [
{
"key": "PlotController",
"implementation": PlotController,
"depends": [
"$scope",
"telemetryFormatter",
"telemetryHandler",
"throttle",
"PLOT_FIXED_DURATION"
]
}
],
"constants": [
{
"key": "PLOT_FIXED_DURATION",
"value": 900000,
"priority": "fallback",
"comment": "Fifteen minutes."
}
],
"policies": [
{
"category": "view",
"implementation": PlotViewPolicy
}
]
}
});
});

View File

@@ -1,50 +0,0 @@
{
"name": "Plot view for telemetry",
"extensions": {
"views": [
{
"name": "Plot",
"key": "plot",
"glyph": "6",
"templateUrl": "templates/plot.html",
"needs": [ "telemetry" ],
"priority": "preferred",
"delegation": true
}
],
"directives": [
{
"key": "mctChart",
"implementation": "MCTChart.js",
"depends": [ "$interval", "$log" ]
}
],
"controllers": [
{
"key": "PlotController",
"implementation": "PlotController.js",
"depends": [
"$scope",
"telemetryFormatter",
"telemetryHandler",
"throttle",
"PLOT_FIXED_DURATION"
]
}
],
"constants": [
{
"key": "PLOT_FIXED_DURATION",
"value": 900000,
"priority": "fallback",
"comment": "Fifteen minutes."
}
],
"policies": [
{
"category": "view",
"implementation": "policies/PlotViewPolicy.js"
}
]
}
}

View File

@@ -20,8 +20,7 @@
at runtime from the About dialog for additional information.
-->
<span ng-controller="PlotController as plot"
ng-mouseleave="representation.showControls = false">
class="abs holder holder-plot">
<div class="gl-plot"
ng-style="{ height: 100 / plot.getSubPlots().length + '%'}"
ng-repeat="subplot in plot.getSubPlots()">
@@ -30,37 +29,28 @@
<span
class='plot-legend-item'
ng-repeat="telemetryObject in subplot.getTelemetryObjects()"
ng-class="plot.getLegendClass(telemetryObject)"
>
ng-class="plot.getLegendClass(telemetryObject)">
<span class='plot-color-swatch'
ng-style="{ 'background-color': plot.getColor($index) }">
</span>
<span class='title-label'>{{telemetryObject.getModel().name}}</span>
</span>
</div>
<div
class="gl-plot-coords"
ng-if="subplot.isHovering() && subplot.getHoverCoordinates()"
>
<div class="gl-plot-coords"
ng-if="subplot.isHovering() && subplot.getHoverCoordinates()">
{{subplot.getHoverCoordinates()}}
</div>
<div class="gl-plot-axis-area gl-plot-y">
<div class="gl-plot-label gl-plot-y-label">
{{axes[1].active.name}}
</div>
<div ng-repeat="tick in subplot.getRangeTicks()"
class="gl-plot-tick gl-plot-y-tick-label"
ng-style="{ bottom: (100 * $index / (subplot.getRangeTicks().length - 1)) + '%' }">
{{tick.label | reverse}}
</div>
<div class="gl-plot-y-options gl-plot-local-controls"
ng-show="representation.showControls"
ng-if="axes[1].options.length > 0">
ng-if="axes[1].options.length > 1">
<div class='form-control shell select'>
<select class="form-control input shell"
ng-model="axes[1].active"
@@ -68,18 +58,15 @@
</select>
</div>
</div>
</div>
<div class="gl-plot-display-area"
ng-mouseenter="subplot.isHovering(true); representation.showControls = true;"
ng-mouseleave="subplot.isHovering(false)">
ng-mouseenter="subplot.isHovering(true);"
ng-mouseleave="subplot.isHovering(false)"
ng-class="{ loading: plot.isRequestPending() }">
<!-- Out-of-bounds data indicators -->
<!-- ng-show is temporarily hard-coded in next element -->
<div ng-show="false" class="l-oob-data l-oob-data-up"></div>
<div ng-show="false" class="l-oob-data l-oob-data-dwn"></div>
<div class="gl-plot-hash hash-v"
ng-repeat="tick in subplot.getDomainTicks()"
ng-style="{ left: (100 * $index / (subplot.getDomainTicks().length - 1)) + '%', height: '100%' }"
@@ -90,7 +77,6 @@
ng-style="{ bottom: (100 * $index / (subplot.getRangeTicks().length - 1)) + '%', width: '100%' }"
ng-show="$index > 0 && $index < (subplot.getRangeTicks().length - 1)">
</div>
<mct-chart draw="subplot.getDrawingObject()"
ng-if="subplot.getTelemetryObjects().length > 0"
ng-mousemove="subplot.hover($event)"
@@ -98,36 +84,27 @@
mct-drag-down="subplot.startDrag($event)"
mct-drag-up="subplot.endDrag($event); plot.update()">
</mct-chart>
<!-- TODO: Move into correct position; make part of group; infer from set of actions -->
<div class="l-local-controls gl-plot-local-controls"
ng-if="$first"
ng-show="representation.showControls"
style="position: absolute; top: 8px; right: 8px;">
<div class="l-local-controls gl-plot-local-controls t-plot-display-controls"
ng-if="$first">
<a class="s-btn"
ng-click="plot.stepBackPanZoom()"
ng-show="plot.isZoomed()"
title="Restore previous pan/zoom">
<span class="ui-symbol icon">&lt;</span>
</a>
<a class="s-btn"
ng-click="plot.unzoom()"
ng-show="plot.isZoomed()"
title="Reset pan/zoom">
<span class="ui-symbol icon">I</span>
</a>
<div class="menu-element s-menu-btn menus-to-left"
ng-if="plot.getModeOptions().length > 1"
ng-controller="ClickAwayController as toggle">
<span class="l-click-area" ng-click="toggle.toggle()"></span>
<span class="ui-symbol icon type-icon">{{plot.getMode().glyph}}</span>
<span>{{plot.getMode().name}}</span>
<div class="menu" ng-show="toggle.isActive()">
<ul>
<li ng-repeat="option in plot.getModeOptions()">
@@ -141,28 +118,20 @@
</ul>
</div>
</div>
</div>
<span class="t-wait-spinner loading" ng-show="plot.isRequestPending()">
</span>
</div>
<div ng-if="$last" class="gl-plot-axis-area gl-plot-x">
<div ng-repeat="tick in subplot.getDomainTicks()"
class="gl-plot-tick gl-plot-x-tick-label"
ng-show="$index > 0 && $index < (subplot.getDomainTicks().length - 1)"
ng-style="{ left: (100 * $index / (subplot.getDomainTicks().length - 1)) + '%' }">
{{tick.label | reverse}}
</div>
<div class="gl-plot-label gl-plot-x-label">
{{axes[0].active.name}}
</div>
<div class="gl-plot-x-options gl-plot-local-controls"
ng-show="representation.showControls"
ng-if="axes[0].options.length > 0">
ng-if="axes[0].options.length > 1">
<div class='form-control shell select'>
<select class="form-control input shell"
ng-model="axes[0].active"
@@ -174,4 +143,3 @@
</div>
</div>
</span>

View File

@@ -0,0 +1,82 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/RTEventListController",
"./src/directives/MCTRTDataTable",
"./src/policies/RTMessagesViewPolicy",
'legacyRegistry'
], function (
RTEventListController,
MCTRTDataTable,
RTMessagesViewPolicy,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/rtevents", {
"name": "Event Messages",
"description": "List of time-ordered event messages",
"extensions": {
"views": [
{
"key": "rtmessages",
"name": "RT Messages",
"glyph": "5",
"description": "Scrolling list of real time messages.",
"templateUrl": "templates/rtmessages.html",
"needs": [
"telemetry"
],
"delegation": true
}
],
"controllers": [
{
"key": "RTEventListController",
"implementation": RTEventListController,
"depends": [
"$scope",
"telemetryHandler",
"telemetryFormatter"
]
}
],
"directives": [
{
"key": "mctRtDataTable",
"implementation": MCTRTDataTable,
"depends": [
"$window"
]
}
],
"policies": [
{
"category": "view",
"implementation": RTMessagesViewPolicy
}
]
}
});
});

View File

@@ -1,37 +0,0 @@
{
"name": "Event Messages",
"description": "List of time-ordered event messages",
"extensions": {
"views": [
{
"key": "rtmessages",
"name": "RT Messages",
"glyph": "5",
"description": "Scrolling list of real time messages.",
"templateUrl": "templates/rtmessages.html",
"needs": [ "telemetry" ],
"delegation": true
}
],
"controllers": [
{
"key": "RTEventListController",
"implementation": "RTEventListController.js",
"depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ]
}
],
"directives": [
{
"key": "mctRtDataTable",
"implementation": "directives/MCTRTDataTable.js",
"depends": [ "$window" ]
}
],
"policies": [
{
"category": "view",
"implementation": "policies/RTMessagesViewPolicy.js"
}
]
}
}

View File

@@ -0,0 +1,63 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/RTScrollingListController",
'legacyRegistry'
], function (
RTScrollingListController,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/rtscrolling", {
"name": "Scrolling Lists",
"description": "Time-ordered list of latest data.",
"extensions": {
"views": [
{
"key": "scrolling",
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/rtscrolling.html",
"needs": [
"telemetry"
],
"delegation": true
}
],
"controllers": [
{
"key": "RTScrollingListController",
"implementation": RTScrollingListController,
"depends": [
"$scope",
"telemetryHandler",
"telemetryFormatter"
]
}
]
}
});
});

View File

@@ -1,25 +0,0 @@
{
"name": "Scrolling Lists",
"description": "Time-ordered list of latest data.",
"extensions": {
"views": [
{
"key": "scrolling",
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/rtscrolling.html",
"needs": [ "telemetry" ],
"delegation": true
}
],
"controllers": [
{
"key": "RTScrollingListController",
"implementation": "RTScrollingListController.js",
"depends": [ "$scope", "telemetryHandler", "telemetryFormatter" ]
}
]
}
}

View File

@@ -0,0 +1,62 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/ScrollingListController",
'legacyRegistry'
], function (
ScrollingListController,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/scrolling", {
"name": "Scrolling Lists",
"description": "Time-ordered list of latest data.",
"extensions": {
"views": [
{
"key": "scrolling",
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/scrolling.html",
"needs": [
"telemetry"
],
"delegation": true
}
],
"controllers": [
{
"key": "ScrollingListController",
"implementation": ScrollingListController,
"depends": [
"$scope",
"telemetryFormatter"
]
}
]
}
});
});

View File

@@ -1,25 +0,0 @@
{
"name": "Scrolling Lists",
"description": "Time-ordered list of latest data.",
"extensions": {
"views": [
{
"key": "scrolling",
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/scrolling.html",
"needs": [ "telemetry" ],
"delegation": true
}
],
"controllers": [
{
"key": "ScrollingListController",
"implementation": "ScrollingListController.js",
"depends": [ "$scope", "telemetryFormatter" ]
}
]
}
}

View File

@@ -23,7 +23,7 @@
<div class="w2"
ng-controller="ScrollingListController">
<!-- To add filtering, add class 'filterable' to <table> and uncomment 2nd <tr> in <thead> -->
<table class="tabular fixed-header">
<table class="tabular">
<thead>
<tr>
<th ng-repeat="header in headers">

View File

@@ -0,0 +1,56 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
'legacyRegistry'
], function (
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/static-markup", {
"extensions": {
"types": [
{
"key": "static.markup",
"name": "Static Markup",
"glyph": "p",
"description": "Static markup sandbox",
"features": [
"creation"
]
}
],
"views": [
{
"templateUrl": "markup.html",
"name": "Static Markup",
"type": "static.markup",
"key": "static.markup"
}
]
}
});
});

View File

@@ -1,21 +0,0 @@
{
"extensions": {
"types": [
{
"key": "static.markup",
"name": "Static Markup",
"glyph": "\u0070",
"description": "Static markup sandbox",
"features": [ "creation" ]
}
],
"views": [
{
"templateUrl": "markup.html",
"name": "Static Markup",
"type": "static.markup",
"key": "static.markup"
}
]
}
}

View File

@@ -0,0 +1,522 @@
/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
* "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.
*
* Open MCT Web includes source code licensed under additional open source
* 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.
*****************************************************************************/
/*global define*/
define([
"./src/controllers/TimelineController",
"./src/controllers/TimelineGraphController",
"./src/controllers/TimelineDateTimeController",
"./src/controllers/TimelineZoomController",
"./src/controllers/TimelineTickController",
"./src/controllers/TimelineTableController",
"./src/controllers/TimelineGanttController",
"./src/controllers/ActivityModeValuesController",
"./src/capabilities/ActivityTimespanCapability",
"./src/capabilities/TimelineTimespanCapability",
"./src/capabilities/UtilizationCapability",
"./src/capabilities/GraphCapability",
"./src/capabilities/CostCapability",
"./src/directives/MCTSwimlaneDrop",
"./src/directives/MCTSwimlaneDrag",
"./src/services/ObjectLoader",
'legacyRegistry'
], function (
TimelineController,
TimelineGraphController,
TimelineDateTimeController,
TimelineZoomController,
TimelineTickController,
TimelineTableController,
TimelineGanttController,
ActivityModeValuesController,
ActivityTimespanCapability,
TimelineTimespanCapability,
UtilizationCapability,
GraphCapability,
CostCapability,
MCTSwimlaneDrop,
MCTSwimlaneDrag,
ObjectLoader,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/features/timeline", {
"name": "Timelines",
"description": "Resources, templates, CSS, and code for Timelines.",
"resources": "res",
"extensions": {
"constants": [
{
"key": "TIMELINE_MINIMUM_DURATION",
"description": "The minimum duration to display in a timeline view (one hour.)",
"value": 3600000
},
{
"key": "TIMELINE_MAXIMUM_OFFSCREEN",
"description": "Maximum amount, in pixels, of a Gantt bar which may go off screen.",
"value": 1000
},
{
"key": "TIMELINE_ZOOM_CONFIGURATION",
"description": "Describes major tick sizes in milliseconds, and width in pixels.",
"value": {
"levels": [
1000,
2000,
5000,
10000,
20000,
30000,
60000,
120000,
300000,
600000,
1200000,
1800000,
3600000,
7200000,
14400000,
28800000,
43200000,
86400000
],
"width": 200
}
}
],
"types": [
{
"key": "timeline",
"name": "Timeline",
"glyph": "S",
"description": "A container for arranging Timelines and Activities in time.",
"features": [
"creation"
],
"contains": [
"timeline",
"activity"
],
"properties": [
{
"name": "Start date/time",
"control": "timeline-datetime",
"required": true,
"property": [
"start"
],
"options": [
"SET"
]
},
{
"name": "Battery capacity (Watt-hours)",
"control": "textfield",
"required": false,
"conversion": "number",
"property": [
"capacity"
],
"pattern": "^-?\\d+(\\.\\d*)?$"
}
],
"model": {
"composition": []
}
},
{
"key": "activity",
"name": "Activity",
"glyph": "a",
"features": [
"creation"
],
"contains": [
"activity"
],
"description": "An action that takes place in time. You can define a start time and duration. Activities can be nested within other Activities, or within Timelines.",
"properties": [
{
"name": "Start date/time",
"control": "timeline-datetime",
"required": true,
"property": [
"start"
],
"options": [
"SET"
]
},
{
"name": "Duration",
"control": "duration",
"required": true,
"property": [
"duration"
]
}
],
"model": {
"composition": [],
"relationships": {
"modes": []
}
}
},
{
"key": "mode",
"name": "Activity Mode",
"glyph": "A",
"features": [
"creation"
],
"description": "Define resource utilizations over time, then apply to an Activity.",
"model": {
"resources": {
"comms": 0,
"power": 0
}
},
"properties": [
{
"name": "Comms (Kbps)",
"control": "textfield",
"conversion": "number",
"pattern": "^-?\\d+(\\.\\d*)?$",
"property": [
"resources",
"comms"
]
},
{
"name": "Power (watts)",
"control": "textfield",
"conversion": "number",
"pattern": "^-?\\d+(\\.\\d*)?$",
"property": [
"resources",
"power"
]
}
]
}
],
"views": [
{
"key": "values",
"name": "Values",
"glyph": "A",
"templateUrl": "templates/values.html",
"type": "mode",
"uses": [
"cost"
],
"editable": false
},
{
"key": "timeline",
"name": "Timeline",
"glyph": "S",
"type": "timeline",
"description": "A timeline view of Timelines and Activities.",
"templateUrl": "templates/timeline.html",
"editable": true,
"toolbar": {
"sections": [
{
"items": [
{
"method": "add",
"glyph": "+",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Timeline",
"glyph": "S",
"key": "timeline"
},
{
"name": "Activity",
"glyph": "a",
"key": "activity"
}
]
}
]
},
{
"items": [
{
"glyph": "é",
"description": "Graph resource utilization",
"control": "button",
"method": "toggleGraph"
},
{
"glyph": "A",
"control": "dialog-button",
"description": "Apply Activity Modes...",
"title": "Apply Activity Modes",
"dialog": {
"control": "selector",
"name": "Modes",
"type": "mode"
},
"property": "modes"
},
{
"glyph": "è",
"description": "Edit Activity Link",
"title": "Activity Link",
"control": "dialog-button",
"dialog": {
"control": "textfield",
"name": "Link",
"pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$"
},
"property": "link"
},
{
"glyph": "G",
"description": "Edit Properties...",
"control": "button",
"method": "properties"
}
]
},
{
"items": [
{
"method": "remove",
"description": "Remove item",
"control": "button",
"glyph": "Z"
}
]
}
]
}
}
],
"stylesheets": [
{
"stylesheetUrl": "css/timeline.css"
},
{
"stylesheetUrl": "css/timeline-espresso.css",
"theme": "espresso"
},
{
"stylesheetUrl": "css/timeline-snow.css",
"theme": "snow"
}
],
"representations": [
{
"key": "gantt",
"templateUrl": "templates/activity-gantt.html",
"uses": [
"timespan",
"type"
]
}
],
"templates": [
{
"key": "timeline-tabular-swimlane-cols-tree",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-tree.html"
},
{
"key": "timeline-tabular-swimlane-cols-data",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-data.html"
},
{
"key": "timeline-resource-graphs",
"priority": "mandatory",
"templateUrl": "templates/resource-graphs.html"
},
{
"key": "timeline-resource-graph-labels",
"priority": "mandatory",
"templateUrl": "templates/resource-graph-labels.html"
},
{
"key": "timeline-legend-item",
"priority": "mandatory",
"templateUrl": "templates/legend-item.html"
},
{
"key": "timeline-ticks",
"priority": "mandatory",
"templateUrl": "templates/ticks.html"
}
],
"controls": [
{
"key": "timeline-datetime",
"templateUrl": "templates/controls/datetime.html"
},
{
"key": "duration",
"templateUrl": "templates/controls/datetime.html"
}
],
"controllers": [
{
"key": "TimelineController",
"implementation": TimelineController,
"depends": [
"$scope",
"$q",
"objectLoader",
"TIMELINE_MINIMUM_DURATION"
]
},
{
"key": "TimelineGraphController",
"implementation": TimelineGraphController,
"depends": [
"$scope",
"resources[]"
]
},
{
"key": "TimelineDateTimeController",
"implementation": TimelineDateTimeController,
"depends": [
"$scope"
]
},
{
"key": "TimelineZoomController",
"implementation": TimelineZoomController,
"depends": [
"$scope",
"TIMELINE_ZOOM_CONFIGURATION"
]
},
{
"key": "TimelineTickController",
"implementation": TimelineTickController
},
{
"key": "TimelineTableController",
"implementation": TimelineTableController
},
{
"key": "TimelineGanttController",
"implementation": TimelineGanttController,
"depends": [
"TIMELINE_MAXIMUM_OFFSCREEN"
]
},
{
"key": "ActivityModeValuesController",
"implementation": ActivityModeValuesController,
"depends": [
"resources[]"
]
}
],
"capabilities": [
{
"key": "timespan",
"implementation": ActivityTimespanCapability,
"depends": [
"$q"
]
},
{
"key": "timespan",
"implementation": TimelineTimespanCapability,
"depends": [
"$q"
]
},
{
"key": "utilization",
"implementation": UtilizationCapability,
"depends": [
"$q"
]
},
{
"key": "graph",
"implementation": GraphCapability,
"depends": [
"$q"
]
},
{
"key": "cost",
"implementation": CostCapability
}
],
"directives": [
{
"key": "mctSwimlaneDrop",
"implementation": MCTSwimlaneDrop,
"depends": [
"dndService"
]
},
{
"key": "mctSwimlaneDrag",
"implementation": MCTSwimlaneDrag,
"depends": [
"dndService"
]
}
],
"services": [
{
"key": "objectLoader",
"implementation": ObjectLoader,
"depends": [
"$q"
]
}
],
"resources": [
{
"key": "power",
"name": "Power",
"units": "watts"
},
{
"key": "comms",
"name": "Comms",
"units": "Kbps"
},
{
"key": "battery",
"name": "Battery State-of-Charge",
"units": "%"
}
]
}
});
});

View File

@@ -1,385 +0,0 @@
{
"name": "Timelines",
"description": "Resources, templates, CSS, and code for Timelines.",
"resources": "res",
"extensions": {
"constants": [
{
"key": "TIMELINE_MINIMUM_DURATION",
"description": "The minimum duration to display in a timeline view (one hour.)",
"value": 3600000
},
{
"key": "TIMELINE_MAXIMUM_OFFSCREEN",
"description": "Maximum amount, in pixels, of a Gantt bar which may go off screen.",
"value": 1000
},
{
"key": "TIMELINE_ZOOM_CONFIGURATION",
"description": "Describes major tick sizes in milliseconds, and width in pixels.",
"value": {
"levels": [
1000,
2000,
5000,
10000,
20000,
30000,
60000,
120000,
300000,
600000,
1200000,
1800000,
3600000,
7200000,
14400000,
28800000,
43200000,
86400000
],
"width": 200
}
}
],
"types": [
{
"key": "timeline",
"name": "Timeline",
"glyph": "S",
"description": "A container for arranging Timelines and Activities in time.",
"features": [ "creation" ],
"contains": [ "timeline", "activity" ],
"properties": [
{
"name": "Start date/time",
"control": "timeline-datetime",
"required": true,
"property": [ "start" ],
"options": [ "SET" ]
},
{
"name": "Battery capacity (Watt-hours)",
"control": "textfield",
"required": false,
"conversion": "number",
"property": [ "capacity" ],
"pattern": "^-?\\d+(\\.\\d*)?$"
}
],
"model": { "composition": [] }
},
{
"key": "activity",
"name": "Activity",
"glyph": "a",
"features": [ "creation" ],
"contains": [ "activity" ],
"description": "An action that takes place in time. You can define a start time and duration. Activities can be nested within other Activities, or within Timelines.",
"properties": [
{
"name": "Start date/time",
"control": "timeline-datetime",
"required": true,
"property": [ "start" ],
"options": [ "SET" ]
},
{
"name": "Duration",
"control": "duration",
"required": true,
"property": [ "duration" ]
}
],
"model": { "composition": [], "relationships": { "modes": [] } }
},
{
"key": "mode",
"name": "Activity Mode",
"glyph": "A",
"features": [ "creation" ],
"description": "Define resource utilizations over time, then apply to an Activity.",
"model": { "resources": { "comms": 0, "power": 0 } },
"properties": [
{
"name": "Comms (Kbps)",
"control": "textfield",
"conversion": "number",
"pattern": "^-?\\d+(\\.\\d*)?$",
"property": [ "resources", "comms" ]
},
{
"name": "Power (watts)",
"control": "textfield",
"conversion": "number",
"pattern": "^-?\\d+(\\.\\d*)?$",
"property": [ "resources", "power" ]
}
]
}
],
"views": [
{
"key": "values",
"name": "Values",
"glyph": "A",
"templateUrl": "templates/values.html",
"type": "mode",
"uses": [ "cost" ],
"editable": false
},
{
"key": "timeline",
"name": "Timeline",
"glyph": "S",
"type": "timeline",
"description": "A timeline view of Timelines and Activities.",
"templateUrl": "templates/timeline.html",
"toolbar": {
"sections": [
{
"items": [
{
"method": "add",
"glyph": "+",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Timeline",
"glyph": "S",
"key": "timeline"
},
{
"name": "Activity",
"glyph": "a",
"key": "activity"
}
]
}
]
},
{
"items": [
{
"glyph": "\u00E9",
"description": "Graph resource utilization",
"control": "button",
"method": "toggleGraph"
},
{
"glyph": "A",
"control": "dialog-button",
"description": "Apply Activity Modes...",
"title": "Apply Activity Modes",
"dialog": {
"control": "selector",
"name": "Modes",
"type": "mode"
},
"property": "modes"
},
{
"glyph": "\u00E8",
"description": "Edit Activity Link",
"title": "Activity Link",
"control": "dialog-button",
"dialog": {
"control": "textfield",
"name": "Link",
"pattern": "^(ftp|https?)\\:\\/\\/\\w+(\\.\\w+)*(\\:\\d+)?(\\/\\S*)*$"
},
"property": "link"
},
{
"glyph": "\u0047",
"description": "Edit Properties...",
"control": "button",
"method": "properties"
}
]
},
{
"items": [
{
"method": "remove",
"description": "Remove item",
"control": "button",
"glyph": "Z"
}
]
}
]
}
}
],
"stylesheets": [
{
"stylesheetUrl": "css/timeline.css"
},
{
"stylesheetUrl": "css/timeline-espresso.css",
"theme": "espresso"
},
{
"stylesheetUrl": "css/timeline-snow.css",
"theme": "snow"
}
],
"representations": [
{
"key": "gantt",
"templateUrl": "templates/activity-gantt.html",
"uses": [ "timespan", "type" ]
}
],
"templates": [
{
"key": "timeline-tabular-swimlane-cols-tree",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-tree.html"
},
{
"key": "timeline-tabular-swimlane-cols-data",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-data.html"
},
{
"key": "timeline-resource-graphs",
"priority": "mandatory",
"templateUrl": "templates/resource-graphs.html"
},
{
"key": "timeline-resource-graph-labels",
"priority": "mandatory",
"templateUrl": "templates/resource-graph-labels.html"
},
{
"key": "timeline-legend-item",
"priority": "mandatory",
"templateUrl": "templates/legend-item.html"
},
{
"key": "timeline-ticks",
"priority": "mandatory",
"templateUrl": "templates/ticks.html"
}
],
"controls": [
{
"key": "timeline-datetime",
"templateUrl": "templates/controls/datetime.html"
},
{
"key": "duration",
"templateUrl": "templates/controls/datetime.html"
}
],
"controllers": [
{
"key": "TimelineController",
"implementation": "controllers/TimelineController.js",
"depends": [ "$scope", "$q", "objectLoader", "TIMELINE_MINIMUM_DURATION" ]
},
{
"key": "TimelineGraphController",
"implementation": "controllers/TimelineGraphController.js",
"depends": [ "$scope", "resources[]" ]
},
{
"key": "TimelineDateTimeController",
"implementation": "controllers/TimelineDateTimeController.js",
"depends": [ "$scope" ]
},
{
"key": "TimelineZoomController",
"implementation": "controllers/TimelineZoomController.js",
"depends": [ "$scope", "TIMELINE_ZOOM_CONFIGURATION" ]
},
{
"key": "TimelineTickController",
"implementation": "controllers/TimelineTickController.js"
},
{
"key": "TimelineTableController",
"implementation": "controllers/TimelineTableController.js"
},
{
"key": "TimelineGanttController",
"implementation": "controllers/TimelineGanttController.js",
"depends": [ "TIMELINE_MAXIMUM_OFFSCREEN" ]
},
{
"key": "ActivityModeValuesController",
"implementation": "controllers/ActivityModeValuesController.js",
"depends": [ "resources[]" ]
}
],
"capabilities": [
{
"key": "timespan",
"implementation": "capabilities/ActivityTimespanCapability.js",
"depends": [ "$q" ]
},
{
"key": "timespan",
"implementation": "capabilities/TimelineTimespanCapability.js",
"depends": [ "$q" ]
},
{
"key": "utilization",
"implementation": "capabilities/UtilizationCapability.js",
"depends": [ "$q" ]
},
{
"key": "graph",
"implementation": "capabilities/GraphCapability.js",
"depends": [ "$q" ]
},
{
"key": "cost",
"implementation": "capabilities/CostCapability.js"
}
],
"directives": [
{
"key": "mctSwimlaneDrop",
"implementation": "directives/MCTSwimlaneDrop.js",
"depends": [ "dndService" ]
},
{
"key": "mctSwimlaneDrag",
"implementation": "directives/MCTSwimlaneDrag.js",
"depends": [ "dndService" ]
}
],
"services": [
{
"key": "objectLoader",
"implementation": "services/ObjectLoader.js",
"depends": [ "$q" ]
}
],
"resources": [
{
"key": "power",
"name": "Power",
"units": "watts"
},
{
"key": "comms",
"name": "Comms",
"units": "Kbps"
},
{
"key": "battery",
"name": "Battery State-of-Charge",
"units": "%"
}
]
}
}

View File

@@ -54,7 +54,8 @@
}
}
.edit-mode .s-timeline-gantt {
.edit-mode .s-timeline-gantt,
.s-status-editing .s-timeline-gantt {
.handle {
cursor: col-resize;
&.mid {

View File

@@ -69,7 +69,8 @@
}
}
.edit-mode .s-timeline-gantt {
.edit-mode .s-timeline-gantt,
.s-status-editing .s-timeline-gantt {
.bar {
&:hover {
@include background-image(linear-gradient(lighten($colorGanttBarBg, 20), lighten($colorGanttBarBg, 10)));
@@ -140,7 +141,8 @@
}
}
.edit-mode .s-swimlane {
.edit-mode .s-swimlane,
.s-status-editing .s-swimlane {
cursor: pointer;
.t-object-label {
@include border-radius($controlCr);