---数据管理修改
This commit is contained in:
parent
6e799ae0de
commit
37e8e8fb29
|
@ -67,7 +67,7 @@ declare module Kubernetes {
|
|||
**/
|
||||
function checkForExtract(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 alreadyExitInFolder(selectedItems: Array<any>, selectNode: any): boolean;
|
||||
}
|
||||
|
|
|
@ -17,26 +17,6 @@
|
|||
/// <reference path="d.ts/configs/ts/shareController.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/glusterfsSetting.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/breadcrumbs.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/deploymentConfigs.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/hosts.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/tabs.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/system/ts/systemHelpers.d.ts"/>
|
||||
/// <reference path="d.ts/system/ts/systemPlugin.d.ts"/>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -248,8 +248,8 @@ gulp.task('connect', ['watch'], function() {
|
|||
targetPath: '/hawtio/git'
|
||||
}, {
|
||||
proto: "http",
|
||||
port: "8080",
|
||||
hostname: "192.168.0.181",
|
||||
port: "8088",
|
||||
hostname: "192.168.0.110",
|
||||
path: '/java/console/api',
|
||||
targetPath: "/"
|
||||
}];
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
|
||||
请选择迁移集群
|
||||
</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 class="form-group">
|
||||
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">
|
||||
|
|
|
@ -124,22 +124,19 @@ module Developer{
|
|||
}else{
|
||||
tmp_batch=item.submittedBatch;
|
||||
}
|
||||
result.push({
|
||||
id: item.id,
|
||||
_key: item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion,
|
||||
name: item.cityName+ "-" + item.districtName,
|
||||
systemName: item.systemName,
|
||||
status: item.completeStatus,
|
||||
process: item.rate,
|
||||
from: item.dataPath,
|
||||
to: item.dstPath,
|
||||
labels:{
|
||||
dataType: item.dataType,
|
||||
batch: tmp_batch,
|
||||
dataVersion: "版本"+item.dataVersion,
|
||||
dataYear: item.year
|
||||
}
|
||||
});
|
||||
item["_key"] = item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion;
|
||||
item["name"] = item.cityName+ "-" + item.districtName;
|
||||
item["status"] = item.completeStatus;
|
||||
item["from"] = item.dataPath;
|
||||
item["process"] = item.rate;
|
||||
item["to"] = item.dstPath;
|
||||
item["labels"] ={
|
||||
dataType: item.dataType,
|
||||
batch: tmp_batch,
|
||||
dataVersion: "版本"+item.dataVersion,
|
||||
dataYear: item.year
|
||||
}
|
||||
result.push(item);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -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 != ""){
|
||||
Configs.customAlert("提示", "操作失败:" + message + ",不能删除!", '',null, 0, "error");
|
||||
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($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
|
||||
|
|
|
@ -307,11 +307,40 @@ module Kubernetes {
|
|||
/*
|
||||
检查数据否已挂载使用或正在迁移。
|
||||
*/
|
||||
export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>){
|
||||
console.log(selectItem);
|
||||
var message = "";
|
||||
export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>, type:string){
|
||||
var message = "";
|
||||
|
||||
for (var index in selectItem) {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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 != ""){
|
||||
Configs.customAlert("提示", "操作失败:部分数据" + message +",无法删除", '',null, 0, "error");
|
||||
|
|
Loading…
Reference in New Issue