添加汇总时,判断汇总是否连接成
This commit is contained in:
parent
e7114cb8f1
commit
31cf574a6d
|
@ -7,6 +7,7 @@
|
||||||
/// <reference path="dataManagerHelper.d.ts" />
|
/// <reference path="dataManagerHelper.d.ts" />
|
||||||
/// <reference path="dataManagerModel.d.ts" />
|
/// <reference path="dataManagerModel.d.ts" />
|
||||||
/// <reference path="../../configs/ts/ConfigsHelper.d.ts" />
|
/// <reference path="../../configs/ts/ConfigsHelper.d.ts" />
|
||||||
|
/// <reference path="../../configs/ts/customAlert.d.ts" />
|
||||||
declare module Developer {
|
declare module Developer {
|
||||||
var WorkspacesController: ng.IModule;
|
var WorkspacesController: ng.IModule;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/// <reference path="../../includes.d.ts" />
|
/// <reference path="../../includes.d.ts" />
|
||||||
/// <reference path="kubernetesInterfaces.d.ts" />
|
/// <reference path="kubernetesInterfaces.d.ts" />
|
||||||
/// <reference path="utilHelpers.d.ts" />
|
/// <reference path="utilHelpers.d.ts" />
|
||||||
|
/// <reference path="../../configs/ts/customAlert.d.ts" />
|
||||||
/// <reference path="readPlacedivision.d.ts" />
|
/// <reference path="readPlacedivision.d.ts" />
|
||||||
/// <reference path="../../configs/ts/ConfigsHelper.d.ts" />
|
/// <reference path="../../configs/ts/ConfigsHelper.d.ts" />
|
||||||
declare module Kubernetes {
|
declare module Kubernetes {
|
||||||
|
@ -211,7 +212,9 @@ declare module Kubernetes {
|
||||||
function getOracleStatus(labels: any): number;
|
function getOracleStatus(labels: any): number;
|
||||||
function getExtractStatus(labels: any): number;
|
function getExtractStatus(labels: any): number;
|
||||||
function getOracleName(name: string): string;
|
function getOracleName(name: string): string;
|
||||||
function extractDataToOracle($http: any, selectedReplicationControllers: any, targetOracle: Configs.oracleParam): void;
|
function extractDataToOracle($http: any, selectedReplicationControllers: any, targetOracle: Configs.oracleParam, fn?: (data, status) => void): void;
|
||||||
function checkoutOracleIsRunning(rc: any): boolean;
|
function checkoutOracleIsRunning(rc: any): boolean;
|
||||||
function replicasIsCreated(replicationcontrollers: Array<any>, name: string): boolean;
|
function replicasIsCreated(replicationcontrollers: Array<any>, name: string): boolean;
|
||||||
|
function createSuccessInfo(icon: string, msg: string): void;
|
||||||
|
function removeMask(): void;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
/// <reference path="kubernetesHelpers.d.ts" />
|
/// <reference path="kubernetesHelpers.d.ts" />
|
||||||
/// <reference path="kubernetesPlugin.d.ts" />
|
/// <reference path="kubernetesPlugin.d.ts" />
|
||||||
/// <reference path="kubernetesModel.d.ts" />
|
/// <reference path="kubernetesModel.d.ts" />
|
||||||
|
/// <reference path="../../configs/ts/customAlert.d.ts" />
|
||||||
declare module Kubernetes {
|
declare module Kubernetes {
|
||||||
var ReplicationControllers: ng.IModule;
|
var ReplicationControllers: ng.IModule;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,4 +7,5 @@ declare module Kubernetes {
|
||||||
var Labels: ng.IModule;
|
var Labels: ng.IModule;
|
||||||
var Status: ng.IModule;
|
var Status: ng.IModule;
|
||||||
var TaskEdit: ng.IModule;
|
var TaskEdit: ng.IModule;
|
||||||
|
var LoadMask: ng.IModule;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,4 +67,5 @@ declare module Kubernetes {
|
||||||
|
|
||||||
**/
|
**/
|
||||||
function checkForExtract(replicationControllers: Array<any>): any[];
|
function checkForExtract(replicationControllers: Array<any>): any[];
|
||||||
|
function checkIsStartSuccess(replicationControllers: Array<any>): any[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
/// <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/kubernetes/ts/readPlacedivision.d.ts"/>
|
/// <reference path="d.ts/kubernetes/ts/readPlacedivision.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"/>
|
||||||
|
@ -38,7 +39,6 @@
|
||||||
/// <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/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"/>
|
||||||
|
@ -79,3 +79,4 @@
|
||||||
/// <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"/>
|
||||||
|
|
|
@ -206,6 +206,71 @@ legend {
|
||||||
.badge-remind {
|
.badge-remind {
|
||||||
background-color: Red;
|
background-color: Red;
|
||||||
}
|
}
|
||||||
|
.custom-alert {
|
||||||
|
width: 300px;
|
||||||
|
border: 2px solid #37B6D1;
|
||||||
|
background-color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.custom-alert-title {
|
||||||
|
line-height: 25px;
|
||||||
|
padding: 0px 5px;
|
||||||
|
background-color: #37B6D1;
|
||||||
|
}
|
||||||
|
.custom-alert-body {
|
||||||
|
cellspacing: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.custom-alert-td {
|
||||||
|
padding: 0px 0px 0px 20;
|
||||||
|
}
|
||||||
|
.custom-alert-img {
|
||||||
|
width: 64;
|
||||||
|
height: 64;
|
||||||
|
}
|
||||||
|
.custom-alert-content {
|
||||||
|
background-color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 20px 0px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.custom-alert-bottom {
|
||||||
|
text-align: center;
|
||||||
|
padding: 0px 0px 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.custom-alert-ok {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
background-color: #CCC;
|
||||||
|
width: 50px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
.custom-alert-cancel {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
background-color: #CCC;
|
||||||
|
width: 50px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
.load-result {
|
||||||
|
z-index: 1000000002;
|
||||||
|
top: 40%;
|
||||||
|
position: absolute;
|
||||||
|
left: 47.5%;
|
||||||
|
}
|
||||||
|
.load-result-msg {
|
||||||
|
z-index: 1000000002;
|
||||||
|
top: 48%;
|
||||||
|
position: absolute;
|
||||||
|
left: 41.5%;
|
||||||
|
}
|
||||||
|
.load-effect-msg {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1000000002;
|
||||||
|
left: 47.5%;
|
||||||
|
top: 48%;
|
||||||
|
}
|
||||||
|
|
||||||
.environment-row a {
|
.environment-row a {
|
||||||
color: black;
|
color: black;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -248,8 +248,8 @@ gulp.task('connect', ['watch'], function() {
|
||||||
targetPath: '/hawtio/git'
|
targetPath: '/hawtio/git'
|
||||||
}, {
|
}, {
|
||||||
proto: "http",
|
proto: "http",
|
||||||
port: "8088",
|
port: "8080",
|
||||||
hostname: "192.168.0.110",
|
hostname: "192.168.191.5",
|
||||||
path: '/java/console/api',
|
path: '/java/console/api',
|
||||||
targetPath: "/"
|
targetPath: "/"
|
||||||
}];
|
}];
|
||||||
|
|
58
index.html
58
index.html
|
@ -29,10 +29,11 @@
|
||||||
<link rel="stylesheet" type="text/css" href="libs/angular-tree-control/css/tree-control-attribute.css">
|
<link rel="stylesheet" type="text/css" href="libs/angular-tree-control/css/tree-control-attribute.css">
|
||||||
<link rel="stylesheet" type="text/css" href="libs/angular-tree-control/css/tree-control.css">
|
<link rel="stylesheet" type="text/css" href="libs/angular-tree-control/css/tree-control.css">
|
||||||
<link rel="stylesheet" href="dist/hawtio-kubernetes.css" />
|
<link rel="stylesheet" href="dist/hawtio-kubernetes.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="new/sj_style.css">
|
<link rel="stylesheet" type="text/css" href="new/sj_style.css">
|
||||||
<!-- ng-table-->
|
<!-- ng-table -->
|
||||||
<link rel="stylesheet" href="libs/ng-table/dist/ng-table.min.css">
|
<link rel="stylesheet" href="libs/ng-table/dist/ng-table.min.css">
|
||||||
|
<!-- spin.js -->
|
||||||
|
<script src="libs/spin.js/spin.js"></script>
|
||||||
<!-- bower:js -->
|
<!-- bower:js -->
|
||||||
<script src="libs/jquery/dist/jquery.js"></script>
|
<script src="libs/jquery/dist/jquery.js"></script>
|
||||||
<script src="libs/angular/angular.js"></script>
|
<script src="libs/angular/angular.js"></script>
|
||||||
|
@ -100,9 +101,8 @@
|
||||||
<script type="text/javascript" src="libs/codemirror/mode/properties/properties.js"></script>
|
<script type="text/javascript" src="libs/codemirror/mode/properties/properties.js"></script>
|
||||||
<script type="text/javascript" src="libs/codemirror/mode/clike/clike.js"></script>
|
<script type="text/javascript" src="libs/codemirror/mode/clike/clike.js"></script>
|
||||||
<script type="text/javascript" src="libs/codemirror/mode/yaml/yaml.js"></script>
|
<script type="text/javascript" src="libs/codemirror/mode/yaml/yaml.js"></script>
|
||||||
|
<!-- ng-table-->
|
||||||
<!-- ng-table-->
|
<script type="text/javascript" src="libs/ng-table/dist/ng-table.js"></script>
|
||||||
<script type="text/javascript" src="libs/ng-table/dist/ng-table.js"></script>
|
|
||||||
<!-- link for js when using the tree as -->
|
<!-- link for js when using the tree as -->
|
||||||
<script type="text/javascript" src="libs/angular-tree-control/angular-tree-control.js"></script>
|
<script type="text/javascript" src="libs/angular-tree-control/angular-tree-control.js"></script>
|
||||||
<script src="libs/bootstrap/dist/js/bootstrap.js"></script>
|
<script src="libs/bootstrap/dist/js/bootstrap.js"></script>
|
||||||
|
@ -110,19 +110,17 @@
|
||||||
<script src="libs/hawtio-extension-service/dist/hawtio-extension-service.js"></script>
|
<script src="libs/hawtio-extension-service/dist/hawtio-extension-service.js"></script>
|
||||||
<script src="libs/hawtio-preferences/dist/hawtio-preferences.js"></script>
|
<script src="libs/hawtio-preferences/dist/hawtio-preferences.js"></script>
|
||||||
<!-- NOTE we need to make sure this is loaded much later than d3.js! -->
|
<!-- NOTE we need to make sure this is loaded much later than d3.js! -->
|
||||||
<script src="libs/nvd3/build/nv.d3.js"></script>
|
<script src="libs/nvd3/build/nv.d3.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.navbar-brand > img {
|
.navbar-brand > img {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
}
|
}
|
||||||
|
/*body {
|
||||||
body {
|
|
||||||
/* overwrite a top-padding from site-base.css in hawtio-ui */
|
/* overwrite a top-padding from site-base.css in hawtio-ui */
|
||||||
padding-top: inherit;
|
/* padding-top: inherit;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb {
|
||||||
/* overwrite the bottom padding from pf's breadcrumb class */
|
/* overwrite the bottom padding from pf's breadcrumb class */
|
||||||
|
@ -140,7 +138,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body id="body">
|
||||||
<nav class="navbar navbar-fixed-top navbar-pf sj_header " role="navigation">
|
<nav class="navbar navbar-fixed-top navbar-pf sj_header " role="navigation">
|
||||||
<a href="/" class="log fl sj_logo"><img src="new/images/logo.png" class="log-img"></a>
|
<a href="/" class="log fl sj_logo"><img src="new/images/logo.png" class="log-img"></a>
|
||||||
<ul class="nav navbar-nav navbar-primary sj_topnav " hawtio-main-nav></ul>
|
<ul class="nav navbar-nav navbar-primary sj_topnav " hawtio-main-nav></ul>
|
||||||
|
@ -148,7 +146,7 @@
|
||||||
<li class="">
|
<li class="">
|
||||||
<a href="/config/regionalism-code/searching" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="/config/regionalism-code/searching" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<span class="glyphicon glyphicon-search"></span> 帮助
|
<span class="glyphicon glyphicon-search"></span> 帮助
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
|
@ -159,15 +157,15 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="sj_content_position clear" style="margin-top:70px;">
|
<div class="sj_content_position clear" style="margin-top:70px;">
|
||||||
<ul >
|
<ul>
|
||||||
<li class="sj_icons_home"></li>
|
<li class="sj_icons_home"></li>
|
||||||
<li>当前位置:</li>
|
<li>当前位置:</li>
|
||||||
<li><a href="#">数据汇总</a> <span>></span></li>
|
<li><a href="#">数据汇总</a> <span>></span></li>
|
||||||
<li><a href="#">社保系统</a><span>></span></li>
|
<li><a href="#">社保系统</a><span>></span></li>
|
||||||
<li><a href="#">批次A</a></li>
|
<li><a href="#">批次A</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<platform-sub-tabs-outlet></platform-sub-tabs-outlet>
|
<platform-sub-tabs-outlet></platform-sub-tabs-outlet>
|
||||||
<div id="main" class="container-fluid container-pf-nav-pf-vertical container-pf-nav-pf-vertical-with-secondary content-margin" ng-controller="HawtioNav.ViewController" hawtio-main-outlet>
|
<div id="main" class="container-fluid container-pf-nav-pf-vertical container-pf-nav-pf-vertical-with-secondary content-margin" ng-controller="HawtioNav.ViewController" hawtio-main-outlet>
|
||||||
<div class="row" ng-class="getClass()">
|
<div class="row" ng-class="getClass()">
|
||||||
|
@ -179,6 +177,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="dist/hawtio-kubernetes.js"></script>
|
<script src="dist/hawtio-kubernetes.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var screenHeight = $(window).height();
|
||||||
|
var screenWidth = $(window).width();
|
||||||
|
$("#body").css("height", screenHeight);
|
||||||
|
$("#body").css("width", screenWidth);
|
||||||
|
$(window).resize(function(){
|
||||||
|
var screenWidth = $(window).width();
|
||||||
|
var newHeight = $(window).height();
|
||||||
|
$("#body").css("height", newHeight);
|
||||||
|
$("#body").css("width", screenWidth);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div hawtio-tabs></div>
|
<div hawtio-tabs></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-content sj_content">
|
<div class="container-content sj_content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="mb10">
|
<div class="mb10">
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div hawtio-tabs></div>
|
<div hawtio-tabs></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container-content ">
|
|
||||||
|
<div class="container-content">
|
||||||
<div class="row align-center mb10" ng-hide="model.oracleParam.length">
|
<div class="row align-center mb10" ng-hide="model.oracleParam.length">
|
||||||
<p class="alert alert-info">当前没有配置汇总库信息,请配置,否则汇总操作将不可用!</p>
|
<p class="alert alert-info">当前没有配置汇总库信息,请配置,否则汇总操作将不可用!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/ng-template" id="connectStatus.html">
|
<script type="text/ng-template" id="connectStatus.html">
|
||||||
<div class="ngCellText" ng-init="entity=row.entity">
|
<div class="ngCellText" ng-init="entity=row.entity">
|
||||||
<div ng-show="true" title="汇总库的连接状态">
|
<div ng-show="true" title="汇总库的连接状态">
|
||||||
|
@ -26,22 +27,21 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/ng-template" id="newDialog.html">
|
<script type="text/ng-template" id="newDialog.html">
|
||||||
<div class="sj_new_box">
|
<div class="sj_new_box">
|
||||||
<form name="volumeForm" class=" mb10" novalidate="novalidate">
|
<form name="volumeForm" class=" mb10" novalidate="novalidate">
|
||||||
<table class="sj_new_table clear">
|
<table class="sj_new_table clear">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="new_left">云盘名</th>
|
<th class="new_left">云盘名</th>
|
||||||
<th colspan="10">
|
<th colspan="10">
|
||||||
<input type="text" class="sj_txt_box03 mr10" name="volumeName" ng-model="ngDialogData.name " ng-disabled="!{{ngDialogData.editable}}" ng-pattern="/^\w{2,15}$/" required="required"/>
|
<input type="text" class="sj_txt_box03 mr10" name="volumeName" ng-model="ngDialogData.name " ng-disabled="!{{ngDialogData.editable}}" ng-pattern="/^\w{2,15}$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>云目录:</th>
|
<th>云目录:</th>
|
||||||
<th>
|
<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"/>
|
<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>
|
||||||
<th ng-show="ngDialogData.status" class="new_left sj_c_green">已启用</th>
|
|
||||||
<th ng-hide="ngDialogData.status" class="new_left sj_c_green">已停止</th>
|
|
||||||
<!--<th>
|
<!--<th>
|
||||||
<button ng-show="ngDialogData.status" class="sj_btn_red fl" ng-click="stopVolume(ngDialogData)">停止</button>
|
<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>
|
<button ng-hide="ngDialogData.status" class="sj_btn_blue fl" ng-click="startVolume(ngDialogData)">启动</button>
|
||||||
|
@ -50,44 +50,44 @@
|
||||||
<tr ng-repeat="row in ngDialogData.brick">
|
<tr ng-repeat="row in ngDialogData.brick">
|
||||||
<th class="new_left">
|
<th class="new_left">
|
||||||
<span ng-show="row.status" class="sj_icon_ok"></span>
|
<span ng-show="row.status" class="sj_icon_ok"></span>
|
||||||
<span ng-hide="row.status" class="sj_icon_warning">
|
<span ng-hide="row.status" class="sj_icon_warning"></span>
|
||||||
</th>
|
</th>
|
||||||
<th colspan="3">
|
<th colspan="3">
|
||||||
<input type="text" class="sj_txt_box04 mr5" value="服务器 {{$index + 1}} " ng-disabled="true" />
|
<input type="text" class="sj_txt_box04 mr5" value="服务器 {{$index + 1}} " ng-disabled="true" />
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<input type="text" class="sj_txt_box05" ng-model="row.ip[0]" name="brickIp0" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required"/>
|
<input type="text" class="sj_txt_box05" ng-model="row.ip[0]" name="brickIp0" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>.</th>
|
<th>.</th>
|
||||||
<th>
|
<th>
|
||||||
<input type="text" class="sj_txt_box05" ng-model="row.ip[1]" name="brickIp1" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required"/>
|
<input type="text" class="sj_txt_box05" ng-model="row.ip[1]" name="brickIp1" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>.</th>
|
<th>.</th>
|
||||||
<th>
|
<th>
|
||||||
<input type="text" class="sj_txt_box05" ng-model="row.ip[2]" name="brickIp2" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required"/>
|
<input type="text" class="sj_txt_box05" ng-model="row.ip[2]" name="brickIp2" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>.</th>
|
<th>.</th>
|
||||||
<th>
|
<th>
|
||||||
<input type="text" class="sj_txt_box05 mr10" ng-model="row.ip[3]" name="brickIp3" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required"/>
|
<input type="text" class="sj_txt_box05 mr10" ng-model="row.ip[3]" name="brickIp3" ng-disabled="!{{row.editable}}" ng-pattern="/^(([0-9]|([1-9]\d)|(1\d\d)|(2([0-4]\d|5[0-5]))))$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>存储块:</th>
|
<th>存储块:</th>
|
||||||
<th>
|
<th>
|
||||||
<input type="text" class="sj_txt_box02 mr5" ng-model="row.path" name="brickPath" ng-disabled="!{{row.editable}}" ng-pattern="/^(\/[a-z0-9A-Z \-_.%]+)+$/" required="required"/>
|
<input type="text" class="sj_txt_box02 mr5" ng-model="row.path" name="brickPath" ng-disabled="!{{row.editable}}" ng-pattern="/^(\/[a-z0-9A-Z \-_.%]+)+$/" required="required" />
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<!--<button class="sj_btn_grey fl">连接</button>-->
|
<!--<button class="sj_btn_grey fl">连接</button>-->
|
||||||
<a href="#" class="sj_icon_del ml5 fl" ng-show="ngDialogData.brick.length>1" ng-click="deleteBrock(ngDialogData, row)"></a>
|
<a href="#" class="sj_icon_del ml5 fl" ng-show="ngDialogData.brick.length>1" ng-click="deleteBrock(ngDialogData, row)"></a>
|
||||||
<a href="#" ng-hide ="$index < ngDialogData.brick.length-1" class="sj_icon_add ml5 fl" ng-click="addBrock(ngDialogData)"></a>
|
<a href="#" ng-hide="$index < ngDialogData.brick.length-1" class="sj_icon_add ml5 fl" ng-click="addBrock(ngDialogData)"></a>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th>
|
<th>
|
||||||
<button class="sj_btn_blue mr5" ng-click="onSubmit(ngDialogData)" >保存</button>
|
<button class="sj_btn_blue mr5" ng-click="onSubmit(ngDialogData)">保存</button>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
|
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
|
||||||
</th>
|
</th>
|
||||||
<!--<th>
|
<!--<th>
|
||||||
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
|
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
|
||||||
</th>
|
</th>
|
||||||
|
@ -96,10 +96,11 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="alert alert-warning" role="alert" ng-show="showMessage">"删除存储块失败:集群中至少包含一个存储块!"</div>
|
<div class="alert alert-warning" role="alert" ng-show="showMessage">"删除存储块失败:集群中至少包含一个存储块!"</div>
|
||||||
<div class="alert alert-warning" role="alert" ng-show="volumeForm.$invalid && submitted">云盘的名称、路径或Ip输入不正确</div>
|
<div class="alert alert-warning" role="alert" ng-show="volumeForm.$invalid && submitted">云盘的名称、路径或Ip输入不正确</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</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>
|
||||||
|
|
|
@ -59,7 +59,20 @@ module Configs{
|
||||||
}
|
}
|
||||||
|
|
||||||
export function shareInit($scope, $location, $routeParams){
|
export function shareInit($scope, $location, $routeParams){
|
||||||
$scope. subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
|
$scope. subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
|
||||||
|
$scope.mask = true;
|
||||||
|
/**
|
||||||
|
创建全屏遮挡
|
||||||
|
*/
|
||||||
|
$("#mask").css("position", "absolute");
|
||||||
|
$("#mask").css("background", "black");
|
||||||
|
$("#mask").css("opacity", 0.4);
|
||||||
|
$("#mask").css("filter", "progid:DXImageTransform.Microsoft.Alpha(style=4,opacity=25)");
|
||||||
|
$("#mask").css("top", "0px");
|
||||||
|
$("#mask").css("left", "0px");
|
||||||
|
$("#mask").css("width", document.body.clientWidth + document.body.scrollLeft);
|
||||||
|
$("#mask").css("height", document.body.clientHeight + document.body.scrollTop);
|
||||||
|
$("#mask").css("zIndex", 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createNewObejct(array:Array<any>, obj){
|
export function createNewObejct(array:Array<any>, obj){
|
||||||
|
|
|
@ -19,6 +19,7 @@ module Configs{
|
||||||
controller:'Configs.VolumeController',
|
controller:'Configs.VolumeController',
|
||||||
width: 1005,
|
width: 1005,
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
|
closeByDocument : false,
|
||||||
data: {
|
data: {
|
||||||
name: '',
|
name: '',
|
||||||
path: '',
|
path: '',
|
||||||
|
@ -43,7 +44,8 @@ module Configs{
|
||||||
data: fVolume,
|
data: fVolume,
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
className: 'ngdialog-theme-default',
|
className: 'ngdialog-theme-default',
|
||||||
controller: 'Configs.VolumeController'
|
controller: 'Configs.VolumeController',
|
||||||
|
closeByDocument : false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,18 +88,36 @@ module Configs{
|
||||||
ip.push(brick["ip"][key]);
|
ip.push(brick["ip"][key]);
|
||||||
brick["ip"] = ip.join("\.");
|
brick["ip"] = ip.join("\.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "/java/console/api/volume/update",
|
||||||
|
timeout: 8000,
|
||||||
|
dataType: 'json',
|
||||||
|
//async: false,
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
beforeSend: () => {
|
||||||
|
|
||||||
|
},
|
||||||
|
complete: (XMLHttpRequest, textStatus) => {
|
||||||
|
if(XMLHttpRequest.status == 200)
|
||||||
|
console.log("成功");
|
||||||
|
else
|
||||||
|
console.log("失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$http({
|
/*$http({
|
||||||
url: "/java/console/api/volume/update",
|
url: "/java/console/api/volume/update",
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data
|
data: data
|
||||||
}).success(function(data,header,config,status){
|
}).success(function(data,header,config,status){
|
||||||
$scope.model.updateVolumeData();
|
$scope.model.updateVolumeData();
|
||||||
console.log("更新了");
|
|
||||||
}).error(function(data,header,config,status){
|
}).error(function(data,header,config,status){
|
||||||
|
|
||||||
});
|
});*/
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
|
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
|
||||||
module Developer {
|
module Developer {
|
||||||
|
|
||||||
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl']);
|
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl', 'ngDialog']);
|
||||||
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
|
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
|
||||||
export var route = PluginHelpers.createRoutingFunction(templatePath);
|
export var route = PluginHelpers.createRoutingFunction(templatePath);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ module Developer {
|
||||||
log.debug("Running");
|
log.debug("Running");
|
||||||
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
||||||
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
||||||
|
// viewRegistry['workspaces'] = Configs.templatePath + 'shareLayout.html';
|
||||||
|
|
||||||
var builder = HawtioNav.builder();
|
var builder = HawtioNav.builder();
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
/// <reference path="dataManagerHelper.ts"/>
|
/// <reference path="dataManagerHelper.ts"/>
|
||||||
/// <reference path="dataManagerModel.ts"/>
|
/// <reference path="dataManagerModel.ts"/>
|
||||||
/// <reference path="../../configs/ts/configsHelper.ts"/>
|
/// <reference path="../../configs/ts/configsHelper.ts"/>
|
||||||
|
/// <reference path="../../configs/ts/customAlert.ts"/>
|
||||||
|
|
||||||
module Developer {
|
module Developer {
|
||||||
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element",
|
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element", "ngDialog",
|
||||||
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element) => {
|
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element, ngDialog) => {
|
||||||
$scope.model=DataModel;
|
$scope.model=DataModel;
|
||||||
$scope.replicasModel = KubernetesModel;
|
$scope.replicasModel = KubernetesModel;
|
||||||
init($scope, $location, $routeParams);
|
init($scope, $location, $routeParams);
|
||||||
|
@ -157,6 +158,15 @@ module Developer {
|
||||||
id: selected
|
id: selected
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
判断数据是否已挂载使用,返回已挂载使用的数据项列表,长度为0表示当前所选迁移数据项中任何数据文件都未被挂载使用。
|
||||||
|
*/
|
||||||
|
var exitedItems = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers,$scope.tableConfig.selectedItems);
|
||||||
|
if(exitedItems.length > 0){
|
||||||
|
Configs.customAlert("提示", "操作失败:正在使用的数据文件不能删除!", '',null, 0, "error");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
|
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
|
||||||
collection: selected,
|
collection: selected,
|
||||||
index: 'id',
|
index: 'id',
|
||||||
|
@ -194,38 +204,58 @@ module Developer {
|
||||||
selectedItem: {"name": "当前没有可以迁移的集群"},
|
selectedItem: {"name": "当前没有可以迁移的集群"},
|
||||||
dialog: new UI.Dialog(),
|
dialog: new UI.Dialog(),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
var migrationClick = $scope.migrationClick;
|
var migrationClick = $scope.migrationClick;
|
||||||
var exitedItems = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers,$scope.tableConfig.selectedItems);
|
/*
|
||||||
if(exitedItems.length == 0){
|
向后台发生数据迁移请求,$http:发生http异步请求;第二个参数:请求url;第三个参数:请求操作类型;第四个参数:请求携带的数据;第五个参数:
|
||||||
Configs.oracleInfoOperate($http, "/java/console/api/volume", Configs.OperateType.MOVE,
|
一个回调函数,请求响应后的回调函数。
|
||||||
{
|
*/
|
||||||
"name": migrationClick.selectedItem.name,
|
Configs.oracleInfoOperate($http, "/java/console/api/volume", Configs.OperateType.MOVE,
|
||||||
"selectItems": $scope.tableConfig.selectedItems,
|
{
|
||||||
"selectNode": $scope.selectNode
|
"name": migrationClick.selectedItem.name,
|
||||||
}, (result, status) => {
|
"selectItems": $scope.tableConfig.selectedItems,
|
||||||
if(status===200){
|
"selectNode": $scope.selectNode
|
||||||
|
}, (result, status) => {
|
||||||
|
if(status===200){
|
||||||
//$scope.model.updateOracleParam();
|
//$scope.model.updateOracleParam();
|
||||||
}else{
|
}else
|
||||||
throw "资源请求失败";
|
throw "资源请求失败";
|
||||||
}
|
});
|
||||||
});
|
/*
|
||||||
$timeout(() =>{
|
页面跳转
|
||||||
|
*/
|
||||||
|
$timeout(() =>{
|
||||||
$location.path("/workspaces/Overview/task");
|
$location.path("/workspaces/Overview/task");
|
||||||
},250);
|
},250);
|
||||||
migrationClick.close();
|
migrationClick.close();
|
||||||
}else{
|
|
||||||
var name = "";
|
|
||||||
angular.forEach(exitedItems, (item) => {
|
|
||||||
name += item.name + "-" + item.systemName + ",";
|
|
||||||
})
|
|
||||||
alert("迁移数据文件失败:" + name +"数据文件正在使用....");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
open: (selected) =>{
|
open: (selected) =>{
|
||||||
var migrationClick = $scope.migrationClick;
|
var migrationClick = $scope.migrationClick;
|
||||||
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
|
/*
|
||||||
migrationClick.selectedItem = $scope.volumes[0];
|
判断数据是否已挂载使用,返回已挂载使用的数据项列表,长度为0表示当前所选迁移数据项中任何数据文件都未被挂载使用。
|
||||||
migrationClick.dialog.open();
|
*/
|
||||||
|
var exitedItems = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers,$scope.tableConfig.selectedItems);
|
||||||
|
/*
|
||||||
|
判断数据是否已在当前目录,返回当前所选目录已存在的数据文件。
|
||||||
|
*/
|
||||||
|
var result = [];
|
||||||
|
angular.forEach($scope.tableConfig.selectedItem, (item) => {
|
||||||
|
if(item.dataPath == $scope.selectNode["path"])
|
||||||
|
result.push(item);
|
||||||
|
});
|
||||||
|
/*
|
||||||
|
数据不在当前所选目录,且未被挂载启动,执行迁移操作
|
||||||
|
*/
|
||||||
|
if(exitedItems.length == 0 && result.length == 0){
|
||||||
|
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
|
||||||
|
migrationClick.selectedItem = $scope.volumes[0];
|
||||||
|
migrationClick.dialog.open();
|
||||||
|
}else if(exitedItems.length == 0 && result.length >0){ //任何数据文件都未被挂载使用,当有部分数据文件已存在所选迁移目录
|
||||||
|
Configs.customAlert("提示", "操作失败: 部分数据文件已在当前目录存在!", '',null, 0, "error");
|
||||||
|
}else if(exitedItems.length > 0 && result.length == 0){
|
||||||
|
Configs.customAlert("提示", "操作失败:正在使用的数据文件不能被迁移!", '',null, 0, "error");
|
||||||
|
}else{
|
||||||
|
Configs.customAlert("提示", "操作失败:部分数据文件正被使用且有部分数据文件已在当前目录存在!", '',null, 0, "error");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
close: () => {
|
close: () => {
|
||||||
$scope.migrationClick.selectedItem = {"name": "当前没有可以迁移的集群"};
|
$scope.migrationClick.selectedItem = {"name": "当前没有可以迁移的集群"};
|
||||||
|
@ -269,8 +299,9 @@ module Developer {
|
||||||
var name = "";
|
var name = "";
|
||||||
angular.forEach(exitedItems, (item) => {
|
angular.forEach(exitedItems, (item) => {
|
||||||
name += item.name + "-" + item.systemName + ",";
|
name += item.name + "-" + item.systemName + ",";
|
||||||
})
|
});
|
||||||
alert("迁移数据文件失败:" + name +"数据文件正在使用....");
|
console.log(exitedItems);
|
||||||
|
Configs.customAlert("提示", "操作失败: 正在迁移的数据不能被启动!", '', null, 0, "error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,6 +265,15 @@
|
||||||
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
|
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/ng-template" id="loadingMask.html">
|
||||||
|
<div class="custom-alert">
|
||||||
|
<div id="loading">
|
||||||
|
<span ng-bind="ngDialogData.msg" />
|
||||||
|
</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>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/// <reference path="../../includes.ts"/>
|
/// <reference path="../../includes.ts"/>
|
||||||
/// <reference path="kubernetesInterfaces.ts"/>
|
/// <reference path="kubernetesInterfaces.ts"/>
|
||||||
/// <reference path="utilHelpers.ts"/>
|
/// <reference path="utilHelpers.ts"/>
|
||||||
|
/// <reference path="../../configs/ts/customAlert.ts"/>
|
||||||
/// <reference path="readPlacedivision.ts"/>
|
/// <reference path="readPlacedivision.ts"/>
|
||||||
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
|
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
|
||||||
module Kubernetes {
|
module Kubernetes {
|
||||||
|
@ -1804,7 +1805,7 @@ module Kubernetes {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function extractDataToOracle($http, selectedReplicationControllers, targetOracle: Configs.oracleParam){
|
export function extractDataToOracle($http, selectedReplicationControllers, targetOracle: Configs.oracleParam, fn?:(data, status) => void){
|
||||||
//console.log(targetReplicationController.length);
|
//console.log(targetReplicationController.length);
|
||||||
var answer = targetOracle && true;
|
var answer = targetOracle && true;
|
||||||
var inneedOracle = [];
|
var inneedOracle = [];
|
||||||
|
@ -1820,10 +1821,39 @@ module Kubernetes {
|
||||||
});
|
});
|
||||||
|
|
||||||
if(answer){
|
if(answer){
|
||||||
var data ={"name": targetOracle.id, "target": targetOracle, "inneed": inneedOracle};
|
var data ={"name": targetOracle.id, "target": targetOracle, "inneed": inneedOracle};
|
||||||
Configs.oracleInfoOperate($http, "/java/console/api/oracle", Configs.OperateType.EXTRACT, data);
|
var spinner;
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: UrlHelpers.join("/java/console/api/oracle", targetOracle.id+"", "extract"),
|
||||||
|
timeout: 8000,
|
||||||
|
dataType: 'json',
|
||||||
|
//async: false,
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
beforeSend: () => {
|
||||||
|
Configs.create_mask(); //创建遮罩层
|
||||||
|
create_locadEffect("正在验证汇总库配置信息,请稍等!"); //创建数据加载效果层
|
||||||
|
var target = document.getElementById('loading')
|
||||||
|
spinner = new Spinner(loadConfigs()).spin(target);
|
||||||
|
},
|
||||||
|
complete: (XMLHttpRequest, textStatus) => {
|
||||||
|
if(XMLHttpRequest.status == 200){
|
||||||
|
//spinner.spin();
|
||||||
|
Kubernetes.createSuccessInfo("../../../new/images/msgbox_success.png", "连接汇总库成功,即将执行汇总操作!");
|
||||||
|
setTimeout("Kubernetes.removeMask()", 1500);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//spinner.spin();
|
||||||
|
Kubernetes.createSuccessInfo("../../../new/images/msgbox_error.png", "连接汇总库失败,请检查服务集群中的汇总库配置是否正确!");
|
||||||
|
setTimeout("Kubernetes.removeMask()", 1500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//Configs.oracleInfoOperate($http, "/java/console/api/oracle", Configs.OperateType.EXTRACT, data, fn);
|
||||||
}else{
|
}else{
|
||||||
alert("您选择的汇总数据库或需要汇总的数据库中存在未启动成功的数据库,导致汇总操作失败,请重新选择!");
|
//alert("您选择的汇总数据库或需要汇总的数据库中存在未启动成功的数据库,导致汇总操作失败,请重新选择!");
|
||||||
|
Configs.customAlert("提示", "操作失败:需要汇总的数据库中存在未启动成功的数据库!", '',null, 0, "error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1847,4 +1877,61 @@ module Kubernetes {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadConfigs(){
|
||||||
|
return {
|
||||||
|
lines: 9,
|
||||||
|
length: 0,
|
||||||
|
width: 13,
|
||||||
|
radius: 38,
|
||||||
|
scale: 1,
|
||||||
|
corners: 1,
|
||||||
|
color: '#ffffff',
|
||||||
|
opacity: 0,
|
||||||
|
rotate: 90,
|
||||||
|
direction: 1,
|
||||||
|
speed: 0.5,
|
||||||
|
trail: 50,
|
||||||
|
zIndex: 1000000002,
|
||||||
|
className: 'spinner',
|
||||||
|
top: '40%' ,
|
||||||
|
left: '50%',
|
||||||
|
shadow: false,
|
||||||
|
hwaccel: false,
|
||||||
|
position: 'absolute'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
创建加载效果层
|
||||||
|
*/
|
||||||
|
function create_locadEffect(msg){
|
||||||
|
var tmp = "<div id=\"loading\"></div>"
|
||||||
|
+ "<span>" + msg + "</span>";
|
||||||
|
var load = document.createElement("div");
|
||||||
|
load.id = "load";
|
||||||
|
load.innerHTML = tmp;
|
||||||
|
document.body.appendChild(load);
|
||||||
|
$("#load").addClass("load-effect-msg");
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createSuccessInfo(icon:string, msg:string){
|
||||||
|
$("#load").remove();
|
||||||
|
var tmp = "<div class=\"load-result\" ><img src=\""
|
||||||
|
+ icon + "\" class=\"custom-alert-img\"></div>"
|
||||||
|
+ "<span>" + msg +"</span>";
|
||||||
|
var result = document.createElement("div");
|
||||||
|
result.id = "exe_result";
|
||||||
|
result.innerHTML = tmp;
|
||||||
|
document.body.appendChild(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeMask(){
|
||||||
|
var mask = document.getElementById("mask");
|
||||||
|
var result = document.getElementById("exe_result");
|
||||||
|
if(null == mask && null == result)
|
||||||
|
return;
|
||||||
|
document.body.removeChild(mask);
|
||||||
|
document.body.removeChild(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,8 @@ module Kubernetes {
|
||||||
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
|
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
|
||||||
log.debug("Running");
|
log.debug("Running");
|
||||||
viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
|
viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
|
||||||
|
//viewRegistry['kubernetes'] = Configs.templatePath + 'shareLayout.html';
|
||||||
|
|
||||||
var builder = HawtioNav.builder();
|
var builder = HawtioNav.builder();
|
||||||
var apps = builder.id('kube-apps')
|
var apps = builder.id('kube-apps')
|
||||||
.href(() => UrlHelpers.join(context, 'apps'))
|
.href(() => UrlHelpers.join(context, 'apps'))
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/// <reference path="kubernetesHelpers.ts"/>
|
/// <reference path="kubernetesHelpers.ts"/>
|
||||||
/// <reference path="kubernetesPlugin.ts"/>
|
/// <reference path="kubernetesPlugin.ts"/>
|
||||||
/// <reference path="kubernetesModel.ts"/>
|
/// <reference path="kubernetesModel.ts"/>
|
||||||
|
/// <reference path="../../configs/ts/customAlert.ts"/>
|
||||||
module Kubernetes {
|
module Kubernetes {
|
||||||
|
|
||||||
export var ReplicationControllers = controller("ReplicationControllers",
|
export var ReplicationControllers = controller("ReplicationControllers",
|
||||||
|
@ -122,7 +122,8 @@ module Kubernetes {
|
||||||
angular.forEach(extractItems, (item) => {
|
angular.forEach(extractItems, (item) => {
|
||||||
name += item.$oracleName + ",";
|
name += item.$oracleName + ",";
|
||||||
})
|
})
|
||||||
alert("删除服务失败:" + name + "服务正在执行汇总操作,不能被删除");
|
//alert("删除服务失败:" + name + "服务正在执行汇总操作,不能被删除");
|
||||||
|
Configs.customAlert("提示", "操作失败:正在执行汇总操作的服务不能被删除!", '',null, 0, "error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +180,8 @@ module Kubernetes {
|
||||||
angular.forEach(extractItems, (item) => {
|
angular.forEach(extractItems, (item) => {
|
||||||
name += item.$oracleName + ",";
|
name += item.$oracleName + ",";
|
||||||
})
|
})
|
||||||
alert("停止服务失败:" + name + "服务正在执行汇总操作,不能停止");
|
//alert("停止服务失败:" + name + "服务正在执行汇总操作,不能停止");
|
||||||
|
Configs.customAlert("提示", "操作失败:正在执行汇总操作的服务不能被停止!", '',null, 0, "error");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -211,7 +213,12 @@ module Kubernetes {
|
||||||
open: (selected) => {
|
open: (selected) => {
|
||||||
var extractClick = $scope.extractClick;
|
var extractClick = $scope.extractClick;
|
||||||
if($scope.configs && $scope.configs.oracleParam instanceof Array && $scope.configs.oracleParam.length>0)
|
if($scope.configs && $scope.configs.oracleParam instanceof Array && $scope.configs.oracleParam.length>0)
|
||||||
extractClick.selectedItem = $scope.configs.oracleParam[0];
|
extractClick.selectedItem = $scope.configs.oracleParam[0];
|
||||||
|
var result = checkIsStartSuccess($scope.tableConfig.selectedItems);
|
||||||
|
if(result.length >0){
|
||||||
|
Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据,请先启动服务", '',null, 0, "error");
|
||||||
|
return;
|
||||||
|
}
|
||||||
extractClick.dialog.open();
|
extractClick.dialog.open();
|
||||||
/*extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
|
/*extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
|
||||||
extractData.items = selected;*/
|
extractData.items = selected;*/
|
||||||
|
|
|
@ -139,4 +139,7 @@ module Kubernetes {
|
||||||
$scope.$emit('deleteRow', entity);
|
$scope.$emit('deleteRow', entity);
|
||||||
}*/
|
}*/
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
export var LoadMask = controller('LoadMask', ['$scope', ($scope) => {
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,4 +302,14 @@ module Kubernetes {
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function checkIsStartSuccess(replicationControllers: Array<any>){
|
||||||
|
var result = [];
|
||||||
|
angular.forEach(replicationControllers, (replicas) => {
|
||||||
|
var labels = getLabels(replicas);
|
||||||
|
if(labels["status"] != "2")
|
||||||
|
result.push(replicas);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -258,3 +258,81 @@ legend {
|
||||||
background-color: Red;
|
background-color: Red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-alert{
|
||||||
|
width:300px;
|
||||||
|
border: 2px solid #37B6D1;
|
||||||
|
background-color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-title{
|
||||||
|
line-height: 25px;
|
||||||
|
padding: 0px 5px;
|
||||||
|
background-color: #37B6D1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-body{
|
||||||
|
cellspacing: 0;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-td{
|
||||||
|
padding: 0px 0px 0px 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-img{
|
||||||
|
width: 64;
|
||||||
|
height: 64;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-content{
|
||||||
|
background-color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 20px 0px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-bottom{
|
||||||
|
text-align: center;
|
||||||
|
padding: 0px 0px 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-ok{
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
background-color: #CCC;
|
||||||
|
width: 50px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-alert-cancel{
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
background-color: #CCC;
|
||||||
|
width: 50px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-result{
|
||||||
|
z-index: 1000000002;
|
||||||
|
top: 40%;
|
||||||
|
position: absolute;
|
||||||
|
left: 47.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-result-msg{
|
||||||
|
z-index: 1000000002;
|
||||||
|
top: 48%;
|
||||||
|
position: absolute;
|
||||||
|
left: 41.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.load-effect-msg{
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1000000002;
|
||||||
|
left: 47.5%;
|
||||||
|
top: 48%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue