Merge remote-tracking branch 'origin/master' into persist-on-mutation-825

This commit is contained in:
Victor Woeltjen
2016-10-07 11:27:58 -07:00
314 changed files with 6153 additions and 7464 deletions

View File

@@ -151,7 +151,7 @@ define([
{
"key": "timeline",
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
"priority": 502,
"features": [
@@ -182,6 +182,16 @@ define([
"capacity"
],
"pattern": "^-?\\d+(\\.\\d*)?$"
},
{
"name": "Battery starting SOC (%)",
"control": "textfield",
"required": false,
"conversion": "number",
"property": [
"startingSOC"
],
"pattern": "^([0-9](\\.\\d*)?|[1-9][0-9](\\.\\d*)?|100)%?$"
}
],
"model": {
@@ -194,7 +204,7 @@ define([
{
"key": "activity",
"name": "Activity",
"glyph": "\u0061",
"cssclass": "icon-activity",
"features": [
"creation"
],
@@ -240,7 +250,7 @@ define([
{
"key": "mode",
"name": "Activity Mode",
"glyph": "\u0041",
"cssclass": "icon-activity-mode",
"features": [
"creation"
],
@@ -280,7 +290,7 @@ define([
{
"key": "values",
"name": "Values",
"glyph": "\u0041",
"cssclass": "icon-activity-mode",
"template": valuesTemplate,
"type": "mode",
"uses": [
@@ -291,7 +301,7 @@ define([
{
"key": "timeline",
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"type": "timeline",
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
"template": timelineTemplate,
@@ -302,18 +312,17 @@ define([
"items": [
{
"method": "add",
"glyph": "\u002b",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"key": "timeline"
},
{
"name": "Activity",
"glyph": "\u0061",
"cssclass": "icon-activity",
"key": "activity"
}
]
@@ -323,13 +332,13 @@ define([
{
"items": [
{
"glyph": "\u00e9",
"cssclass": "icon-plot-resource",
"description": "Graph Resource Utilization",
"control": "button",
"method": "toggleGraph"
},
{
"glyph": "\u0041",
"cssclass": "icon-activity-mode",
"control": "dialog-button",
"description": "Apply Activity Modes...",
"title": "Apply Activity Modes",
@@ -342,7 +351,7 @@ define([
"property": "modes"
},
{
"glyph": "\u00e8",
"cssclass": "icon-chain-links",
"description": "Edit Activity Link",
"title": "Activity Link",
"control": "dialog-button",
@@ -355,7 +364,7 @@ define([
"property": "link"
},
{
"glyph": "\u0047",
"cssclass": "icon-gear",
"description": "Edit Properties...",
"control": "button",
"method": "properties"
@@ -368,7 +377,7 @@ define([
"method": "remove",
"description": "Remove Item",
"control": "button",
"glyph": "\u005a"
"cssclass": "icon-trash"
}
]
}

View File

@@ -52,8 +52,8 @@
.l-pane-l {
// Left pane of the tabular area
.l-cols {
.s-label .ui-symbol.icon {
color: $colorGanttBarTabularFgIcon;
.t-object-label .t-item-icon {
color: pullForward($colorGanttBarBg, 10%);
}
}
}
@@ -104,7 +104,7 @@
}
.s-ticks {
@include bgTicks($timelineColorAlt1);
@include bgTicks( $timelineColorAlt1);
}
.s-hover-btns-holder {
$bg: $timelineHeaderColorBg;
@@ -112,7 +112,7 @@
$l: 5%;
@include user-select(none);
@include background-image(linear-gradient(-90deg, rgba($bg, $bga), rgba($bg, $bga) 70%, rgba($bg, 0) 100%));
.s-btn {
.s-button {
height: 16px;
line-height: 16px;
.icon {

View File

@@ -241,8 +241,8 @@
@include trans-prop-nice-fade(500ms);
opacity: 0;
height: $timelineTopPaneHeaderH;
width: 100px; left: auto;
padding: $interiorMargin;
left: auto;
padding: $interiorMargin $interiorMargin $interiorMargin $interiorMargin * 10;
text-align: right;
z-index: 10;
}
@@ -266,9 +266,6 @@
width: $timelineColIconW;
text-align: center;
padding: 0;
.ui-symbol {
color: $colorKey;
}
}
&.l-plot-resource {

View File

@@ -29,9 +29,7 @@
} : {}">
<div class="bar">
<span class="s-activity-type ui-symbol">
{{type.getGlyph()}}
</span>
<span class="s-activity-type {{type.getCssClass()}}"></span>
<span class="s-title">
{{model.name}}
</span>

View File

@@ -31,20 +31,17 @@
<span class="l-col l-col-icon l-plot-resource"
ng-click="ngModel.toggleGraph(); parameters.commit()"
title="Click to enable or disable inclusion in Resource Graphing">
<span class="ui-symbol"
ng-show="ngModel.graph()"
>
&#x00e9;
<span class="icon-plot-resource s-toggle-icon"
ng-class="{ active: ngModel.graph() }">
</span>
</span>
<span class="l-col l-col-icon l-link">
<a class="ui-symbol"
<a class="icon-chain-links"
target="_blank"
ng-href="{{ngModel.link()}}"
ng-if="ngModel.link().length > 0"
title="{{ngModel.link()}}"
>
&#x00e8;
</a>
</span>
<span class="l-col l-title"

View File

@@ -19,7 +19,7 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class="s-timeline l-timeline-holder split-layout vertical"
<div class="s-timeline l-timeline-holder split-layout vertical splitter-sm"
ng-controller="TimelineController as timelineController">
<mct-split-pane anchor="left" class="abs" position="pane.x">
@@ -27,7 +27,7 @@
<mct-split-pane anchor="bottom"
position="pane.y"
class="abs horizontal split-pane-component l-timeline-pane l-pane-l t-pane-v">
<!-- TOP PANE TABULAR AREA. ADD CLASS "hidden" FOR INTERIM NO-TABULAR DELIVERY -->
<!-- TOP PANE TABULAR AREA -->
<div class="split-pane-component s-timeline-tabular l-timeline-pane t-pane-h l-pane-top">
<!-- TABULAR LEFT FIXED AREA -->
<div class="t-pane-v l-pane-l l-tabular-l"
@@ -35,8 +35,8 @@
<div class="t-header l-header s-header">
<div class="l-cols">
<span title="Resource Graphing: click a row to toggle" class="l-col l-col-icon l-plot-resource ui-symbol">&#x00e9;</span>
<span title="Activity Links" class="l-col l-col-icon l-col-link ui-symbol">&#x00e8;</span>
<span title="Resource Graphing: click a row to toggle" class="l-col l-col-icon l-plot-resource icon-plot-resource"></span>
<span title="Activity Links" class="l-col l-col-icon l-col-link icon-chain-links"></span>
<span class="l-col l-title">Title</span>
</div>
</div>
@@ -102,26 +102,23 @@
<!-- TOP PANE GANTT BARS -->
<div class="split-pane-component l-timeline-pane t-pane-h l-pane-top t-timeline-gantt l-timeline-gantt s-timeline-gantt">
<div class="l-hover-btns-holder s-hover-btns-holder t-btns-zoom">
<a class="t-btn l-btn s-btn"
<div class="l-hover-btns-holder s-hover-btns-holder">
<a class="s-button icon-arrows-out"
ng-click="zoomController.fit()"
ng-show="true"
title="Zoom to fit">
<span class="ui-symbol icon zoom-in">I</span>
</a>
<a class="t-btn l-btn s-btn"
<a class="s-button icon-magnify-in"
ng-click="zoomController.zoom(-1)"
ng-show="true"
title="Zoom in">
<span class="ui-symbol icon zoom-in">X</span>
</a>
<a class="t-btn l-btn s-btn"
<a class="s-button icon-magnify-out"
ng-click="zoomController.zoom(1)"
ng-show="true"
title="Zoom out">
<span class="ui-symbol icon zoom-out">Y</span>
</a>
</div>

View File

@@ -37,7 +37,8 @@ define(
// Build graphs for this group of utilizations
function buildGraphs(utilizations) {
var utilizationMap = {},
result = {};
result = {},
startingSOC;
// Bucket utilizations by type
utilizations.forEach(function (u) {
@@ -55,12 +56,14 @@ define(
if (domainObject.getModel().type === 'timeline' &&
result.power &&
domainObject.getModel().capacity > 0) {
startingSOC = isNaN(parseFloat(domainObject.getModel().startingSOC)) ?
100 : parseFloat(domainObject.getModel().startingSOC);
result.battery = new CumulativeGraph(
result.power,
0,
domainObject.getModel().capacity, // Watts
domainObject.getModel().capacity,
(startingSOC / 100) * domainObject.getModel().capacity,
1 / 3600000 // millis-to-hour (since units are watt-hours)
);
}

View File

@@ -26,7 +26,7 @@ define(
/**
* Control for Gantt bars in a timeline view.
* Primarily reesponsible for supporting the positioning of Gantt
* Primarily responsible for supporting the positioning of Gantt
* bars; particularly, this ensures that the left and right edges
* never go to far off screen, because in some environments this
* will effect rendering performance without visible results.

View File

@@ -28,7 +28,7 @@ define(
/**
* Provides labels for the tick mark area of a timeline view.
* Since the tick mark regin is potentially extremeley large,
* Since the tick mark region is potentially extremely large,
* only the subset of ticks which will actually be shown in
* view are provided.
* @constructor

View File

@@ -140,7 +140,7 @@ define(
var timespan = timespans[toId(id)];
// Use as setter if argument is present
if ((typeof value === 'number') && timespan) {
// Set the end (ensuring it doesn't preceed start)
// Set the end (ensuring it doesn't precede start)
timespan.setEnd(
Math.max(value, timespan.getStart())
);

View File

@@ -41,7 +41,7 @@ define(
ids,
candidates;
// Filter an id for inclustion
// Filter an id for inclusion
function include(id) {
return id !== exclude;
}

View File

@@ -101,6 +101,7 @@ define(
it("provides a battery graph for timelines with capacity", function () {
var mockCallback = jasmine.createSpy('callback');
testModel.capacity = 1000;
testModel.startingSOC = 100;
testModel.type = "timeline";
mockDomainObject.useCapability.andReturn(asPromise([
{ key: "power", start: 0, end: 15 }