You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/plugins/configs/ts/shareController.ts

40 lines
993 B

/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="configsDataService.ts"/>
module Configs{
export var TableEdit = controller('TableEdit', ['$scope', ($scope) => {
$scope.editRow = (entity)=>{
$scope.$emit('editRow', entity);
}
$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}
}]);
export var VolumeController = controller('VolumeController', ['$scope', ($scope) => {
$scope.save = () =>{
$scope.closeThisDialog();
}
$scope. cancel = () =>{
$scope.closeThisDialog();
}
$scope.deleteBrock = (volume:volume, brock) => {
if(volume.brick.length>1)
deleteBrock(volume, brock);
else
$scope.showMessage = true;
}
$scope.addBrock = (volume) => {
var block = {
ip: "", //存储块的机器ip地址
path: "", //存储块路径
status: false, //存储块的状态
};
addBrock(volume, block);
$scope.showMessage = false;
}
}]);
}