Revert "Add flavor in wizard"

This reverts commit 8ba0dd710a.

Change-Id: Ibfd289b3374a30db42476c510c4ad716f7ab96c7
This commit is contained in:
Jiahua Yan 2014-08-18 23:31:31 +00:00
parent 8ba0dd710a
commit 97643bcd14
5 changed files with 55 additions and 131 deletions

View File

@ -23,10 +23,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"display": "OpenStack", "display": "OpenStack",
"os_installer": "cobbler", "os_installer": "cobbler",
"package_installer": "chef", "package_installer": "chef",
"flavors": [{
"display_name": "allinone",
"id": 1,
"name": "allinone",
"roles": [{ "roles": [{
"display_name": "Compute", "display_name": "Compute",
"name": "os-compute-worker" "name": "os-compute-worker"
@ -39,21 +35,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
}, { }, {
"display_name": "Storage", "display_name": "Storage",
"name": "os-block-storage-worker" "name": "os-block-storage-worker"
}]
}, {
"display_name": "multiroles",
"id": 2,
"name": "multiroles",
"roles": [{
"display_name": "Compute",
"name": "os-compute-worker"
}, {
"display_name": "Controller",
"name": "os-controller"
}, {
"display_name": "Network",
"name": "os-network"
}]
}], }],
"supported_oses": [{ "supported_oses": [{
"name": "CentOs", "name": "CentOs",
@ -68,14 +49,20 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"display": "Hadoop", "display": "Hadoop",
"os_installer": "cobbler", "os_installer": "cobbler",
"package_installer": "chef", "package_installer": "chef",
"roles": [{
"display_name": "Compute",
"name": "os-compute-worker"
}, {
"display_name": "Controller",
"name": "os-controller"
}, {
"display_name": "Network",
"name": "os-network"
}],
"supported_oses": [{ "supported_oses": [{
"name": "CentOs", "name": "CentOs",
"os_id": 1 "os_id": 1
}, { }]
"name": "Ubuntu",
"os_id": 2
}],
"flavors": []
}]; }];
return [200, adapters, {}]; return [200, adapters, {}];
}); });
@ -88,10 +75,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"display": "OpenStack", "display": "OpenStack",
"os_installer": "cobbler", "os_installer": "cobbler",
"package_installer": "chef", "package_installer": "chef",
"flavors": [{
"display_name": "allinone",
"id": 1,
"name": "allinone",
"roles": [{ "roles": [{
"display_name": "Compute", "display_name": "Compute",
"name": "os-compute-worker" "name": "os-compute-worker"
@ -104,21 +87,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
}, { }, {
"display_name": "Storage", "display_name": "Storage",
"name": "os-block-storage-worker" "name": "os-block-storage-worker"
}]
}, {
"display_name": "multiroles",
"id": 2,
"name": "multiroles",
"roles": [{
"display_name": "Compute",
"name": "os-compute-worker"
}, {
"display_name": "Controller",
"name": "os-controller"
}, {
"display_name": "Network",
"name": "os-network"
}]
}], }],
"supported_oses": [{ "supported_oses": [{
"name": "CentOs", "name": "CentOs",
@ -420,22 +388,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"adapter_id": 1, "adapter_id": 1,
"os_id": 1, "os_id": 1,
"editable": true, "editable": true,
"flavor": {
"id": 1,
"roles": [{
"display_name": "Compute",
"name": "os-compute-worker"
}, {
"display_name": "Controller",
"name": "os-controller"
}, {
"display_name": "Network",
"name": "os-network"
}, {
"display_name": "Storage",
"name": "os-block-storage-worker"
}]
},
"create_by": "user@someemail.com", "create_by": "user@someemail.com",
"create_at": "2014-3-25 12:00:00", "create_at": "2014-3-25 12:00:00",
"updated_at": "2014-3-26 13:00:00", "updated_at": "2014-3-26 13:00:00",
@ -447,7 +399,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
return [201, mockResponse, {}]; return [201, mockResponse, {}];
}); });
$httpBackend.whenGET(/\.*\/clusters\/[1-9][0-9]*\/state/).respond(function(method, url, data) { $httpBackend.whenGET(/\.*\/clusters\/[1-9][0-9]*\/state/).respond(function(method, url, data) {
console.log(method, url, data); console.log(method, url, data);
var states = ["UNINITIALIZED", "INITIALIZED", "INSTALLING", "SUCCESSFUL", "ERROR"]; var states = ["UNINITIALIZED", "INITIALIZED", "INSTALLING", "SUCCESSFUL", "ERROR"];
@ -575,22 +526,6 @@ compassAppDev.run(function($httpBackend, settings, $http) {
"create_by": "user@someemail.com", "create_by": "user@someemail.com",
"create_at": "2014-3-25 12:00:00", "create_at": "2014-3-25 12:00:00",
"updated_at": "2014-3-26 13:00:00", "updated_at": "2014-3-26 13:00:00",
"flavor": {
"id": 1,
"roles": [{
"display_name": "Compute",
"name": "os-compute-worker"
}, {
"display_name": "Controller",
"name": "os-controller"
}, {
"display_name": "Network",
"name": "os-network"
}, {
"display_name": "Storage",
"name": "os-block-storage-worker"
}]
},
" links": [{ " links": [{
"href": "/clusters/" + id, "href": "/clusters/" + id,
"rel": "self" "rel": "self"

View File

@ -31,7 +31,7 @@
<div ng-show="createClusterForm.clustername.$error.required" class="help-block col-xs-12 col-sm-reset inline"> Required</div> <div ng-show="createClusterForm.clustername.$error.required" class="help-block col-xs-12 col-sm-reset inline"> Required</div>
</div> </div>
<div class="form-group" ng-class="{'has-error':createClusterForm.targetsystem.$error.required&& !createClusterForm.targetsystem.$pristine}"> <div class="form-group" ng-class="{'has-error':createClusterForm.targetsystem.$error.required&& !createClusterForm.clustername.$pristine}">
<label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right">Target System</label> <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right">Target System</label>
<div class="col-xs-12 col-sm-5"> <div class="col-xs-12 col-sm-5">
@ -43,7 +43,7 @@
<div class="help-block col-xs-12 col-sm-reset inline"> Required </div> <div class="help-block col-xs-12 col-sm-reset inline"> Required </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':createClusterForm.targetsystem.$error.required&& !createClusterForm.targetsystem.$pristine}"> <div class="form-group" ng-class="{'has-error':createClusterForm.targetsystem.$error.required&& !createClusterForm.clustername.$pristine}">
<label class="col-xs-12 col-sm-3 control-label no-padding-right">OS</label> <label class="col-xs-12 col-sm-3 control-label no-padding-right">OS</label>
<div class="col-xs-12 col-sm-5"> <div class="col-xs-12 col-sm-5">
@ -54,18 +54,6 @@
</div> </div>
<div class="help-block col-xs-12 col-sm-reset inline"> Required </div> <div class="help-block col-xs-12 col-sm-reset inline"> Required </div>
</div> </div>
<div class="form-group" ng-hide="flavors.length == 0" ng-class="{'has-error':createClusterForm.flavors.$error.required&& !createClusterForm.flavors.$pristine}">
<label class="col-xs-12 col-sm-3 control-label no-padding-right">Flavor</label>
<div class="col-xs-12 col-sm-5">
<select name="os" class="width-100" ng-model="cluster.flavor_id">
<option value=""></option>
<option ng-repeat="flavor in flavors" value="{{flavor.id}}"> {{flavor.display_name}}</option>
</select>
</div>
</div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@ -388,7 +388,6 @@ var ModalInstanceCtrl = function($scope, $modalInstance, allAdapters, cluster) {
angular.forEach($scope.allAdapters, function(adapter) { angular.forEach($scope.allAdapters, function(adapter) {
if (adapter.id == $scope.cluster.adapter_id) { if (adapter.id == $scope.cluster.adapter_id) {
$scope.supported_oses = adapter.supported_oses; $scope.supported_oses = adapter.supported_oses;
$scope.flavors = adapter.flavors;
} }
}) })
}); });

View File

@ -984,7 +984,11 @@ angular.module('compass.wizard', [
.controller('roleAssignCtrl', function($scope, wizardFactory, dataService, $filter, ngTableParams, sortingService, $q, usSpinnerService) { .controller('roleAssignCtrl', function($scope, wizardFactory, dataService, $filter, ngTableParams, sortingService, $q, usSpinnerService) {
var cluster = wizardFactory.getClusterInfo(); var cluster = wizardFactory.getClusterInfo();
$scope.servers = wizardFactory.getServers(); $scope.servers = wizardFactory.getServers();
$scope.roles = cluster.flavor.roles;
dataService.getAdapter(cluster.adapter_id).success(function(data) {
wizardFactory.setAdapter(data);
$scope.roles = data.roles;
});
dataService.getServerColumns().success(function(data) { dataService.getServerColumns().success(function(data) {
$scope.server_columns = data.showless; $scope.server_columns = data.showless;

View File

@ -39,27 +39,13 @@
Prev Prev
</button> </button>
</div> </div>
<button ng-click="stepForward()" class="btn btn-success btn-next">
<span ng-if="currentStep<steps.length">
<button ng-click="startSpin(); stepForward()" class="btn btn-success btn-next">
Next
<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
</button>
</span>
<span ng-if="currentStep==steps.length">
<button ng-click="deploy()" class="btn btn-success btn-next">
<span>Deploy</span>
</button>
</span>
<!--button ng-click="stepForward()" class="btn btn-success btn-next">
<span ng-if="currentStep<steps.length"> <span ng-if="currentStep<steps.length">
Next Next
<i class="ace-icon fa fa-arrow-right icon-on-right"></i> <i class="ace-icon fa fa-arrow-right icon-on-right"></i>
</span> </span>
<span ng-if="currentStep==steps.length">Deploy</span> <span ng-if="currentStep==steps.length">Deploy</span>
</button--> </button>
</div> </div>
</div> </div>
@ -81,6 +67,18 @@
</div> </div>
</div> </div>
<span ng-if="currentStep<steps.length">
<button ng-click="startSpin(); stepForward()" class="btn btn-success btn-next">
Next
<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
</button>
</span>
<span ng-if="currentStep==steps.length">
<button ng-click="deploy()" class="btn btn-success btn-next">
<span>Deploy</span>
</button>
</span>
</div> </div>
</div> </div>