[ui] getting clusters data from /clusters instead of stub
This commit is contained in:
parent
b1c322abd8
commit
1651361969
@ -1,9 +1,8 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
/* Controllers */
|
/* Controllers */
|
||||||
|
|
||||||
angular.module('rubick.controllers', []).
|
angular.module('rubick.controllers', []).
|
||||||
controller('ValidateCtrl', ['$scope', function($scope) {
|
controller('ValidateCtrl', ['$scope', '$http', function($scope, $http) {
|
||||||
$scope.currentStep = "cluster";
|
$scope.currentStep = "cluster";
|
||||||
$scope.ruleGroup = "valid";
|
$scope.ruleGroup = "valid";
|
||||||
|
|
||||||
@ -22,24 +21,13 @@ angular.module('rubick.controllers', []).
|
|||||||
$('#add-cluster-modal').modal('show');
|
$('#add-cluster-modal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.clusters = [
|
$http.get('/clusters').success(function(data) {
|
||||||
{
|
$scope.clusters = data;
|
||||||
name: "Kirill's DevStack",
|
});
|
||||||
description: "Grizzly-based devstack with Quantum and oVS, deployed on Kirill's laptop",
|
|
||||||
sshKey: "beasdfahsldjhfsadg",
|
$http.get('/rules').success(function(data) {
|
||||||
nodesCount: 2,
|
$scope.rules = data;
|
||||||
status: "Available",
|
});
|
||||||
lastChecked: moment().startOf('hour').fromNow()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Peter's DevStack",
|
|
||||||
description: "Grizzly-based devstack deployed on Peter Lomakin's workstation with nova-network and FlatDHCP manager",
|
|
||||||
sshKey: "beasdfahsldjhfsadg",
|
|
||||||
nodesCount: 5,
|
|
||||||
status: "Broken",
|
|
||||||
lastChecked: moment().startOf('day').fromNow()
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
$scope.addCluster = function() {
|
$scope.addCluster = function() {
|
||||||
$scope.newCluster.nodesCount = 20;
|
$scope.newCluster.nodesCount = 20;
|
||||||
@ -48,5 +36,4 @@ angular.module('rubick.controllers', []).
|
|||||||
$scope.newCluster = undefined;
|
$scope.newCluster = undefined;
|
||||||
$('#add-cluster-modal').modal('hide');
|
$('#add-cluster-modal').modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
}])
|
}])
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
ng-class="{'active' : ruleGroup == 'valid'}">
|
ng-class="{'active' : ruleGroup == 'valid'}">
|
||||||
|
|
||||||
<i class="cloud icon"></i> Validty
|
<i class="cloud icon"></i> Validty
|
||||||
<div class="ui label">5</div>
|
<div class="ui label">{{rules.length}}</div>
|
||||||
</a>
|
</a>
|
||||||
<a class="item"
|
<a class="item"
|
||||||
ng-click="setRuleGroup('ha')"
|
ng-click="setRuleGroup('ha')"
|
||||||
@ -104,34 +104,26 @@
|
|||||||
ng-click="setRuleGroup('best')"
|
ng-click="setRuleGroup('best')"
|
||||||
ng-class="{'active' : ruleGroup == 'best'}">
|
ng-class="{'active' : ruleGroup == 'best'}">
|
||||||
<i class="certificate icon"></i> Best Practices
|
<i class="certificate icon"></i> Best Practices
|
||||||
<div class="ui label">2</div>
|
<div class="ui label">0</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="ui fluid accordion" ng-show="ruleGroup == 'valid'">
|
<div class="ui fluid accordion" ng-show="ruleGroup == 'valid'">
|
||||||
<div class="active title">
|
<div ng-repeat="rule in rules">
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
<strong>Feature:</strong> Nova has proper Keystone host
|
|
||||||
</div>
|
|
||||||
<div class="active content">
|
|
||||||
<div class="ui list">
|
|
||||||
<div><strong>Given</strong> I use OpenStack Grizzly 2013.1</div>
|
|
||||||
<div><strong>And</strong> Nova has <code>"auth_strategy"</code> equal to <code>"keystone"</code></div>
|
|
||||||
<div><strong>And</strong> Keystone addresses are <code>@X</code></div>
|
|
||||||
<div><strong>Then</strong> Nova should have <code>"keystone_authtoken.auth_host"</code> in <code>"$X"</code></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
<strong>Feature:</strong> Nova has proper Keystone host
|
{{rule.name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ui link list">
|
{{rule.text}}
|
||||||
<div><strong>Given</strong> I use OpenStack Grizzly 2013.1</div>
|
<!--<div class="ui list">-->
|
||||||
<div><strong>And</strong> Nova has <code>"auth_strategy"</code> equal to <code>"keystone"</code></div>
|
|
||||||
<div><strong>And</strong> Keystone addresses are <code>@X</code></div>
|
<!--<div><strong>Given</strong> I use OpenStack Grizzly 2013.1</div>-->
|
||||||
<div><strong>Then</strong> Nova should have <code>"keystone_authtoken.auth_host"</code> in <code>"$X"</code></div>
|
<!--<div><strong>And</strong> Nova has <code>"auth_strategy"</code> equal to <code>"keystone"</code></div>-->
|
||||||
|
<!--<div><strong>And</strong> Keystone addresses are <code>@X</code></div>-->
|
||||||
|
<!--<div><strong>Then</strong> Nova should have <code>"keystone_authtoken.auth_host"</code> in <code>"$X"</code></div>-->
|
||||||
|
<!--</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user