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.
82 lines
2.7 KiB
82 lines
2.7 KiB
/// <reference path="../../includes.ts"/>
|
|
/// <reference path="developerPlugin.ts"/>
|
|
/// <reference path="dataManagerModel.ts"/>
|
|
/// <reference path="dataManagerHelper.ts"/>
|
|
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
|
|
module Developer {
|
|
export var KubeTaskController = controller("KubeTaskController", ["$scope", "$http", "$location", "$routeParams", "DataModel", "$templateCache", ($scope, $http, $location, $routeParams, DataModel, $templateCache) => {
|
|
$scope.model = DataModel;
|
|
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
|
|
$scope.model.data = [{_key: 2, name: "南京市-玄武区", labels:{system: 34, batch: 2}, status: 1, process:75},
|
|
{_key: 4, name: "南京市-雨花区", labels:{system: 14, batch: 1}, status: 0, process:0},
|
|
{_key: 5, name: "南京市-六合区", labels:{system: 76, batch: 1}, status: 2, process:100},
|
|
{_key: 6, name: "南京市-浦口区", labels:{system: 76, batch: 1}, status: 3, process:97}];
|
|
|
|
$scope.tableConfig = {
|
|
data: 'model.data',
|
|
showSelectionCheckbox: false,
|
|
enableRowClickSelection: false,
|
|
multiSelect: true,
|
|
selectedItems: [],
|
|
filterOptions: {
|
|
filterText: $location.search()["q"] || ''
|
|
},
|
|
columnDefs: [{
|
|
field: "_key",
|
|
displayName: '编码',
|
|
customSortField: (field) =>{
|
|
return field.id;
|
|
}
|
|
},
|
|
{
|
|
field: "name",
|
|
displayName: '市-区/县'
|
|
},
|
|
{
|
|
field: "systemName",
|
|
displayName: '系统名称'
|
|
},
|
|
{
|
|
field: "labels",
|
|
displayName: '数据标签',
|
|
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
|
|
},
|
|
{
|
|
field: "from",
|
|
displayName: '源集群',
|
|
},
|
|
{
|
|
field: "to",
|
|
displayName: '目的集群',
|
|
},
|
|
{
|
|
field: "status",
|
|
displayName: '迁移状态',
|
|
cellTemplate: $templateCache.get("taskStatus.html")
|
|
},
|
|
{
|
|
field: "process",
|
|
displayName: '迁移进度',
|
|
cellTemplate: $templateCache.get("taskProcess.html")
|
|
},
|
|
{
|
|
field: "entity",
|
|
displayName: '操作',
|
|
cellTemplate: $templateCache.get("taskEdit.html")
|
|
}
|
|
]};
|
|
|
|
|
|
$scope.$on("deleteRow", (event, data) =>{
|
|
if(data.status === 1)
|
|
console.log("无法删除");
|
|
else{
|
|
Configs.oracleInfoOperate($http, "/java/console/api/task", Configs.OperateType.DELETE, data, (data, status) =>{
|
|
if(status === 200)
|
|
console.log("删除成功");
|
|
});
|
|
}
|
|
});
|
|
}]);
|
|
}
|