---x新增功能

This commit is contained in:
wu ming 2016-12-15 17:04:42 +08:00
parent 37e8e8fb29
commit baa518014e
19 changed files with 3086 additions and 3012 deletions

View File

@ -26,6 +26,7 @@ declare module Configs {
brick: Array<Brick>;
status: boolean;
editable: boolean;
hot: boolean;
}
interface Brick {
ip: Array<string>;

View File

@ -27,6 +27,7 @@ declare module Configs {
status: boolean;
path: string;
editable?: boolean;
hot?: number;
}
function formatVolumes(volumes: Array<volume>): void;
/**

40
defs.d.ts vendored
View File

@ -17,6 +17,26 @@
/// <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"/>
@ -29,7 +49,6 @@
/// <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"/>
@ -58,25 +77,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/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

View File

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

View File

@ -28,7 +28,9 @@
<span class="">云路径:{{volume.path}}</span>
</th>
<th class="no-fade table-header sj_table_td02">
<span class=""></span>
<span class="">存储类型:</span>
<span ng-show="{{volume.hot==0}}">热区</span>
<span ng-show="{{volume.hot==1}}">冷区</span>
</th>
<th class="no-fade table-header">
<span class="">已用&nbsp;{{volume.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{{volume.formatTotalSize}}</span>

View File

@ -40,10 +40,6 @@
<th>
<input type="text" class="sj_txt_box02 mr5" name="volumePath" ng-model="ngDialogData.path" ng-disabled="!{{ngDialogData.editable}}" ng-pattern="/^(\/[a-z0-9A-Z _\-.%]+)+$/" required="required" />
</th>
<!--<th>
<button ng-show="ngDialogData.status" class="sj_btn_red fl" ng-click="stopVolume(ngDialogData)">停止</button>
<button ng-hide="ngDialogData.status" class="sj_btn_blue fl" ng-click="startVolume(ngDialogData)">启动</button>
</th> -->
</tr>
<tr ng-repeat="row in ngDialogData.brick">
<th class="new_left">
@ -88,8 +84,11 @@
</th>
<!--<th>
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
</th> -->
<th colspan="5" ng-show="!ngDialogData.name">
<span>是否为热区</span>
<input type="checkbox" checked="checked" name="hot" ng-model="ngDialogData.hot"/>
</th>
<!--<th colspan="5">&nbsp;{{message}}</th>-->
</tr>
</tbody>
</table>

View File

@ -147,12 +147,14 @@ module Configs{
editable: block.editable || false
});
});
return {
name: volume.name,
path: volume.path,
brick: brick,
status: volume.status,
editable: volume.editable || false
editable: volume.editable || false,
hot: volume.hot == 0 ? true : false
}
}
@ -169,7 +171,8 @@ module Configs{
path: string
brick: Array<Brick>;
status: boolean;
editable: boolean
editable: boolean,
hot: boolean
}
export interface Brick{

View File

@ -29,7 +29,8 @@ module Configs{
folder?: Array<any>; //volume的文件
status: boolean;
path: string;
editable?: boolean
editable?: boolean,
hot?: number
}
//字节大小转换成字符大小

View File

@ -31,7 +31,8 @@ module Configs{
status: false,
editable: true
}],
editable: true
editable: true,
hot: true
},
className: 'ngdialog-theme-default'
});
@ -128,6 +129,8 @@ module Configs{
}
});
data.hot = data.hot == true ? 0 : 1;
var spinner;
$.ajax({

View File

@ -68,6 +68,7 @@ module Configs{
}
$scope.onSubmit = (entity) => {
console.log(entity);
if($scope.volumeForm.$valid){
$scope.$emit('update', entity);
$scope.closeThisDialog();

View File

@ -233,6 +233,7 @@ module Developer {
,$http:发生http异步请求url;
*/
if(Kubernetes.alreadyExitInFolder($scope.tableConfig.selectedItems, $scope.selectNode)){
migrationClick.close();
Configs.customAlert("提示", "操作失败:" + "数据已在当前目录!", '',null, 0, "error");
@ -260,9 +261,15 @@ module Developer {
},
open: (selected) =>{
var migrationClick = $scope.migrationClick;
ConfigsModel.updateVolumeData();
if(ConfigsModel.cluster!=null)
$scope.volumes = ConfigsModel.cluster;
/*
使
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems, "manager");
if(message == ""){

View File

@ -211,9 +211,12 @@
</script>
<script type="text/ng-template" id="taskEdit.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.TaskEdit">
<button class="btn sj_btn" ng-click="showDeleteOne.open(entity)">
<button class="btn sj_btn" ng-click="showDeleteOne.open(entity)" ng-disabled="entity.status == 1">
<span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;删除
</button>
<button class="btn sj_btn" ng-click="showCancelOne.open(entity)" ng-disabled="entity.process == 100">
<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;取消
</button>
<div hawtio-confirm-dialog="showDeleteOne.show" title="是否删除任务?" ok-button-text="确认" cancel-button-text="取消" on-cancel="showDeleteOne.onCancelled()" on-ok="showDeleteOne.onOk()">
<div class="dialog-body">
<p>
@ -221,6 +224,13 @@
</p>
</div>
</div>
<div hawtio-confirm-dialog="showCancelOne.show" title="是否取消任务?" ok-button-text="确认" cancel-button-text="取消" on-cancel="showCancelOne.onCancelled()" on-ok="showCancelOne.onOk()">
<div class="dialog-body">
<p>
是否取消:{{entity.name}}-{{entity.systemName}} 任务?
</p>
</div>
</div>
</div>
</script>
<!-- 迁移进度条 -->
@ -285,7 +295,6 @@
</div>
</div>
</script>
<script type="text/ng-template" id="isExistHot.html">
<div class="ngCellText" ng-init="entity=row.entity">
<div ng-show="true" title="是否是标准表汇总库">
@ -294,7 +303,6 @@
</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>

View File

@ -135,9 +135,29 @@ module Kubernetes {
showDeleteOne.item = null;
}
};
/*$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}*/
$scope.showCancelOne = {
show: false,
item: null,
open: (entity) => {
/*if(entity.status == 1)
Configs.customAlert("提示", "操作失败: 正在迁移的任务,不能删除!", '',null, 0, "error");
else{*/
var showCancelOne = $scope.showCancelOne;
showCancelOne.show = true;
showCancelOne.item = entity;
//}
},
onOk: () => {
var showCancelOne = $scope.showCancelOne;
$scope.$emit('deleteRow', showCancelOne.item);
},
onCancel: ()=>{
var showCancelOne = $scope.showCancelOne;
showCancelOne.show = false;
showCancelOne.item = null;
}
};
}]);
export var LoadMask = controller('LoadMask', ['$scope', ($scope) => {

View File

@ -324,7 +324,6 @@ module Kubernetes {
*/
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;

View File

@ -135,6 +135,7 @@ module System{
});
}
//审核
$scope.verifySql = (selected, type) => {
ngDialog.open({
template: 'sqlVerification.html',
@ -148,6 +149,7 @@ module System{
});
}
//替换
$scope.moveSql = (selected, type) => {
ngDialog.open({
template: 'sqlMove.html',
@ -195,7 +197,8 @@ module System{
content: data.content
})
}).success((data,header,config,status) => {
//shareUpdate(data);
$scope.model = SystemModel.sqlInfo = data.data;
shareUpdate($scope.model, $scope.optionsFilter);
}).error((data,header,config,status) => {
Configs.customAlert("提示", "脚本替换或归档失败!", '',null, 0, "error");
});

View File

@ -102,7 +102,7 @@ module System{
$scope.tableParams.settings({
dataset: $scope.model
});
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功", '',null, 0, "success");
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data.area + "个行政区划、" + data.system + "个信息系统,更新了" + data.update + "个信息系统", '',null, 0, "success");
},
error: (XMLHttpRequest, textStatus, errorThrown) =>{
$("#load").remove();

View File

@ -230,7 +230,7 @@ module System{
*/
if(item.mark == 1){
if(item.mark == 1 && item.dataBaseType == 'ORACLE'){
Configs.customAlert("提示", "操作失败:选择的系统的数据存储在冷区,请先将数据迁移到热区再检验!", '',null, 0, "error");
return
}
@ -383,7 +383,6 @@ module System{
});
$scope.openLog = (entity) => {
console.log(entity);
var name = entity.areaCode + "_" + entity.sysCode + "_" + entity.dataVersion
var containerName = entity.cityName + "-" + entity.districtName + "-" + entity.sysName + "-版本" + entity.dataVersion;
entity["name"] = name;