--修改校验功能
This commit is contained in:
parent
673bd343e0
commit
87e135ec62
|
@ -3,6 +3,9 @@
|
|||
/// <reference path="systemHelpers.d.ts" />
|
||||
/// <reference path="systemServices.d.ts" />
|
||||
/// <reference path="../../configs/ts/configsUtils.d.ts" />
|
||||
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
|
||||
/// <reference path="../../configs/ts/customAlert.d.ts" />
|
||||
/// <reference path="../../configs/ts/configsDataService.d.ts" />
|
||||
declare module System {
|
||||
var SystemVerificationController: ng.IModule;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
/// <reference path="d.ts/includes.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/configPlugin.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/configsDataService.d.ts"/>
|
||||
/// <reference path="d.ts/developer/ts/developerNavigation.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/customAlert.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/readPlacedivision.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/configPlugin.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/configsDataService.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/ConfigsHelper.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/kubernetesHelpers.d.ts"/>
|
||||
/// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/>
|
||||
/// <reference path="d.ts/developer/ts/dataManagerHelper.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/ConfigsHelper.d.ts"/>
|
||||
/// <reference path="d.ts/configs/ts/configsUtils.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/kubernetesPlugin.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/watcher.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/term.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/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"/>
|
||||
|
@ -25,6 +18,7 @@
|
|||
/// <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/kubernetesPlugin.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"/>
|
||||
|
@ -37,6 +31,13 @@
|
|||
/// <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/configs/ts/configsUtils.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/watcher.d.ts"/>
|
||||
/// <reference path="d.ts/kubernetes/ts/term.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/kubeClusterSetting.d.ts"/>
|
||||
/// <reference path="d.ts/navigation/ts/navigationPlugin.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"/>
|
||||
|
@ -77,7 +78,6 @@
|
|||
/// <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/navigation/ts/navigationPlugin.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/regionalismCodeSearch.d.ts"/>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -105,6 +105,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标准表汇总库</label>
|
||||
<div class="col-sm-10 sj_form_input">
|
||||
<select class="form-control" ng-model="tableForm.type">
|
||||
<option value=0 ng-selected="tableForm.type==0" selected>否</option>
|
||||
<option value=1 ng-selected="tableForm.type==1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-left:140px;">
|
||||
<button class="btn sj_btn_blue" type='submit' style="color:#fff;" >
|
||||
<span class="glyphicon glyphicon-save "></span> 保存
|
||||
|
|
|
@ -385,6 +385,14 @@
|
|||
</table>
|
||||
|
||||
</script>
|
||||
<script type="text/ng-template" id="strandColumn.html">
|
||||
<div class="ngCellText" ng-init="entity=row.entity">
|
||||
<div ng-show="true" title="是否是标准表汇总库">
|
||||
<span ng-show="entity.type== 0" > 否</span>
|
||||
<span ng-show="entity.type== 1" > 是</span>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<div ng-controller="Kubernetes.TopLevel">
|
||||
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
|
||||
<div class="row kubernetes-view" ng-view></div>
|
||||
|
|
|
@ -46,6 +46,11 @@ module Configs{
|
|||
field: "suffix",
|
||||
displayName: "表后缀"
|
||||
},
|
||||
{
|
||||
field: "type",
|
||||
displayName: "标准表汇总库",
|
||||
cellTemplate: $templateCache.get("strandColumn.html")
|
||||
},
|
||||
{
|
||||
field: "entity",
|
||||
displayName: "操作",
|
||||
|
@ -68,6 +73,7 @@ module Configs{
|
|||
$scope.edit = false;
|
||||
$scope.tableForm = {};
|
||||
$scope.tableForm["id"]=0;
|
||||
$scope.tableForm["type"]=0;
|
||||
}
|
||||
|
||||
$scope.cancel = () => {
|
||||
|
|
|
@ -3,9 +3,12 @@
|
|||
/// <reference path="systemHelpers.ts"/>
|
||||
/// <reference path="systemServices.ts"/>
|
||||
/// <reference path="../../configs/ts/configsUtils.ts"/>
|
||||
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
|
||||
/// <reference path="../../configs/ts/customAlert.ts"/>
|
||||
/// <reference path="../../configs/ts/configsDataService.ts"/>
|
||||
|
||||
module System{
|
||||
export var SystemVerificationController = controller('SystemVerificationController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', '$element', ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog, SystemModel, $element) => {
|
||||
export var SystemVerificationController = controller('SystemVerificationController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', '$element', '$timeout', 'ConfigsModel', ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog, SystemModel, $element, $timeout, ConfigsModel) => {
|
||||
shareInit($scope);
|
||||
$scope.cities = classifyCity(SystemModel.regionalismInfo);
|
||||
$scope.model = SystemModel;
|
||||
|
@ -96,16 +99,84 @@ module System{
|
|||
}
|
||||
|
||||
$scope.check = () => {
|
||||
var filter = [];
|
||||
var sqlServerDB = [];
|
||||
var oracleDB = [];
|
||||
/**
|
||||
** 检查是否有默认标准表汇总库
|
||||
**/
|
||||
var answer = false;
|
||||
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
|
||||
if(ConfigsModel.oracleParam[i].type == 1){
|
||||
answer = true
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(answer == false){
|
||||
/**
|
||||
提示没有配置标准表汇总库
|
||||
**/
|
||||
Configs.customAlert("提示", "操作失败:没有配置默认的汇总库", '',null, 0, "error");
|
||||
return;
|
||||
}
|
||||
|
||||
if($scope.tableData && $scope.tableData.length > 0){
|
||||
angular.forEach($scope.tableData, (item) => {
|
||||
if($scope.checkboxes.items[item.id])
|
||||
filter.push(item);
|
||||
});
|
||||
for (var i = 0; i < $scope.tableData.length; ++i) {
|
||||
var item = $scope.tableData[i];
|
||||
if($scope.checkboxes.items[item.id]){
|
||||
if(item.collection == '否'){
|
||||
/*
|
||||
**提示出现没有采集数据的信息系统
|
||||
code
|
||||
*/
|
||||
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
|
||||
return;
|
||||
}
|
||||
if(item.dataBaseType == 'ORACLE'){
|
||||
oracleDB.push(item);
|
||||
}else{
|
||||
oracleDB.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(oracleDB.length >= 0){
|
||||
/*
|
||||
此处需要检查数据是否已挂载、正在迁移。
|
||||
*/
|
||||
angular.forEach(oracleDB, (item) =>{
|
||||
Kubernetes.createRC({
|
||||
name: item.areaCode + "-" + item.sysCode + "-" + item.dataVersion,
|
||||
labels: {
|
||||
system: item.sysCode.toString(),
|
||||
version: item.dataVersion.toString(),
|
||||
region: item.areaCode.toString()
|
||||
},
|
||||
annotations: {
|
||||
cityName: item.cityName,
|
||||
districtName: item.districtName,
|
||||
systemName: item.sysName,
|
||||
id: item.dataId+"",
|
||||
year: item.year
|
||||
},
|
||||
path: item.dataPath+"app/",
|
||||
isTarget: "false",
|
||||
isExtract: item.extractStatus
|
||||
}, (rc) =>{
|
||||
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
|
||||
});
|
||||
});
|
||||
$timeout(() => {
|
||||
$location.path('/kubernetes/namespace/default/replicationControllers');
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if(sqlServerDB.length <= 0)
|
||||
return;
|
||||
|
||||
$http({
|
||||
url: "/java/console/api/checkout/checkList",
|
||||
method: "POST",
|
||||
data: filter
|
||||
data: sqlServerDB
|
||||
}).success((data, header, config, status) => {
|
||||
$scope.tableData = data.data;
|
||||
var result = [];
|
||||
|
|
Loading…
Reference in New Issue