---V1.5版本
This commit is contained in:
parent
1ea7fae6f3
commit
64f0a0e949
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: "/"
|
||||
}];
|
||||
|
|
|
@ -414,7 +414,16 @@
|
|||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/ng-template" id="uploadErrorInfo.html">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<span class="col-md-5"">错误信息:</span>
|
||||
</div>
|
||||
<div class="row" ng-repeat="info in ngDialogData">
|
||||
<span>{{info}}</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>
|
||||
|
|
|
@ -151,9 +151,10 @@ module Configs{
|
|||
|
||||
export function FileInputPlugin(fn: Function, isMultiple?:boolean){
|
||||
var inputObj = document.createElement('input');
|
||||
inputObj.setAttribute('id','myFileInput');
|
||||
inputObj.setAttribute('type','file');
|
||||
inputObj.setAttribute("style",'visibility:hidden');
|
||||
inputObj.setAttribute('id', 'myFileInput');
|
||||
inputObj.setAttribute('type', 'file');
|
||||
inputObj.setAttribute("style", 'visibility:hidden');
|
||||
inputObj.setAttribute("accept", "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
if(isMultiple)
|
||||
inputObj.setAttribute("multiple", "multiple");
|
||||
document.body.appendChild(inputObj);
|
||||
|
|
|
@ -396,9 +396,7 @@ module Developer {
|
|||
break;
|
||||
default:
|
||||
volumeType = 1
|
||||
}
|
||||
console.log(dataType);
|
||||
console.log(volumeType) ;
|
||||
}
|
||||
return {
|
||||
"dataType": dataType,
|
||||
"volumeType": volumeType
|
||||
|
|
|
@ -29,16 +29,16 @@
|
|||
<i class="glyphicon glyphicon-save"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="row clear fr mr5">
|
||||
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="checkSQLSERVER()">
|
||||
<i class="glyphicon glyphicon-save"></i> 抽取
|
||||
</button>
|
||||
</div>
|
||||
<div class="row clear fr mr5">
|
||||
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="check()">
|
||||
<i class="glyphicon glyphicon-save"></i> 校验
|
||||
</button>
|
||||
</div>
|
||||
<div class="row clear fr mr5">
|
||||
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="checkSQLSERVER()">
|
||||
<i class="glyphicon glyphicon-save"></i> 抽取
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 clear">
|
||||
<table ng-show="tableData.length > 0" ng-table="tableParams" class="table table-condensed table-bordered table-striped table_sj_td_center">
|
||||
|
@ -83,6 +83,11 @@
|
|||
<td title="'联系人'">{{row.departmentManager}}</td>
|
||||
<td title="'联系方式'">{{row.managerContacts}}</td>
|
||||
<td title="'数据库类型'">{{row.dataBaseType}}</td>
|
||||
<td title="'存储状态'">
|
||||
<span ng-show="row.mark==0">热区</span>
|
||||
<span ng-show="row.mark==1">冷区</span>
|
||||
<span ng-show="row.mark==null">无</span>
|
||||
</td>
|
||||
<td title="'抽取日志'">
|
||||
<button class="btn sj_btn" ng-click="openLog(row)">
|
||||
<span>查看日志</span>
|
||||
|
|
|
@ -93,22 +93,28 @@ module System{
|
|||
data: JSON.stringify(fileNameList),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
complete: (XMLHttpRequest, textStatus) =>{
|
||||
$("#load").remove();
|
||||
Kubernetes.removeMask();
|
||||
if(XMLHttpRequest.status == 200){
|
||||
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功!", '',null, 0, "success");
|
||||
}else{
|
||||
Configs.customAlert("提示", "操作失败: 本次excel文件录入失败", '',null, 0, "error");
|
||||
}
|
||||
|
||||
},
|
||||
success : (data) =>{
|
||||
$("#load").remove();
|
||||
Kubernetes.removeMask();
|
||||
$scope.model = SystemModel.systemInfoList = data.data;
|
||||
$scope.tableParams.settings({
|
||||
dataset: $scope.model
|
||||
});
|
||||
});
|
||||
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功!", '',null, 0, "success");
|
||||
},
|
||||
error: (MLHttpRequest, textStatus, errorThrown) =>{
|
||||
//Configs.customAlert("提示", "操作失败: 本次excel文件录入失败, " + textStatus, '',null, 0, "error");
|
||||
error: (XMLHttpRequest, textStatus, errorThrown) =>{
|
||||
$("#load").remove();
|
||||
Kubernetes.removeMask();
|
||||
if(XMLHttpRequest["responseJSON"].err && XMLHttpRequest["responseJSON"].err instanceof Array)
|
||||
ngDialog.open({
|
||||
template: 'uploadErrorInfo.html',
|
||||
width: 790,
|
||||
closeByDocument: false,
|
||||
data: XMLHttpRequest["responseJSON"].err,
|
||||
className: 'ngdialog-theme-default'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -124,81 +130,7 @@ module System{
|
|||
element.outerHTML = element.outerHTML;
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
$scope.upLoadExcelFiles = (files) =>{
|
||||
var fileNameList = []; //获取文件名列表
|
||||
angular.forEach(files, (file) => {
|
||||
fileNameList.push(file.name);
|
||||
});
|
||||
|
||||
Configs.create_mask();
|
||||
Kubernetes.create_locadEffect("正在上传文件...");
|
||||
var target = document.getElementById('loading');
|
||||
var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
|
||||
|
||||
var r = new Resumable({
|
||||
target:'/java/console/api/fileOperation/file/upload',
|
||||
chunkSize:1*1024*1024,
|
||||
simultaneousUploads:4,
|
||||
testChunks: false,
|
||||
throttleProgressCallbacks:1,
|
||||
method: "octet"
|
||||
/*headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
|
||||
}*/
|
||||
});
|
||||
if(!r.support){
|
||||
throw "当前浏览器不支持Resumable.js文件上传";
|
||||
}else{
|
||||
angular.forEach(files, (file) => {
|
||||
r.addFile(file);
|
||||
})
|
||||
|
||||
r.on('fileAdded', function(file){
|
||||
r.upload();
|
||||
});
|
||||
|
||||
r.on('complete', function(){
|
||||
$('#loadmsg').html("所以文件上传完毕,正在读取文件中的数据,此过程时间可能会较长,请稍等...");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: UrlHelpers.join("/java/console/api/fileOperation/importExcel"),
|
||||
timeout: 8000 * fileNameList.length,
|
||||
dataType: 'json',
|
||||
data: JSON.stringify(fileNameList),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
complete: (XMLHttpRequest, textStatus) =>{
|
||||
$("#load").remove();
|
||||
Kubernetes.removeMask();
|
||||
if(XMLHttpRequest.status == 200){
|
||||
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功!", '',null, 0, "success");
|
||||
}else{
|
||||
Configs.customAlert("提示", "操作失败: 本次excel文件录入失败", '',null, 0, "error");
|
||||
}
|
||||
},
|
||||
success : (data) =>{
|
||||
$scope.model = SystemModel.systemInfoList = data.data;
|
||||
$scope.tableParams.settings({
|
||||
dataset: $scope.model
|
||||
});
|
||||
},
|
||||
error: (MLHttpRequest, textStatus, errorThrown) =>{
|
||||
//Configs.customAlert("提示", "操作失败: 本次excel文件录入失败, " + textStatus, '',null, 0, "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
r.on('fileProgress', function(file){
|
||||
$('#loadmsg').html("上传文件:" + file.fileName + " " + Math.floor(r.progress()*100) + '%');
|
||||
//Kubernetes.create_locadEffect("上传文件:" + file.name + " " + Math.floor(r.progress()*100) + '%'); //创建数据加载效果层
|
||||
});
|
||||
|
||||
//解决不同重复选择相同文件
|
||||
var element = document.getElementById("file-uploads");
|
||||
element.outerHTML = element.outerHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//excel下载
|
||||
$scope.downLoadExcelFile = () =>{
|
||||
|
|
|
@ -99,7 +99,8 @@ module System{
|
|||
*/
|
||||
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
|
||||
return;
|
||||
}
|
||||
}7
|
||||
|
||||
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
|
||||
if(item.dataBaseType == 'ORACLE'){
|
||||
Configs.customAlert("提示", "操作失败:ORACLE数据请在服务集群界面中抽取标准表!", '',null, 0, "error");
|
||||
|
@ -138,11 +139,9 @@ module System{
|
|||
Configs.customAlert("提示", "操作失败:部分数据不存在,无法删除", '',null, 0, "error");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//检查数据是否在迁移
|
||||
|
||||
//检查数据是否已启动
|
||||
//检查数据是否已启动 //检查数据是否在迁移
|
||||
var message = Kubernetes.checkForMigration(KubernetesModel.replicationControllers, DataModel.transferTasks.transferTasks , filter);
|
||||
|
||||
if(message != ""){
|
||||
|
@ -151,7 +150,7 @@ module System{
|
|||
}
|
||||
|
||||
|
||||
/*UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
|
||||
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
|
||||
collection: filter,
|
||||
index: 'index',
|
||||
onClose: (result:boolean) => {
|
||||
|
@ -187,7 +186,7 @@ module System{
|
|||
customClass: "alert alert-warning sj_alert-warning",
|
||||
cancelText: "取消",
|
||||
cancelClass: 'sj_btn_grey'
|
||||
}).open(); */
|
||||
}).open();
|
||||
}
|
||||
|
||||
$scope.check = () => {
|
||||
|
@ -224,6 +223,15 @@ module System{
|
|||
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
检查数据是否在热区
|
||||
*/
|
||||
|
||||
if(item.mark == 1){
|
||||
Configs.customAlert("提示", "操作失败:选择的系统的数据存储在冷区,请先将数据迁移到热区再检验!", '',null, 0, "error");
|
||||
return
|
||||
}
|
||||
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
|
||||
selectedItems.push(item);
|
||||
if(item.dataBaseType == 'ORACLE'){
|
||||
|
|
Loading…
Reference in New Issue