Skip to content

Commit

Permalink
[Time Conductor] Fixing bugs found in smoke testing. Fixes #933
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenry committed Sep 10, 2016
1 parent fbab890 commit e639e05
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion example/localTimeSystem/src/LADTickSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define(['../../../platform/features/conductor-v2/conductor/src/timeSystems/Local

this.metadata = {
key: 'test-lad',
mode: 'LAD',
mode: 'lad',
cssclass: 'icon-clock',
label: 'Latest Available Data',
name: 'Latest available data',
Expand Down
12 changes: 5 additions & 7 deletions example/localTimeSystem/src/LocalTimeSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ define([
'../../../platform/features/conductor-v2/conductor/src/timeSystems/LocalClock',
'./LADTickSource'
], function (TimeSystem, LocalClock, LADTickSource) {
var FIFTEEN_MINUTES = 15 * 60 * 1000,
THIRTY_MINUTES = 30 * 60 * 1000,
ONE_HOUR = 60 * 60 * 1000,
var THIRTY_MINUTES = 30 * 60 * 1000,
DEFAULT_PERIOD = 1000;

/**
Expand All @@ -49,22 +47,22 @@ define([
'glyph': '\u0043'
};

this._formats = ['local-format'];
this._tickSources = [new LocalClock($timeout, DEFAULT_PERIOD), new LADTickSource($timeout, DEFAULT_PERIOD)];
this.fmts = ['local-format'];
this.sources = [new LocalClock($timeout, DEFAULT_PERIOD), new LADTickSource($timeout, DEFAULT_PERIOD)];
}

LocalTimeSystem.prototype = Object.create(TimeSystem.prototype);

LocalTimeSystem.prototype.formats = function () {
return this._formats;
return this.fmts;
};

LocalTimeSystem.prototype.deltaFormat = function () {
return 'duration';
};

LocalTimeSystem.prototype.tickSources = function () {
return this._tickSources;
return this.sources;
};

LocalTimeSystem.prototype.defaults = function (key) {
Expand Down
12 changes: 8 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ define([
'./platform/features/pages/bundle',
'./platform/features/plot/bundle',
'./platform/features/timeline/bundle',

// Old time conductor
//'./platform/features/conductor/bundle',
'./platform/features/conductor-v2/conductor/bundle',
'./platform/features/conductor-v2/compatibility/bundle',
'./platform/features/conductor-v2/utcTimeSystem/bundle',

// New time conductor
//'./platform/features/conductor-v2/conductor/bundle',
//'./platform/features/conductor-v2/compatibility/bundle',
//'./platform/features/conductor-v2/utcTimeSystem/bundle',
'./platform/features/table/bundle',
'./platform/forms/bundle',
'./platform/identity/bundle',
Expand All @@ -106,7 +110,7 @@ define([
'./platform/search/bundle',
'./platform/status/bundle',
'./platform/commonUI/regions/bundle'
//'./example/localTimeSystem/bundle'


], function (Main, legacyRegistry) {
return {
Expand Down
6 changes: 1 addition & 5 deletions platform/commonUI/browse/res/templates/browse-object.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,5 @@
</mct-representation>
</div>
</div>
<mct-include key="'time-conductor'" class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder"></mct-include>
<!-- <mct-representation mct-object="domainObject"
key="'time-conductor'"
class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder">
</mct-representation> -->
<mct-include key="'conductor'" class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder"></mct-include>
</div>
1 change: 1 addition & 0 deletions platform/commonUI/themes/espresso/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ $colorProgressBarAmt: $colorKey;
$progressBarHOverlay: 15px;
$progressBarStripeW: 20px;
$shdwStatusIc: rgba(black, 0.4) 0 1px 2px;
$animPausedPulseDur: 500ms;

// Selects
$colorSelectBg: $colorBtnBg;
Expand Down
1 change: 1 addition & 0 deletions platform/commonUI/themes/snow/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ $colorProgressBarAmt: #0a0;
$progressBarHOverlay: 15px;
$progressBarStripeW: 20px;
$shdwStatusIc: rgba(white, 0.8) 0 0px 5px;
$animPausedPulseDur: 1s;

// Selects
$colorSelectBg: $colorBtnBg;
Expand Down
18 changes: 9 additions & 9 deletions platform/features/conductor-v2/conductor/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ define([
],
"templates": [
{
"key": "time-conductor",
"key": "conductor",
"template": timeConductorTemplate
}
],
"representations": [
},
{
"key": "time-conductor",
"template": timeConductorTemplate
"key": "mode-menu",
"template": modeMenuTemplate
},
{
"key": "mode-selector",
"template": modeSelectorTemplate
},
}
],
"representations": [
{
"key": "mode-menu",
"template": modeMenuTemplate
"key": "time-conductor",
"template": timeConductorTemplate
}
],
"formats": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@

// Real-time, latest modes
&.realtime-mode,
&.latest-mode {
&.lad-mode {
.time-conductor-icon {
&:before { color: $colorTimeCondKeyBg; }
div[class*="hand"] {
Expand Down Expand Up @@ -318,7 +318,7 @@
}

// LAD mode
&.latest-mode {
&.lad-mode {
$i: $glyph-icon-database;
.time-conductor-icon div[class*="hand"] {
@include animation-name(clock-hands-sticky);
Expand Down Expand Up @@ -411,7 +411,7 @@

// Real-time, latest modes
&.realtime-mode,
&.latest-mode {
&.lad-mode {
.l-time-conductor-inputs-and-ticks {
.l-time-range-w {
&.start-w {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@
<ul>
<li ng-repeat="(key, metadata) in ngModel.options"
ng-click="ngModel.selectedKey=key">
<a ng-mouseover="representation.activeMetadata = metadata"
ng-mouseleave="representation.activeMetadata = undefined"
<a ng-mouseover="ngModel.activeMetadata = metadata"
ng-mouseleave="ngModel.activeMetadata = undefined"
class="menu-item-a {{metadata.cssclass}}">
{{metadata.name}}
</a>
</li>
</ul>
</div>
<div class="pane right menu-item-description">
<div class="desc-area ui-symbol icon type-icon {{representation.activeMetadata.cssclass}}"></div>
<div
class="desc-area ui-symbol icon type-icon {{ngModel.activeMetadata.cssclass}}"></div>
<div class="desc-area title">
{{representation.activeMetadata.name}}
{{ngModel.activeMetadata.name}}
</div>
<div class="desc-area description">
{{representation.activeMetadata.description}}
{{ngModel.activeMetadata.description}}
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
</div>
<div class="menu super-menu mini mode-selector-menu"
ng-show="modeController.isActive()">
<mct-representation mct-object="domainObject"
key="'mode-menu'"
ng-model="ngModel">
</mct-representation>
<mct-include key="'mode-menu'"
ng-model="ngModel">
</mct-include>
</div>
</span>
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@

<!-- Holds time system and session selectors, and zoom control -->
<div class="l-time-conductor-controls l-row-elem l-flex-row flex-elem">
<mct-representation
<mct-include
key="'mode-selector'"
mct-object="domainObject"
ng-model="modeModel"
class="holder flex-elem menus-up mode-selector">
</mct-representation>
</mct-include>
<mct-control
key="'menu-button'"
class="holder flex-elem menus-up time-system"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ define(
}

//Only show 'LAD mode' if appropriate time systems available
if (timeSystemsForMode('LAD').length > 0) {
if (timeSystemsForMode('lad').length > 0) {
var ladMode = {
key: 'LAD',
key: 'lad',
cssclass: 'icon-database',
label: 'LAD',
name: 'LAD Mode',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ define(['./TimeConductorViewService'], function (TimeConductorViewService) {
var mockTimeSystems = [mockConstructor(tickingTimeSystem)];
var mockLADTickSource = {
metadata: {
mode: 'LAD'
mode: 'lad'
}
};
tickingTimeSystem.tickSources.andReturn([mockLADTickSource]);

viewService = new TimeConductorViewService(mockTimeConductor, mockTimeSystems);

var availableModes = viewService.availableModes();
expect(availableModes.LAD).toBeDefined();
expect(availableModes.lad).toBeDefined();
});

describe("when mode is changed", function () {
Expand Down

0 comments on commit e639e05

Please sign in to comment.