--修改校验功能

This commit is contained in:
wu ming 2016-11-15 14:51:39 +08:00
parent 673bd343e0
commit 87e135ec62
7 changed files with 2327 additions and 2156 deletions

View File

@ -3,6 +3,9 @@
/// <reference path="systemHelpers.d.ts" /> /// <reference path="systemHelpers.d.ts" />
/// <reference path="systemServices.d.ts" /> /// <reference path="systemServices.d.ts" />
/// <reference path="../../configs/ts/configsUtils.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 { declare module System {
var SystemVerificationController: ng.IModule; var SystemVerificationController: ng.IModule;
} }

22
defs.d.ts vendored
View File

@ -1,22 +1,15 @@
/// <reference path="d.ts/includes.d.ts"/> /// <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/developer/ts/developerNavigation.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/> /// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/> /// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/>
/// <reference path="d.ts/configs/ts/customAlert.d.ts"/> /// <reference path="d.ts/configs/ts/customAlert.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/readPlacedivision.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/kubernetes/ts/kubernetesHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/> /// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerHelper.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/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.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/developerEnrichers.d.ts"/>
@ -25,6 +18,7 @@
/// <reference path="d.ts/developer/ts/home.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/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.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/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.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/jenkinsMetrics.d.ts"/>
@ -37,6 +31,13 @@
/// <reference path="d.ts/developer/ts/projects.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/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.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/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"/>
@ -77,7 +78,6 @@
/// <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/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"/>
/// <reference path="d.ts/system/ts/regionalismCodeSearch.d.ts"/> /// <reference path="d.ts/system/ts/regionalismCodeSearch.d.ts"/>

File diff suppressed because one or more lines are too long

View File

@ -105,6 +105,15 @@
</div> </div>
</div> </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;"> <div class="form-group" style="margin-left:140px;">
<button class="btn sj_btn_blue" type='submit' style="color:#fff;" > <button class="btn sj_btn_blue" type='submit' style="color:#fff;" >
<span class="glyphicon glyphicon-save "></span> 保存 <span class="glyphicon glyphicon-save "></span> 保存

View File

@ -385,6 +385,14 @@
</table> </table>
</script> </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" >&nbsp;</span>
<span ng-show="entity.type== 1" >&nbsp;</span>
</div>
</div>
</script>
<div ng-controller="Kubernetes.TopLevel"> <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="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> <div class="row kubernetes-view" ng-view></div>

View File

@ -45,7 +45,12 @@ module Configs{
{ {
field: "suffix", field: "suffix",
displayName: "表后缀" displayName: "表后缀"
}, },
{
field: "type",
displayName: "标准表汇总库",
cellTemplate: $templateCache.get("strandColumn.html")
},
{ {
field: "entity", field: "entity",
displayName: "操作", displayName: "操作",
@ -67,7 +72,8 @@ module Configs{
$scope.add= true; $scope.add= true;
$scope.edit = false; $scope.edit = false;
$scope.tableForm = {}; $scope.tableForm = {};
$scope.tableForm["id"]=0; $scope.tableForm["id"]=0;
$scope.tableForm["type"]=0;
} }
$scope.cancel = () => { $scope.cancel = () => {

View File

@ -3,9 +3,12 @@
/// <reference path="systemHelpers.ts"/> /// <reference path="systemHelpers.ts"/>
/// <reference path="systemServices.ts"/> /// <reference path="systemServices.ts"/>
/// <reference path="../../configs/ts/configsUtils.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{ 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); shareInit($scope);
$scope.cities = classifyCity(SystemModel.regionalismInfo); $scope.cities = classifyCity(SystemModel.regionalismInfo);
$scope.model = SystemModel; $scope.model = SystemModel;
@ -96,16 +99,84 @@ module System{
} }
$scope.check = () => { $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){ if($scope.tableData && $scope.tableData.length > 0){
angular.forEach($scope.tableData, (item) => { for (var i = 0; i < $scope.tableData.length; ++i) {
if($scope.checkboxes.items[item.id]) var item = $scope.tableData[i];
filter.push(item); 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({ $http({
url: "/java/console/api/checkout/checkList", url: "/java/console/api/checkout/checkList",
method: "POST", method: "POST",
data: filter data: sqlServerDB
}).success((data, header, config, status) => { }).success((data, header, config, status) => {
$scope.tableData = data.data; $scope.tableData = data.data;
var result = []; var result = [];