From f83d048b53a9c2ec858ee44ddb8a781732dff72d Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 26 Sep 2015 18:20:06 +0100 Subject: Allow selection --- index.html | 16 +++++++++------- js/main.js | 8 ++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 1c69906..5c04113 100644 --- a/index.html +++ b/index.html @@ -8,19 +8,21 @@

Baserock | CIAT

- -
+
+
+ ng-class="{'pass': step.lastBuild.success, 'active': step.data.state == 'building', 'fail': step.lastBuild.failed}" + ng-repeat="step in steps" + ng-click="select(step, $event)"> {{step.name}}
-
-

{{step.name}}

- State: {{step.data.state}} +

{{selected.name}}

+ State: {{selected.data.state}}
+
diff --git a/js/main.js b/js/main.js index 1f366cd..162809e 100644 --- a/js/main.js +++ b/js/main.js @@ -48,6 +48,14 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval) }); } + $scope.selected = null; + $scope.select = function(step, e) { + if (e) { + e.stopPropagation(); + } + $scope.selected = step; + }; + function cancelRefresh() { if (angular.isDefined(autorefresh)) { $interval.cancel(autorefresh); -- cgit v1.2.1