Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/open933' into open933-frontend
Browse files Browse the repository at this point in the history
Fixes #933
Conflicts:
	platform/features/conductor-v2/src/TimeConductorController.js
  • Loading branch information
charlesh88 committed Jul 11, 2016
2 parents 7b7b21d + 11caa83 commit 84b7a9d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<div class="contents">
<div class="pane left menu-items">
<ul>
<li ng-repeat="option in ngModel.options"
ng-click="ngModel.selected=option.key">
<li ng-repeat="(selected, option) in ngModel.options"
ng-click="ngModel.selected=selected">
<a
ng-mouseover="representation.activeMetadata = option"
ng-mouseleave="representation.activeMetadata = undefined">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<span ng-controller="ClickAwayController as modeController">
<div class="s-menu-btn"
ng-click="modeController.toggle()">
<span class="title-label">{{ngModel.selected}}</span>
<span class="title-label">{{ngModel.options[ngModel.selected].label}}</span>
</div>
<div class="menu super-menu mini mode-selector-menu"
ng-show="modeController.isActive()">
Expand Down
30 changes: 29 additions & 1 deletion platform/features/conductor-v2/res/templates/time-conductor.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
<style>
.time-system .menu{
bottom: 10px;
}
.l-data-availability {
width: 100%;
height: 20px;
background-color: #3b3b3b
}

.l-time-range-inputs-elem {
width: 100%;
}

.l-time-range-inputs-elem.l-flex-row {
justify-content: space-between;
}
.l-axis-holder {
height: 30px;
width: 100%;
}

.l-axis-holder svg, .l-axis-holder svg path,
.l-axis-holder svg line {
stroke: #A0A0A0;
}

</style>
<!-- Parent holder for time conductor. follow-mode | fixed-mode -->
<div ng-controller="TimeConductorController as tcController"
class="l-time-conductor l-flex-col" ng-class="{'follow-mode': followMode}">
class="l-time-conductor l-flex-col {{modeModel.selected}}-mode">
<!-- Holds inputs and ticks -->
<div class="l-time-conductor-ticks l-row-elem l-flex-row flex-elem no-margin">
<form class="abs l-time-conductor-inputs-holder"
Expand Down
17 changes: 8 additions & 9 deletions platform/features/conductor-v2/src/TimeConductorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,36 +62,35 @@ define(

$scope.modeModel = {
selected: 'fixed',
options: [
{
key: 'fixed',
options: {
'fixed': {
glyph: '\ue604',
label: 'Fixed Timespan',
label: 'Fixed',
name: 'Fixed Timespan Mode',
description: 'Query and explore data that falls between two fixed datetimes.'
},
{
key: 'realtime',
'realtime': {
glyph: '\u0043',
label: 'Real-time',
name: 'Real-time Mode',
description: 'Monitor real-time streaming data as it comes in. The Time Conductor and displays will automatically advance themselves based on a UTC clock.'
},
{
key: 'latest',
'latest': {
glyph: '\u0044',
label: 'LAD',
name: 'LAD Mode',
description: 'Latest Available Data mode monitors real-time streaming data as it comes in. The Time Conductor and displays will only advance when data becomes available.'
}
]
}
}
}

TimeConductorController.prototype.initialize = function () {
var now = Math.ceil(Date.now() / 1000) * 1000;
//Set the time conductor to some default
this.conductor.bounds({start: now - SIX_HOURS, end: now});
this.$scope.modeModel.selected = 'fixed';
this.conductor.follow(false);
};

TimeConductorController.prototype.validateStart = function (start) {
Expand Down

0 comments on commit 84b7a9d

Please sign in to comment.