Skip to content

Commit e639e05

Browse files
committed
[Time Conductor] Fixing bugs found in smoke testing. Fixes #933
1 parent fbab890 commit e639e05

File tree

13 files changed

+44
-45
lines changed

13 files changed

+44
-45
lines changed

example/localTimeSystem/src/LADTickSource.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define(['../../../platform/features/conductor-v2/conductor/src/timeSystems/Local
3030

3131
this.metadata = {
3232
key: 'test-lad',
33-
mode: 'LAD',
33+
mode: 'lad',
3434
cssclass: 'icon-clock',
3535
label: 'Latest Available Data',
3636
name: 'Latest available data',

example/localTimeSystem/src/LocalTimeSystem.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ define([
2525
'../../../platform/features/conductor-v2/conductor/src/timeSystems/LocalClock',
2626
'./LADTickSource'
2727
], function (TimeSystem, LocalClock, LADTickSource) {
28-
var FIFTEEN_MINUTES = 15 * 60 * 1000,
29-
THIRTY_MINUTES = 30 * 60 * 1000,
30-
ONE_HOUR = 60 * 60 * 1000,
28+
var THIRTY_MINUTES = 30 * 60 * 1000,
3129
DEFAULT_PERIOD = 1000;
3230

3331
/**
@@ -49,22 +47,22 @@ define([
4947
'glyph': '\u0043'
5048
};
5149

52-
this._formats = ['local-format'];
53-
this._tickSources = [new LocalClock($timeout, DEFAULT_PERIOD), new LADTickSource($timeout, DEFAULT_PERIOD)];
50+
this.fmts = ['local-format'];
51+
this.sources = [new LocalClock($timeout, DEFAULT_PERIOD), new LADTickSource($timeout, DEFAULT_PERIOD)];
5452
}
5553

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

5856
LocalTimeSystem.prototype.formats = function () {
59-
return this._formats;
57+
return this.fmts;
6058
};
6159

6260
LocalTimeSystem.prototype.deltaFormat = function () {
6361
return 'duration';
6462
};
6563

6664
LocalTimeSystem.prototype.tickSources = function () {
67-
return this._tickSources;
65+
return this.sources;
6866
};
6967

7068
LocalTimeSystem.prototype.defaults = function (key) {

main.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,14 @@ define([
9191
'./platform/features/pages/bundle',
9292
'./platform/features/plot/bundle',
9393
'./platform/features/timeline/bundle',
94+
95+
// Old time conductor
9496
//'./platform/features/conductor/bundle',
95-
'./platform/features/conductor-v2/conductor/bundle',
96-
'./platform/features/conductor-v2/compatibility/bundle',
97-
'./platform/features/conductor-v2/utcTimeSystem/bundle',
97+
98+
// New time conductor
99+
//'./platform/features/conductor-v2/conductor/bundle',
100+
//'./platform/features/conductor-v2/compatibility/bundle',
101+
//'./platform/features/conductor-v2/utcTimeSystem/bundle',
98102
'./platform/features/table/bundle',
99103
'./platform/forms/bundle',
100104
'./platform/identity/bundle',
@@ -106,7 +110,7 @@ define([
106110
'./platform/search/bundle',
107111
'./platform/status/bundle',
108112
'./platform/commonUI/regions/bundle'
109-
//'./example/localTimeSystem/bundle'
113+
110114

111115
], function (Main, legacyRegistry) {
112116
return {

platform/commonUI/browse/res/templates/browse-object.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,5 @@
5959
</mct-representation>
6060
</div>
6161
</div>
62-
<mct-include key="'time-conductor'" class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder"></mct-include>
63-
<!-- <mct-representation mct-object="domainObject"
64-
key="'time-conductor'"
65-
class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder">
66-
</mct-representation> -->
62+
<mct-include key="'conductor'" class="abs holder flex-elem flex-fixed l-flex-row l-time-conductor-holder"></mct-include>
6763
</div>

platform/commonUI/themes/espresso/res/sass/_constants.scss

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ $colorProgressBarAmt: $colorKey;
116116
$progressBarHOverlay: 15px;
117117
$progressBarStripeW: 20px;
118118
$shdwStatusIc: rgba(black, 0.4) 0 1px 2px;
119+
$animPausedPulseDur: 500ms;
119120

120121
// Selects
121122
$colorSelectBg: $colorBtnBg;

platform/commonUI/themes/snow/res/sass/_constants.scss

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ $colorProgressBarAmt: #0a0;
116116
$progressBarHOverlay: 15px;
117117
$progressBarStripeW: 20px;
118118
$shdwStatusIc: rgba(white, 0.8) 0 0px 5px;
119+
$animPausedPulseDur: 1s;
119120

120121
// Selects
121122
$colorSelectBg: $colorBtnBg;

platform/features/conductor-v2/conductor/bundle.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ define([
9393
],
9494
"templates": [
9595
{
96-
"key": "time-conductor",
96+
"key": "conductor",
9797
"template": timeConductorTemplate
98-
}
99-
],
100-
"representations": [
98+
},
10199
{
102-
"key": "time-conductor",
103-
"template": timeConductorTemplate
100+
"key": "mode-menu",
101+
"template": modeMenuTemplate
104102
},
105103
{
106104
"key": "mode-selector",
107105
"template": modeSelectorTemplate
108-
},
106+
}
107+
],
108+
"representations": [
109109
{
110-
"key": "mode-menu",
111-
"template": modeMenuTemplate
110+
"key": "time-conductor",
111+
"template": timeConductorTemplate
112112
}
113113
],
114114
"formats": [

platform/features/conductor-v2/conductor/res/sass/_time-conductor-base.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233

234234
// Real-time, latest modes
235235
&.realtime-mode,
236-
&.latest-mode {
236+
&.lad-mode {
237237
.time-conductor-icon {
238238
&:before { color: $colorTimeCondKeyBg; }
239239
div[class*="hand"] {
@@ -318,7 +318,7 @@
318318
}
319319

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

412412
// Real-time, latest modes
413413
&.realtime-mode,
414-
&.latest-mode {
414+
&.lad-mode {
415415
.l-time-conductor-inputs-and-ticks {
416416
.l-time-range-w {
417417
&.start-w {

platform/features/conductor-v2/conductor/res/templates/mode-selector/mode-menu.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@
2424
<ul>
2525
<li ng-repeat="(key, metadata) in ngModel.options"
2626
ng-click="ngModel.selectedKey=key">
27-
<a ng-mouseover="representation.activeMetadata = metadata"
28-
ng-mouseleave="representation.activeMetadata = undefined"
27+
<a ng-mouseover="ngModel.activeMetadata = metadata"
28+
ng-mouseleave="ngModel.activeMetadata = undefined"
2929
class="menu-item-a {{metadata.cssclass}}">
3030
{{metadata.name}}
3131
</a>
3232
</li>
3333
</ul>
3434
</div>
3535
<div class="pane right menu-item-description">
36-
<div class="desc-area ui-symbol icon type-icon {{representation.activeMetadata.cssclass}}"></div>
36+
<div
37+
class="desc-area ui-symbol icon type-icon {{ngModel.activeMetadata.cssclass}}"></div>
3738
<div class="desc-area title">
38-
{{representation.activeMetadata.name}}
39+
{{ngModel.activeMetadata.name}}
3940
</div>
4041
<div class="desc-area description">
41-
{{representation.activeMetadata.description}}
42+
{{ngModel.activeMetadata.description}}
4243
</div>
4344
</div>
4445
</div>

platform/features/conductor-v2/conductor/res/templates/mode-selector/mode-selector.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
</div>
2828
<div class="menu super-menu mini mode-selector-menu"
2929
ng-show="modeController.isActive()">
30-
<mct-representation mct-object="domainObject"
31-
key="'mode-menu'"
32-
ng-model="ngModel">
33-
</mct-representation>
30+
<mct-include key="'mode-menu'"
31+
ng-model="ngModel">
32+
</mct-include>
3433
</div>
3534
</span>

platform/features/conductor-v2/conductor/res/templates/time-conductor.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@
8383

8484
<!-- Holds time system and session selectors, and zoom control -->
8585
<div class="l-time-conductor-controls l-row-elem l-flex-row flex-elem">
86-
<mct-representation
86+
<mct-include
8787
key="'mode-selector'"
88-
mct-object="domainObject"
8988
ng-model="modeModel"
9089
class="holder flex-elem menus-up mode-selector">
91-
</mct-representation>
90+
</mct-include>
9291
<mct-control
9392
key="'menu-button'"
9493
class="holder flex-elem menus-up time-system"

platform/features/conductor-v2/conductor/src/ui/TimeConductorViewService.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ define(
8585
}
8686

8787
//Only show 'LAD mode' if appropriate time systems available
88-
if (timeSystemsForMode('LAD').length > 0) {
88+
if (timeSystemsForMode('lad').length > 0) {
8989
var ladMode = {
90-
key: 'LAD',
90+
key: 'lad',
9191
cssclass: 'icon-database',
9292
label: 'LAD',
9393
name: 'LAD Mode',

platform/features/conductor-v2/conductor/src/ui/TimeConductorViewServiceSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ define(['./TimeConductorViewService'], function (TimeConductorViewService) {
112112
var mockTimeSystems = [mockConstructor(tickingTimeSystem)];
113113
var mockLADTickSource = {
114114
metadata: {
115-
mode: 'LAD'
115+
mode: 'lad'
116116
}
117117
};
118118
tickingTimeSystem.tickSources.andReturn([mockLADTickSource]);
119119

120120
viewService = new TimeConductorViewService(mockTimeConductor, mockTimeSystems);
121121

122122
var availableModes = viewService.availableModes();
123-
expect(availableModes.LAD).toBeDefined();
123+
expect(availableModes.lad).toBeDefined();
124124
});
125125

126126
describe("when mode is changed", function () {

0 commit comments

Comments
 (0)