Merge branch 'master' into open638_rebase
This commit is contained in:
@@ -29,6 +29,8 @@ define([
|
||||
"./src/controllers/RefreshingController",
|
||||
"./src/actions/StartTimerAction",
|
||||
"./src/actions/RestartTimerAction",
|
||||
"text!./res/templates/clock.html",
|
||||
"text!./res/templates/timer.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
ClockIndicator,
|
||||
@@ -38,6 +40,8 @@ define([
|
||||
RefreshingController,
|
||||
StartTimerAction,
|
||||
RestartTimerAction,
|
||||
clockTemplate,
|
||||
timerTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -116,13 +120,13 @@ define([
|
||||
"key": "clock",
|
||||
"type": "clock",
|
||||
"editable": false,
|
||||
"templateUrl": "templates/clock.html"
|
||||
"template": clockTemplate
|
||||
},
|
||||
{
|
||||
"key": "timer",
|
||||
"type": "timer",
|
||||
"editable": false,
|
||||
"templateUrl": "templates/timer.html"
|
||||
"template": timerTemplate
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
|
||||
@@ -25,11 +25,13 @@ define([
|
||||
"./src/ConductorRepresenter",
|
||||
"./src/ConductorTelemetryDecorator",
|
||||
"./src/ConductorService",
|
||||
"text!./res/templates/time-conductor.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
ConductorRepresenter,
|
||||
ConductorTelemetryDecorator,
|
||||
ConductorService,
|
||||
timeConductorTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -70,7 +72,7 @@ define([
|
||||
"templates": [
|
||||
{
|
||||
"key": "time-conductor",
|
||||
"templateUrl": "templates/time-conductor.html"
|
||||
"template": timeConductorTemplate
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
|
||||
@@ -25,11 +25,13 @@ define([
|
||||
"./src/EventListController",
|
||||
"./src/directives/MCTDataTable",
|
||||
"./src/policies/MessagesViewPolicy",
|
||||
"text!./res/templates/messages.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
EventListController,
|
||||
MCTDataTable,
|
||||
MessagesViewPolicy,
|
||||
messagesTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -44,7 +46,7 @@ define([
|
||||
"name": "Messages",
|
||||
"glyph": "5",
|
||||
"description": "Scrolling list of messages.",
|
||||
"templateUrl": "templates/messages.html",
|
||||
"template": messagesTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
* Module defining MCTDataTable. Created by shale on 06/22/2015.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
['text!../../res/templates/mct-data-table.html'],
|
||||
function (dataTableTemplate) {
|
||||
"use strict";
|
||||
|
||||
function MCTDataTable($window) {
|
||||
return {
|
||||
restrict: "E",
|
||||
templateUrl: "platform/features/events/res/templates/mct-data-table.html",
|
||||
template: dataTableTemplate,
|
||||
scope: {
|
||||
headers: "=",
|
||||
rows: "=",
|
||||
|
||||
@@ -25,11 +25,13 @@ define([
|
||||
"./src/policies/ImageryViewPolicy",
|
||||
"./src/controllers/ImageryController",
|
||||
"./src/directives/MCTBackgroundImage",
|
||||
"text!./res/templates/imagery.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
ImageryViewPolicy,
|
||||
ImageryController,
|
||||
MCTBackgroundImage,
|
||||
imageryTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -42,7 +44,7 @@ define([
|
||||
"name": "Imagery",
|
||||
"key": "imagery",
|
||||
"glyph": "ã",
|
||||
"templateUrl": "templates/imagery.html",
|
||||
"template": imageryTemplate,
|
||||
"priority": "preferred",
|
||||
"needs": [
|
||||
"telemetry"
|
||||
|
||||
@@ -25,11 +25,27 @@ define([
|
||||
"./src/LayoutController",
|
||||
"./src/FixedController",
|
||||
"./src/LayoutCompositionPolicy",
|
||||
"text!./res/templates/layout.html",
|
||||
"text!./res/templates/fixed.html",
|
||||
"text!./res/templates/frame.html",
|
||||
"text!./res/templates/elements/telemetry.html",
|
||||
"text!./res/templates/elements/box.html",
|
||||
"text!./res/templates/elements/line.html",
|
||||
"text!./res/templates/elements/text.html",
|
||||
"text!./res/templates/elements/image.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
LayoutController,
|
||||
FixedController,
|
||||
LayoutCompositionPolicy,
|
||||
layoutTemplate,
|
||||
fixedTemplate,
|
||||
frameTemplate,
|
||||
telemetryTemplate,
|
||||
boxTemplate,
|
||||
lineTemplate,
|
||||
textTemplate,
|
||||
imageTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -44,7 +60,7 @@ define([
|
||||
"name": "Display Layout",
|
||||
"glyph": "L",
|
||||
"type": "layout",
|
||||
"templateUrl": "templates/layout.html",
|
||||
"template": layoutTemplate,
|
||||
"editable": true,
|
||||
"uses": []
|
||||
},
|
||||
@@ -53,7 +69,7 @@ define([
|
||||
"name": "Fixed Position",
|
||||
"glyph": "3",
|
||||
"type": "telemetry.panel",
|
||||
"templateUrl": "templates/fixed.html",
|
||||
"template": fixedTemplate,
|
||||
"uses": [
|
||||
"composition"
|
||||
],
|
||||
@@ -191,7 +207,7 @@ define([
|
||||
"representations": [
|
||||
{
|
||||
"key": "frame",
|
||||
"templateUrl": "templates/frame.html"
|
||||
"template": frameTemplate
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
@@ -218,23 +234,23 @@ define([
|
||||
"templates": [
|
||||
{
|
||||
"key": "fixed.telemetry",
|
||||
"templateUrl": "templates/elements/telemetry.html"
|
||||
"template": telemetryTemplate
|
||||
},
|
||||
{
|
||||
"key": "fixed.box",
|
||||
"templateUrl": "templates/elements/box.html"
|
||||
"template": boxTemplate
|
||||
},
|
||||
{
|
||||
"key": "fixed.line",
|
||||
"templateUrl": "templates/elements/line.html"
|
||||
"template": lineTemplate
|
||||
},
|
||||
{
|
||||
"key": "fixed.text",
|
||||
"templateUrl": "templates/elements/text.html"
|
||||
"template": textTemplate
|
||||
},
|
||||
{
|
||||
"key": "fixed.image",
|
||||
"templateUrl": "templates/elements/image.html"
|
||||
"template": imageTemplate
|
||||
}
|
||||
],
|
||||
"policies": [
|
||||
|
||||
@@ -303,12 +303,16 @@ define(
|
||||
this.generateDragHandles = generateDragHandles;
|
||||
|
||||
// Track current selection state
|
||||
this.selection = $scope.selection;
|
||||
$scope.$watch("selection", function (selection) {
|
||||
this.selection = selection;
|
||||
|
||||
// Expose the view's selection proxy
|
||||
if (this.selection) {
|
||||
this.selection.proxy(new FixedProxy(addElement, $q, dialogService));
|
||||
}
|
||||
// Expose the view's selection proxy
|
||||
if (this.selection) {
|
||||
this.selection.proxy(
|
||||
new FixedProxy(addElement, $q, dialogService)
|
||||
);
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
// Refresh list of elements whenever model changes
|
||||
$scope.$watch("model.modified", refreshElements);
|
||||
|
||||
@@ -148,6 +148,8 @@ define(
|
||||
mockHandler,
|
||||
mockFormatter
|
||||
);
|
||||
|
||||
findWatch("selection")(mockScope.selection);
|
||||
});
|
||||
|
||||
it("subscribes when a domain object is available", function () {
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
|
||||
define([
|
||||
"./src/EmbeddedPageController",
|
||||
"text!./res/iframe.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
EmbeddedPageController,
|
||||
iframeTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -54,7 +56,7 @@ define([
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"templateUrl": "iframe.html",
|
||||
"template": iframeTemplate,
|
||||
"name": "Page",
|
||||
"type": "example.page",
|
||||
"key": "example.page",
|
||||
|
||||
@@ -26,12 +26,14 @@ define([
|
||||
"./src/PlotController",
|
||||
"./src/policies/PlotViewPolicy",
|
||||
"./src/PlotOptionsController",
|
||||
"text!./res/templates/plot.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
MCTChart,
|
||||
PlotController,
|
||||
PlotViewPolicy,
|
||||
PlotOptionsController,
|
||||
plotTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -44,7 +46,7 @@ define([
|
||||
"name": "Plot",
|
||||
"key": "plot",
|
||||
"glyph": "6",
|
||||
"templateUrl": "templates/plot.html",
|
||||
"template": plotTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
|
||||
@@ -25,11 +25,13 @@ define([
|
||||
"./src/RTEventListController",
|
||||
"./src/directives/MCTRTDataTable",
|
||||
"./src/policies/RTMessagesViewPolicy",
|
||||
"text!./res/templates/rtmessages.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
RTEventListController,
|
||||
MCTRTDataTable,
|
||||
RTMessagesViewPolicy,
|
||||
rtmessagesTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -44,7 +46,7 @@ define([
|
||||
"name": "RT Messages",
|
||||
"glyph": "5",
|
||||
"description": "Scrolling list of real time messages.",
|
||||
"templateUrl": "templates/rtmessages.html",
|
||||
"template": rtmessagesTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
* Module defining MCTRTDataTable. Created by shale on 06/25/2015.
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
['text!../../res/templates/mct-rt-data-table.html'],
|
||||
function (dataTableTemplate) {
|
||||
"use strict";
|
||||
|
||||
function MCTRTDataTable($window) {
|
||||
return {
|
||||
restrict: "E",
|
||||
templateUrl: "platform/features/rtevents/res/templates/mct-rt-data-table.html",
|
||||
template: dataTableTemplate,
|
||||
scope: {
|
||||
headers: "=",
|
||||
rows: "=",
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
|
||||
define([
|
||||
"./src/RTScrollingListController",
|
||||
"text!./res/templates/rtscrolling.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
RTScrollingListController,
|
||||
rtscrollingTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -40,7 +42,7 @@ define([
|
||||
"name": "Scrolling",
|
||||
"glyph": "5",
|
||||
"description": "Scrolling list of data values.",
|
||||
"templateUrl": "templates/rtscrolling.html",
|
||||
"template": rtscrollingTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
|
||||
define([
|
||||
"./src/ScrollingListController",
|
||||
"text!./res/templates/scrolling.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
ScrollingListController,
|
||||
scrollingTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -40,7 +42,7 @@ define([
|
||||
"name": "Scrolling",
|
||||
"glyph": "5",
|
||||
"description": "Scrolling list of data values.",
|
||||
"templateUrl": "templates/scrolling.html",
|
||||
"template": scrollingTemplate,
|
||||
"needs": [
|
||||
"telemetry"
|
||||
],
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
|
||||
define([
|
||||
|
||||
"text!./res/markup.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
|
||||
markupTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -45,7 +47,7 @@ define([
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"templateUrl": "markup.html",
|
||||
"template": markupTemplate,
|
||||
"name": "Static Markup",
|
||||
"type": "static.markup",
|
||||
"key": "static.markup"
|
||||
|
||||
@@ -38,6 +38,16 @@ define([
|
||||
"./src/directives/MCTSwimlaneDrop",
|
||||
"./src/directives/MCTSwimlaneDrag",
|
||||
"./src/services/ObjectLoader",
|
||||
"text!./res/templates/values.html",
|
||||
"text!./res/templates/timeline.html",
|
||||
"text!./res/templates/activity-gantt.html",
|
||||
"text!./res/templates/tabular-swimlane-cols-tree.html",
|
||||
"text!./res/templates/tabular-swimlane-cols-data.html",
|
||||
"text!./res/templates/resource-graphs.html",
|
||||
"text!./res/templates/resource-graph-labels.html",
|
||||
"text!./res/templates/legend-item.html",
|
||||
"text!./res/templates/ticks.html",
|
||||
"text!./res/templates/controls/datetime.html",
|
||||
'legacyRegistry'
|
||||
], function (
|
||||
TimelineController,
|
||||
@@ -56,6 +66,16 @@ define([
|
||||
MCTSwimlaneDrop,
|
||||
MCTSwimlaneDrag,
|
||||
ObjectLoader,
|
||||
valuesTemplate,
|
||||
timelineTemplate,
|
||||
activityGanttTemplate,
|
||||
tabularSwimlaneColsTreeTemplate,
|
||||
tabularSwimlaneColsDataTemplate,
|
||||
resourceGraphsTemplate,
|
||||
resourceGraphLabelsTemplate,
|
||||
legendItemTemplate,
|
||||
ticksTemplate,
|
||||
datetimeTemplate,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
@@ -226,7 +246,7 @@ define([
|
||||
"key": "values",
|
||||
"name": "Values",
|
||||
"glyph": "A",
|
||||
"templateUrl": "templates/values.html",
|
||||
"template": valuesTemplate,
|
||||
"type": "mode",
|
||||
"uses": [
|
||||
"cost"
|
||||
@@ -239,7 +259,7 @@ define([
|
||||
"glyph": "S",
|
||||
"type": "timeline",
|
||||
"description": "A timeline view of Timelines and Activities.",
|
||||
"templateUrl": "templates/timeline.html",
|
||||
"template": timelineTemplate,
|
||||
"editable": true,
|
||||
"toolbar": {
|
||||
"sections": [
|
||||
@@ -335,7 +355,7 @@ define([
|
||||
"representations": [
|
||||
{
|
||||
"key": "gantt",
|
||||
"templateUrl": "templates/activity-gantt.html",
|
||||
"template": activityGanttTemplate,
|
||||
"uses": [
|
||||
"timespan",
|
||||
"type"
|
||||
@@ -346,42 +366,42 @@ define([
|
||||
{
|
||||
"key": "timeline-tabular-swimlane-cols-tree",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/tabular-swimlane-cols-tree.html"
|
||||
"template": tabularSwimlaneColsTreeTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-tabular-swimlane-cols-data",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/tabular-swimlane-cols-data.html"
|
||||
"template": tabularSwimlaneColsDataTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-resource-graphs",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/resource-graphs.html"
|
||||
"template": resourceGraphsTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-resource-graph-labels",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/resource-graph-labels.html"
|
||||
"template": resourceGraphLabelsTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-legend-item",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/legend-item.html"
|
||||
"template": legendItemTemplate
|
||||
},
|
||||
{
|
||||
"key": "timeline-ticks",
|
||||
"priority": "mandatory",
|
||||
"templateUrl": "templates/ticks.html"
|
||||
"template": ticksTemplate
|
||||
}
|
||||
],
|
||||
"controls": [
|
||||
{
|
||||
"key": "timeline-datetime",
|
||||
"templateUrl": "templates/controls/datetime.html"
|
||||
"template": datetimeTemplate
|
||||
},
|
||||
{
|
||||
"key": "duration",
|
||||
"templateUrl": "templates/controls/datetime.html"
|
||||
"template": datetimeTemplate
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<div class="t-timeline-gantt l-timeline-gantt s-timeline-gantt"
|
||||
title="{{model.name}}"
|
||||
ng-controller="TimelineGanttController as gantt"
|
||||
ng-style="{
|
||||
ng-style="timespan ? {
|
||||
left: gantt.left(timespan, parameters.scroll, parameters.toPixels) + 'px',
|
||||
width: gantt.width(timespan, parameters.scroll, parameters.toPixels) + 'px'
|
||||
}">
|
||||
} : {}">
|
||||
|
||||
<div class="bar">
|
||||
<span class="s-activity-type ui-symbol">
|
||||
|
||||
@@ -98,7 +98,7 @@ define(
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Recalculate swimlane state on changes
|
||||
$scope.$watch("domainObject", swimlanePopulator.populate);
|
||||
|
||||
@@ -108,6 +108,9 @@ define(
|
||||
// Carry over changes in swimlane set to changes in graphs
|
||||
$scope.$watch(graphMask, repopulateGraphs);
|
||||
|
||||
// Pass selection object into swimlane populator
|
||||
$scope.$watch("selection", swimlanePopulator.selection);
|
||||
|
||||
// Convey current selection to drag handle populator
|
||||
$scope.$watch("selection.get()", dragPopulator.select);
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ define(
|
||||
start = Number.POSITIVE_INFINITY,
|
||||
end = Number.NEGATIVE_INFINITY,
|
||||
colors = (configuration.colors || {}),
|
||||
assigner = new TimelineColorAssigner(colors);
|
||||
assigner = new TimelineColorAssigner(colors),
|
||||
lastDomainObject;
|
||||
|
||||
// Track extremes of start/end times
|
||||
function trackStartEnd(timespan) {
|
||||
@@ -144,12 +145,25 @@ define(
|
||||
domainObject && new TimelineProxy(domainObject, selection)
|
||||
);
|
||||
}
|
||||
|
||||
lastDomainObject = domainObject;
|
||||
}
|
||||
|
||||
function setSelectionObject(s) {
|
||||
selection = s;
|
||||
recalculateSwimlanes(lastDomainObject);
|
||||
}
|
||||
|
||||
// Ensure colors are exposed in configuration
|
||||
configuration.colors = colors;
|
||||
|
||||
return {
|
||||
/**
|
||||
* Set the selection object associated with this timeline view.
|
||||
* @param {Object} selection the selection object
|
||||
*/
|
||||
selection: setSelectionObject,
|
||||
|
||||
/**
|
||||
* Update list of swimlanes to match those reachable from this
|
||||
* object.
|
||||
|
||||
@@ -150,6 +150,15 @@ define(
|
||||
expect(mockSelection.proxy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("allows selection object to be changed", function () {
|
||||
var mockNewSelectionObject = jasmine.createSpyObj(
|
||||
'new-selection',
|
||||
['get', 'select', 'proxy']
|
||||
);
|
||||
populator.selection(mockNewSelectionObject);
|
||||
expect(mockNewSelectionObject.proxy)
|
||||
.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user