|
|
|
/// <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.tableConfig = {
|
|
|
|
data: 'model.transferTasks',
|
|
|
|
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)
|
|
|
|
alert("无法删除正在迁移的数据");
|
|
|
|
else{
|
|
|
|
Configs.oracleInfoOperate($http, "/java/console/api/task/transfer", Configs.OperateType.DELETE, data, (data, status) =>{
|
|
|
|
if(status === 200)
|
|
|
|
console.log("删除成功");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}]);
|
|
|
|
}
|