Web_Manager_Develope
wu ming 8 years ago
parent db2884438d
commit 9fba2532f1

File diff suppressed because one or more lines are too long

@ -36,7 +36,6 @@ module Configs{
$scope.editRow = (volume) => { $scope.editRow = (volume) => {
var fVolume = formatVolume(volume); var fVolume = formatVolume(volume);
console.log(fVolume);
ngDialog.open({ ngDialog.open({
template: 'newDialog.html', template: 'newDialog.html',
width: 1005, width: 1005,

@ -13,8 +13,10 @@ module Configs{
}]); }]);
export var VolumeController = controller('VolumeController', ['$scope', '$http', ($scope, $http) => { export var VolumeController = controller('VolumeController', ['$scope', '$http', ($scope, $http) => {
$scope.status = $scope.ngDialogData.status;
$scope.save = (entity) =>{ $scope.save = (entity) =>{
changeStatus(entity); changeStatus(entity);
console.log(entity);
$scope.closeThisDialog(); $scope.closeThisDialog();
} }
@ -41,27 +43,20 @@ module Configs{
} }
$scope.stopVolume = (volume) =>{ $scope.stopVolume = (volume) =>{
volume.status="false"; volume.status = false;
//$scope. status=
} }
$scope.startVolume = (volume) =>{ $scope.startVolume = (volume) =>{
volume.status="true"; volume.status = true;
} }
$scope.$watch("ngDialogData.status", (newValue, oldValue) => {
if(newValue && newValue != oldValue){
$scope.$apply();
console.log($scope.volume)
}
});
function changeStatus(entity){ function changeStatus(entity){
angular.forEach(entity.brick, (brick) =>{ angular.forEach(entity.brick, (brick) =>{
brick["ip"] = brick.ip.join("."); brick["ip"] = brick.ip.join(".");
}); });
console.log(entity);
$http({ $http({
url: "/java/console/api/volume/update", url: "/java/console/api/volume/update",

Loading…
Cancel
Save