---数据管理修改

This commit is contained in:
wu ming 2016-12-15 08:45:49 +08:00
parent 6e799ae0de
commit 37e8e8fb29
9 changed files with 3041 additions and 3012 deletions

View File

@ -67,7 +67,7 @@ declare module Kubernetes {
**/ **/
function checkForExtract(replicationControllers: Array<any>): any[]; function checkForExtract(replicationControllers: Array<any>): any[];
function checkIsStartSuccess(replicationControllers: Array<any>): any[]; function checkIsStartSuccess(replicationControllers: Array<any>): any[];
function checkForMigration(replicationControllers: Array<KubePod>, transferTasks: Array<any>, selectItem: Array<any>): string; function checkForMigration(replicationControllers: Array<KubePod>, transferTasks: Array<any>, selectItem: Array<any>, type: string): string;
function eliminateChechBoxClick(): void; function eliminateChechBoxClick(): void;
function alreadyExitInFolder(selectedItems: Array<any>, selectNode: any): boolean; function alreadyExitInFolder(selectedItems: Array<any>, selectNode: any): boolean;
} }

40
defs.d.ts vendored
View File

@ -17,26 +17,6 @@
/// <reference path="d.ts/configs/ts/shareController.d.ts"/> /// <reference path="d.ts/configs/ts/shareController.d.ts"/>
/// <reference path="d.ts/configs/ts/glusterfsSetting.d.ts"/> /// <reference path="d.ts/configs/ts/glusterfsSetting.d.ts"/>
/// <reference path="d.ts/configs/ts/kubeClusterSetting.d.ts"/> /// <reference path="d.ts/configs/ts/kubeClusterSetting.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/fileMigrationTask.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsMetrics.d.ts"/>
/// <reference path="d.ts/developer/ts/navbar.d.ts"/>
/// <reference path="d.ts/developer/ts/pipeline.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelineDirective.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelines.d.ts"/>
/// <reference path="d.ts/developer/ts/project.d.ts"/>
/// <reference path="d.ts/developer/ts/projectSelector.d.ts"/>
/// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/apps.d.ts"/> /// <reference path="d.ts/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/build.d.ts"/> /// <reference path="d.ts/kubernetes/ts/build.d.ts"/>
@ -49,6 +29,7 @@
/// <reference path="d.ts/kubernetes/ts/deploymentConfig.d.ts"/> /// <reference path="d.ts/kubernetes/ts/deploymentConfig.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/deploymentConfigs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/deploymentConfigs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/events.d.ts"/> /// <reference path="d.ts/kubernetes/ts/events.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/host.d.ts"/> /// <reference path="d.ts/kubernetes/ts/host.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/hosts.d.ts"/> /// <reference path="d.ts/kubernetes/ts/hosts.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/imageRepositories.d.ts"/> /// <reference path="d.ts/kubernetes/ts/imageRepositories.d.ts"/>
@ -77,6 +58,25 @@
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/> /// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/> /// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/fileMigrationTask.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsMetrics.d.ts"/>
/// <reference path="d.ts/developer/ts/navbar.d.ts"/>
/// <reference path="d.ts/developer/ts/pipeline.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelineDirective.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelines.d.ts"/>
/// <reference path="d.ts/developer/ts/project.d.ts"/>
/// <reference path="d.ts/developer/ts/projectSelector.d.ts"/>
/// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/> /// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/systemHelpers.d.ts"/> /// <reference path="d.ts/system/ts/systemHelpers.d.ts"/>
/// <reference path="d.ts/system/ts/systemPlugin.d.ts"/> /// <reference path="d.ts/system/ts/systemPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

View File

@ -248,8 +248,8 @@ gulp.task('connect', ['watch'], function() {
targetPath: '/hawtio/git' targetPath: '/hawtio/git'
}, { }, {
proto: "http", proto: "http",
port: "8080", port: "8088",
hostname: "192.168.0.181", hostname: "192.168.0.110",
path: '/java/console/api', path: '/java/console/api',
targetPath: "/" targetPath: "/"
}]; }];

View File

@ -65,7 +65,7 @@
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem "> <label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
请选择迁移集群 请选择迁移集群
</label> </label>
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in volumes " /> <select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" id="selectedItem " ng-options="x.name for x in volumes " />
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0"> <div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">

View File

@ -124,22 +124,19 @@ module Developer{
}else{ }else{
tmp_batch=item.submittedBatch; tmp_batch=item.submittedBatch;
} }
result.push({ item["_key"] = item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion;
id: item.id, item["name"] = item.cityName+ "-" + item.districtName;
_key: item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion, item["status"] = item.completeStatus;
name: item.cityName+ "-" + item.districtName, item["from"] = item.dataPath;
systemName: item.systemName, item["process"] = item.rate;
status: item.completeStatus, item["to"] = item.dstPath;
process: item.rate, item["labels"] ={
from: item.dataPath, dataType: item.dataType,
to: item.dstPath, batch: tmp_batch,
labels:{ dataVersion: "版本"+item.dataVersion,
dataType: item.dataType, dataYear: item.year
batch: tmp_batch, }
dataVersion: "版本"+item.dataVersion, result.push(item);
dataYear: item.year
}
});
}); });
return result; return result;
} }

View File

@ -185,7 +185,7 @@ module Developer {
/* /*
使 使
*/ */
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems); var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems, "manager");
if(message != ""){ if(message != ""){
Configs.customAlert("提示", "操作失败:" + message + ",不能删除!", '',null, 0, "error"); Configs.customAlert("提示", "操作失败:" + message + ",不能删除!", '',null, 0, "error");
return; return;
@ -263,7 +263,7 @@ module Developer {
/* /*
使 使
*/ */
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems); var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems, "manager");
if(message == ""){ if(message == ""){
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0) if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)

View File

@ -307,12 +307,41 @@ module Kubernetes {
/* /*
使 使
*/ */
export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>){ export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>, type:string){
console.log(selectItem);
var message = ""; var message = "";
for (var index in selectItem) { for (var index in selectItem) {
var item = selectItem[index]; var item = selectItem[index];
var id = null;
if(type == 'manager')
id = item.id;
if(type == 'verify')
id = item.dataId
/*
*/
for(i in transferTasks){
console.log(transferTasks[i].id);
/*if(transferTasks[i]["_key"] == item["_key"] && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0") && item["year"] == transferTasks[i].labels.dataYear){
message = "数据正在迁移"
return message;
}*/
if(transferTasks[i].fkid == id && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0")){
message = "数据正在迁移"
return message;
}
}
/**
*/
if(item["mark"] == 1)
continue;
/* /*
使 使
*/ */
@ -324,15 +353,6 @@ module Kubernetes {
} }
} }
/*
*/
for(i in transferTasks){
if(transferTasks[i]["_key"] == item["_key"] && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0") && item["year"] == transferTasks[i].labels.dataYear){
message = "数据正在迁移"
return message;
}
}
} }
return message; return message;
} }

View File

@ -143,7 +143,8 @@ module System{
} }
//检查数据是否已启动 //检查数据是否在迁移 //检查数据是否已启动 //检查数据是否在迁移
var message = Kubernetes.checkForMigration(KubernetesModel.replicationControllers, DataModel.transferTasks.transferTasks , filter);
var message = Kubernetes.checkForMigration(KubernetesModel.replicationControllers, DataModel.transferTasks, filter, "verify");
if(message != ""){ if(message != ""){
Configs.customAlert("提示", "操作失败:部分数据" + message +",无法删除", '',null, 0, "error"); Configs.customAlert("提示", "操作失败:部分数据" + message +",无法删除", '',null, 0, "error");