[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 */
|
||||
|
||||
angular.module('rubick.controllers', []).
|
||||
controller('ValidateCtrl', ['$scope', function($scope) {
|
||||
controller('ValidateCtrl', ['$scope', '$http', function($scope, $http) {
|
||||
$scope.currentStep = "cluster";
|
||||
$scope.ruleGroup = "valid";
|
||||
|
||||
@ -22,24 +21,13 @@ angular.module('rubick.controllers', []).
|
||||
$('#add-cluster-modal').modal('show');
|
||||
}
|
||||
|
||||
$scope.clusters = [
|
||||
{
|
||||
name: "Kirill's DevStack",
|
||||
description: "Grizzly-based devstack with Quantum and oVS, deployed on Kirill's laptop",
|
||||
sshKey: "beasdfahsldjhfsadg",
|
||||
nodesCount: 2,
|
||||
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()
|
||||
}
|
||||
]
|
||||
$http.get('/clusters').success(function(data) {
|
||||
$scope.clusters = data;
|
||||
});
|
||||
|
||||
$http.get('/rules').success(function(data) {
|
||||
$scope.rules = data;
|
||||
});
|
||||
|
||||
$scope.addCluster = function() {
|
||||
$scope.newCluster.nodesCount = 20;
|
||||
@ -48,5 +36,4 @@ angular.module('rubick.controllers', []).
|
||||
$scope.newCluster = undefined;
|
||||
$('#add-cluster-modal').modal('hide');
|
||||
}
|
||||
|
||||
}])
|
||||
|
@ -92,7 +92,7 @@
|
||||
ng-class="{'active' : ruleGroup == 'valid'}">
|
||||
|
||||
<i class="cloud icon"></i> Validty
|
||||
<div class="ui label">5</div>
|
||||
<div class="ui label">{{rules.length}}</div>
|
||||
</a>
|
||||
<a class="item"
|
||||
ng-click="setRuleGroup('ha')"
|
||||
@ -104,34 +104,26 @@
|
||||
ng-click="setRuleGroup('best')"
|
||||
ng-class="{'active' : ruleGroup == 'best'}">
|
||||
<i class="certificate icon"></i> Best Practices
|
||||
<div class="ui label">2</div>
|
||||
<div class="ui label">0</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ui fluid accordion" ng-show="ruleGroup == 'valid'">
|
||||
<div class="active title">
|
||||
<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 ng-repeat="rule in rules">
|
||||
<div class="title">
|
||||
<i class="dropdown icon"></i>
|
||||
{{rule.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">
|
||||
<i class="dropdown icon"></i>
|
||||
<strong>Feature:</strong> Nova has proper Keystone host
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="ui link 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 class="content">
|
||||
{{rule.text}}
|
||||
<!--<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>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user