|
|
@ -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",
|
|
|
|