修改连接oracle服务
This commit is contained in:
commit
11d9143db2
|
@ -206,7 +206,7 @@ declare module Kubernetes {
|
||||||
function currentUserName(): any;
|
function currentUserName(): any;
|
||||||
function createNamespace(ns: any, client?: any): void;
|
function createNamespace(ns: any, client?: any): void;
|
||||||
function createRC(obj: any, onCompleteFn?: any): void;
|
function createRC(obj: any, onCompleteFn?: any): void;
|
||||||
function connectOracle($http: any, $timeout: any, url: any, operation: any, rcName: any, delayTime: any): void;
|
function connectOracle($http: any, $timeout: any, url: any, operation: any, replicas: any, delayTime: any): void;
|
||||||
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;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -98,7 +98,7 @@ treecontrol.tree-classic li.tree-leaf i.tree-leaf-head { padding: 1px 15px; padd
|
||||||
treecontrol.tree-classic li .tree-selected{background-color: #e5f0fb; color: #333; }
|
treecontrol.tree-classic li .tree-selected{background-color: #e5f0fb; color: #333; }
|
||||||
treecontrol li{ line-height: 30px; padding-left: 25px;}
|
treecontrol li{ line-height: 30px; padding-left: 25px;}
|
||||||
treecontrol li:hover{}
|
treecontrol li:hover{}
|
||||||
.sj_modal_body{ height: 210px; overflow: auto;padding-left: 0; padding-right: 0;}
|
.sj_modal_body{ height: 210px; overflow: auto;}
|
||||||
.modal{ width: 500px;}
|
.modal{ width: 500px;}
|
||||||
.sj_modal-header{ height:42px; line-height: 42px; border-bottom: 1px solid #ddd; }
|
.sj_modal-header{ height:42px; line-height: 42px; border-bottom: 1px solid #ddd; }
|
||||||
.sj_modal-header h4{ margin-top: 5px; font-weight: bold;}
|
.sj_modal-header h4{ margin-top: 5px; font-weight: bold;}
|
||||||
|
@ -128,4 +128,13 @@ treecontrol li:hover{}
|
||||||
.alert{ padding:10px 15px; margin-bottom:0;}
|
.alert{ padding:10px 15px; margin-bottom:0;}
|
||||||
.sj_control-label{ padding:0; line-height:30px; }
|
.sj_control-label{ padding:0; line-height:30px; }
|
||||||
.modal-footer{ margin-top: 0;}
|
.modal-footer{ margin-top: 0;}
|
||||||
.badge-info{ background-color: #3498db;}
|
.badge-info{ background-color: #3498db;}
|
||||||
|
.btn:focus {outline: none;outline-offset: 0; }
|
||||||
|
td > .progress:first-child:last-child{ margin-top:9px;}
|
||||||
|
.progress-bar-success{ background-color: #5cb85c;}
|
||||||
|
.progress-bar-danger { background-color: #d9534f;
|
||||||
|
.sj_progress_bar{ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); position: relative; }
|
||||||
|
.sj_progress_font{ position: absolute; right: 20px; top:0; }
|
||||||
|
.sj_table_border{ border: 1px solid #ccc; }
|
||||||
|
.sj_content_table .table-header{background-image:-webkit-linear-gradient(top, #f7f7f7,#dfdfdf);background-image:linear-gradient(top, #f7f7f7,#dfdfdf); border-bottom:1px solid #a6a6a6;}
|
||||||
|
.sj_c_green{ color: #58b358;}
|
|
@ -7,26 +7,26 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="container-content sj_content">
|
<div class="container-content sj_content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1">
|
<div class="mb10">
|
||||||
<button class="btn pull-right sj_btn_blue" ng-click="create()">
|
<button class="btn sj_btn_green" style="color:#fff;" ng-click="create()">
|
||||||
<span class="glyphicon glyphicon-plus"></span> 添加
|
<span class="glyphicon glyphicon-plus "></span> 添加
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" ng-repeat="volume in volumes">
|
<div class="row" ng-repeat="volume in volumes">
|
||||||
<table class="table table-hover">
|
<table class="table table-bordered sj_content_table " >
|
||||||
|
<thead class="no-scope">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th class="sj_c_green simple-table-checkbox" style="padding:0 10px;color: #58b358;">已启用</th>
|
||||||
<th class="no-fade table-header">
|
<th class="no-fade table-header">
|
||||||
<span class="">{{volume.name}}</span>
|
<span class="">{{volume.name}}</span>
|
||||||
</th>
|
</th>
|
||||||
<th class="no-fade table-header">
|
<th class="no-fade table-header" colspan="2">
|
||||||
<span class="">云路径:{{volume.path}}</span>
|
<span class="">云路径:{{volume.path}}</span>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="no-fade table-header">
|
<th class="no-fade table-header">
|
||||||
<span class="">状态</span>
|
<span class="">已用 {{volume.usedSize}} / 共 {{allSize}}</span>
|
||||||
</th>
|
|
||||||
<th class="no-fade table-header">
|
|
||||||
<span class="">已用{{volume.usedSize}}/共{{allSize}}</span>
|
|
||||||
</th>
|
</th>
|
||||||
<th class="no-fade table-header">
|
<th class="no-fade table-header">
|
||||||
<button class="btn sj_btn" ng-click="editRow(volume)">
|
<button class="btn sj_btn" ng-click="editRow(volume)">
|
||||||
|
@ -34,7 +34,12 @@
|
||||||
</button>
|
</button>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<tr ng-repeat="row in volume.brick track by $index" class="row.class">
|
<tr ng-repeat="row in volume.brick track by $index" class="row.class">
|
||||||
|
<td>
|
||||||
|
<span class="glyphicon glyphicon-ok sj_c_green" style="padding:0 10px; color: #58b358;"></span>
|
||||||
|
</td>
|
||||||
<td >
|
<td >
|
||||||
<span class="">服务器{{$index+1}}</span>
|
<span class="">服务器{{$index+1}}</span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -45,9 +50,11 @@
|
||||||
<span class="">存储路径:{{row.path}}</span>
|
<span class="">存储路径:{{row.path}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td >
|
<td >
|
||||||
<span class="">已用{{row.usedSize}}/共{{row.availableSize}}</span>
|
<span class="">已用 {{row.usedSize}} / 共 {{row.availableSize}}</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -98,7 +98,14 @@ module Configs{
|
||||||
$http({
|
$http({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: RESTfulUrl,
|
url: RESTfulUrl,
|
||||||
params: resource
|
params: resource,
|
||||||
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
|
||||||
|
transformRequest: function(obj) {
|
||||||
|
var str = [];
|
||||||
|
for(var p in obj)
|
||||||
|
str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
|
||||||
|
return str.join("&");
|
||||||
|
},
|
||||||
}).success(function(data, status, headers, config) {
|
}).success(function(data, status, headers, config) {
|
||||||
//成功之后做一些事情
|
//成功之后做一些事情
|
||||||
if(angular.isFunction(fn))
|
if(angular.isFunction(fn))
|
||||||
|
|
|
@ -81,7 +81,7 @@ module Configs{
|
||||||
$scope.onSubmit = () => {
|
$scope.onSubmit = () => {
|
||||||
$scope.edit = false;
|
$scope.edit = false;
|
||||||
$scope.add = false;
|
$scope.add = false;
|
||||||
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.UPDATE, createOracleInfo($scope.tableForm, $scope.rowId), (result, status) => {
|
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.UPDATE, createOracleInfo($scope.tableForm, $scope.rowId), (result, status) => {
|
||||||
if(status===200){
|
if(status===200){
|
||||||
$scope.model.updateOracleParam();
|
$scope.model.updateOracleParam();
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<p class="alert alert-info">当前没有可以查看的任务列表!</p>
|
<p class="alert alert-info">当前没有可以查看的任务列表!</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb10" ng-show="model.data.length">
|
<div class="row mb10" ng-show="model.data.length">
|
||||||
<table class="table table-bordered table-striped sj_content_table" hawtio-simple-table="tableConfig" />
|
<table class="table table-bordered table-striped sj_content_table" hawtio-simple-table="tableConfig" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<div ng-controller="Developer.WorkspacesController" hawtio-card-bg >
|
<div ng-controller="Developer.WorkspacesController" hawtio-card-bg>
|
||||||
<div hawtio-breadcrumbs></div>
|
<div hawtio-breadcrumbs></div>
|
||||||
<div hawtio-tabs></div>
|
<div hawtio-tabs></div>
|
||||||
<div class="container-content ">
|
<div class="container-content ">
|
||||||
|
|
||||||
<div class="container-fluid sj_fluid">
|
<div class="container-fluid sj_fluid">
|
||||||
<div class="row nav-content mb10 clear " >
|
<div class="row nav-content mb10 clear ">
|
||||||
<ul class="nav nav-tabs sj_nav_taps fl" ng-show="navbarItems.length">
|
<ul class="nav nav-tabs sj_nav_taps fl" ng-show="navbarItems.length">
|
||||||
<li role="presentation" ng-repeat="item in navbarItems" class="{{item.class}}"><a href="#" ng-click="selectBatchItem(item)">{{item.label}}</a></li>
|
<li role="presentation" ng-repeat="item in navbarItems" class="{{item.class}}"><a href="#" ng-click="selectBatchItem(item)">{{item.label}}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="fr sj_searchbox">
|
<div class="fr sj_searchbox">
|
||||||
<input type="text" class="sj_search_input"/>
|
<input type="text" class="sj_search_input" />
|
||||||
<a href="#" class="sj_search_btn"></a>
|
<a href="#" class="sj_search_btn"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,33 +21,28 @@
|
||||||
<div class=" fl">
|
<div class=" fl">
|
||||||
<input type="checkbox" class="fl mr5 " style="margin-top: 8px;" />
|
<input type="checkbox" class="fl mr5 " style="margin-top: 8px;" />
|
||||||
<label class="fl mr5 " style="margin-top: 5px; font-style:nomal;">全选</label>
|
<label class="fl mr5 " style="margin-top: 5px; font-style:nomal;">全选</label>
|
||||||
<button ng-disabled="!id && tableConfig.selectedItems.length == 0"
|
<span class="pull-right"> </span>
|
||||||
class="btn btn-success pull-right sj_btn_grey"
|
<button class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="deletePrompt(id || tableConfig.selectedItems)">
|
||||||
ng-click="deletePrompt(id || tableConfig.selectedItems)">
|
<i class="glyphicon glyphicon-trash"></i> 删除
|
||||||
<i class="glyphicon glyphicon-trash"></i> 删除数据
|
|
||||||
</button>
|
</button>
|
||||||
<span class="pull-right"> </span>
|
<span class="pull-right"> </span>
|
||||||
<button ng-disabled="!id && tableConfig.selectedItems.length == 0"
|
<button class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="migrationClick.open(id || tableConfig.selectedItems)">
|
||||||
class="btn btn-success pull-right sj_btn_grey"
|
<i class="glyphicon glyphicon-export"></i> 迁移
|
||||||
ng-click="migrationClick.open(id || tableConfig.selectedItems)">
|
|
||||||
<i class="glyphicon glyphicon-export"></i> 迁移数据
|
|
||||||
</button>
|
</button>
|
||||||
<span class="pull-right"> </span>
|
<span class="pull-right"> </span>
|
||||||
<button ng-disabled="!id && tableConfig.selectedItems.length == 0"
|
<button class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="createOracleService(id || tableConfig.selectedItems)">
|
||||||
class="btn btn-success pull-right sj_btn_grey"
|
<i class="glyphicon glyphicon-play-circle"></i> 启动
|
||||||
ng-click="createOracleService(id || tableConfig.selectedItems)">
|
|
||||||
<i class="glyphicon glyphicon-play-circle"></i> 启动服务
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<ul class="fr sj_table_bottom">
|
<ul class="fr sj_table_bottom">
|
||||||
<li class="mr5 " >当前显示1~7行,共7行。</li>
|
<li class="mr5 ">当前显示1~7行,共7行。</li>
|
||||||
<li class="mr5 ">每页显示
|
<li class="mr5 ">每页显示
|
||||||
<select ng-options="value for value in pageSizeChoses" ng-change="selectAction()" ng-model="options.currentTableSize"></select>行
|
<select ng-options="value for value in pageSizeChoses" ng-change="selectAction()" ng-model="options.currentTableSize"></select>行
|
||||||
</li>
|
</li>
|
||||||
<li class="mr5 ">当前页码</li>
|
<li class="mr5 ">当前页码</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="hawtio-pager clearfix">
|
<div class="hawtio-pager clearfix">
|
||||||
<label >{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>
|
<label>{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>
|
||||||
<div class=btn-group>
|
<div class=btn-group>
|
||||||
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="first()"><i class="fa fa-fast-backward"></i></button>
|
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="first()"><i class="fa fa-fast-backward"></i></button>
|
||||||
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="previous()"><i class="fa fa-step-backward"></i></button>
|
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="previous()"><i class="fa fa-step-backward"></i></button>
|
||||||
|
@ -62,10 +56,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div modal="migrationClick.dialog.show " >
|
<div modal="migrationClick.dialog.show ">
|
||||||
<form name="selectFolder " class=" " ng-submit="migrationClick.onOk() ">
|
<form name="selectFolder " class=" " ng-submit="migrationClick.onOk() ">
|
||||||
<div class="modal-header sj_modal-header" >
|
<div class="modal-header sj_modal-header">
|
||||||
<h4 >数据迁移</h4></div>
|
<h4>数据迁移</h4></div>
|
||||||
<div class="modal-body sj_modal_body">
|
<div class="modal-body sj_modal_body">
|
||||||
<div class="row sj_model_row">
|
<div class="row sj_model_row">
|
||||||
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
|
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
|
||||||
|
@ -73,15 +67,15 @@
|
||||||
</label>
|
</label>
|
||||||
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in volumes " />
|
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in volumes " />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">
|
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">
|
||||||
<span class="help-block" >
|
<span class="help-block">
|
||||||
|
|
||||||
当前没有可以迁移的集群,请在数据集群配置页面进行配置!
|
当前没有可以迁移的集群,请在数据集群配置页面进行配置!
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-hide= "!volumes || volumes.length == 0">
|
<div ng-hide="!volumes || volumes.length == 0">
|
||||||
<treecontrol class="tree-classic" tree-model="migrationClick.selectedItem.folder" options="treeOptions" on-selection="showSelected(node)" selected-node="selectNode">
|
<treecontrol class="tree-classic" tree-model="migrationClick.selectedItem.folder" options="treeOptions" on-selection="showSelected(node)" selected-node="selectNode">
|
||||||
{{node.name}}
|
{{node.name}}
|
||||||
</treecontrol>
|
</treecontrol>
|
||||||
|
|
|
@ -180,7 +180,7 @@ module Developer{
|
||||||
//创建数据模型服务
|
//创建数据模型服务
|
||||||
_module.factory("DataModel", ['$rootScope', '$http', '$interval', '$location', '$resource', ($rootScope, $http, $interval, $location, $resource) => {
|
_module.factory("DataModel", ['$rootScope', '$http', '$interval', '$location', '$resource', ($rootScope, $http, $interval, $location, $resource) => {
|
||||||
var $scope = new DataModelService();
|
var $scope = new DataModelService();
|
||||||
$scope.startIntervalTask($interval, $http);
|
$scope.startIntervalTask($interval, $http);
|
||||||
return $scope;
|
return $scope;
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
|
@ -581,7 +581,7 @@ module Developer {
|
||||||
class: "fa fa-clone",
|
class: "fa fa-clone",
|
||||||
title: "View the Replicas for this project"
|
title: "View the Replicas for this project"
|
||||||
},
|
},
|
||||||
{
|
/*{
|
||||||
href: UrlHelpers.join(namespacesLink, ns, "events"),
|
href: UrlHelpers.join(namespacesLink, ns, "events"),
|
||||||
label: "日志信息",
|
label: "日志信息",
|
||||||
class: "fa fa-newspaper-o",
|
class: "fa fa-newspaper-o",
|
||||||
|
@ -593,7 +593,7 @@ module Developer {
|
||||||
label: "集群节点",
|
label: "集群节点",
|
||||||
class: "fa fa-server",
|
class: "fa fa-server",
|
||||||
title: "View the nodes for this project"
|
title: "View the nodes for this project"
|
||||||
}
|
} */
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,15 @@ module Developer {
|
||||||
field: "labels",
|
field: "labels",
|
||||||
displayName: '数据标签',
|
displayName: '数据标签',
|
||||||
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
|
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "from",
|
||||||
|
displayName: '源集群',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "to",
|
||||||
|
displayName: '目的集群',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "status",
|
field: "status",
|
||||||
displayName: '迁移状态',
|
displayName: '迁移状态',
|
||||||
|
|
|
@ -62,7 +62,11 @@ module Developer {
|
||||||
field: "labels",
|
field: "labels",
|
||||||
displayName: '数据标签',
|
displayName: '数据标签',
|
||||||
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
|
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: "year",
|
||||||
|
displayName: '年度',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: "collectingTime",
|
field: "collectingTime",
|
||||||
displayName: '采集时间'
|
displayName: '采集时间'
|
||||||
|
@ -136,22 +140,43 @@ module Developer {
|
||||||
|
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
$scope.deletePrompt = (items) =>{
|
$scope.deletePrompt = (selected) => {
|
||||||
var idColl = [];
|
if (angular.isString(selected)) {
|
||||||
angular.forEach(items,(item) => {
|
selected = [{
|
||||||
idColl.push(item.id);
|
id: selected
|
||||||
console.log(item.id);
|
}];
|
||||||
});
|
}
|
||||||
$http({
|
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
|
||||||
method: "POST",
|
collection: selected,
|
||||||
url: "/java/console/api/delete/data",
|
index: 'id',
|
||||||
params: {"data": idColl}
|
onClose: (result:boolean) => {
|
||||||
}).success(function(data, status, headers, config) {
|
var idColl = [];
|
||||||
//成功之后做一些事情
|
if (result) {
|
||||||
DataModel.updateModel();
|
angular.forEach(selected, (select) => {
|
||||||
}).error(function(data, status, headers, config) {
|
idColl.push(select.id);
|
||||||
|
console.log(select.id);
|
||||||
});
|
});
|
||||||
|
$http({
|
||||||
|
method: "POST",
|
||||||
|
url: "/java/console/api/delete/data",
|
||||||
|
params: {"data": idColl}
|
||||||
|
}).success(function(data, status, headers, config) {
|
||||||
|
//成功之后做一些事情
|
||||||
|
DataModel.updateModel();
|
||||||
|
}).error(function(data, status, headers, config) {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
title: '是否需要删除采集数据?',
|
||||||
|
action: '以下采集数据文件将会被删除:',
|
||||||
|
okText: '删除',
|
||||||
|
okClass: 'btn-danger sj_btn_cir',
|
||||||
|
custom: "该删除操作将会彻底删除数据文件,是否删除,请确认!",
|
||||||
|
customClass: "alert alert-warning sj_alert-warning",
|
||||||
|
cancelText: "取消",
|
||||||
|
cancelClass: 'sj_btn_grey'
|
||||||
|
}).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.migrationClick = {
|
$scope.migrationClick = {
|
||||||
|
@ -177,9 +202,7 @@ module Developer {
|
||||||
open: (selected) =>{
|
open: (selected) =>{
|
||||||
var migrationClick = $scope.migrationClick;
|
var migrationClick = $scope.migrationClick;
|
||||||
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
|
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
|
||||||
migrationClick.selectedItem = $scope.volumes[0];
|
migrationClick.selectedItem = $scope.volumes[0];
|
||||||
console.log(migrationClick.selectedItem.folder.childNodes);
|
|
||||||
|
|
||||||
migrationClick.dialog.open();
|
migrationClick.dialog.open();
|
||||||
},
|
},
|
||||||
close: () => {
|
close: () => {
|
||||||
|
@ -204,10 +227,11 @@ module Developer {
|
||||||
},
|
},
|
||||||
path: item.dataPath+"app/",
|
path: item.dataPath+"app/",
|
||||||
isTarget: "false"
|
isTarget: "false"
|
||||||
}, (rc) =>{
|
}, (rc) =>{
|
||||||
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", Kubernetes.getName(rc), 0);
|
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
$location.path('/kubernetes/namespace/default/replicationControllers');
|
$location.path('/kubernetes/namespace/default/replicationControllers');
|
||||||
}, 200);
|
}, 200);
|
||||||
|
|
|
@ -217,11 +217,11 @@
|
||||||
<!-- 迁移进度条 -->
|
<!-- 迁移进度条 -->
|
||||||
<script type="text/ng-template" id="taskProcess.html">
|
<script type="text/ng-template" id="taskProcess.html">
|
||||||
<div class="ngCellText progress" ng-init="entity=row.entity">
|
<div class="ngCellText progress" ng-init="entity=row.entity">
|
||||||
<div ng-show="entity.status!==3" class="progress-bar progress-bar-success active" role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="0" aria-valuemax="100" style="width: {{entity.process}}%">
|
<div ng-show="entity.status!==3" class="progress-bar progress-bar-success active sj_progress_bar " role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="0" aria-valuemax="100" style="width: {{entity.process}}%">
|
||||||
<span class="sr-only">{{entity.process}}</span>
|
<span class="sj_progress_font">{{entity.process}}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="entity.status ===3" class="progress-bar progress-bar-danger active" role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="0" aria-valuemax="100" style="width: {{entity.process}}%">
|
<div ng-show="entity.status ===3" class="progress-bar progress-bar-danger active sj_progress_bar" role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="0" aria-valuemax="100" style="width: {{entity.process}}%">
|
||||||
<span class="sr-only">{{entity.process}}</span>
|
<span class="sj_progress_font">{{entity.process}}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -81,8 +81,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-include src="'resizeDialog.html'"/>
|
|
||||||
|
|
||||||
<div modal="extractClick.dialog.show">
|
<div modal="extractClick.dialog.show">
|
||||||
<form name="selectOracle" class="" ng-submit="extractClick.onOk()">
|
<form name="selectOracle" class="" ng-submit="extractClick.onOk()">
|
||||||
|
|
|
@ -1749,18 +1749,18 @@ module Kubernetes {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function connectOracle($http, $timeout, url, operation, rcName, delayTime){
|
export function connectOracle($http, $timeout, url, operation, replicas, delayTime){
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
$http({
|
$http({
|
||||||
url: url,
|
url: url,
|
||||||
method:'POST',
|
method:'POST',
|
||||||
params:{oracleName: rcName, operation: operation}
|
params:{oracleName: getName(replicas), operation: operation},
|
||||||
}).success(function(data,header,config,status){
|
}).success(function(data,header,config,status){
|
||||||
console.log("success");
|
console.log("success");
|
||||||
}).error(function(data,header,config,status){
|
}).error(function(data,header,config,status){
|
||||||
//log.warn("Failed to connect " + connectParam + " " + data + " " + status);
|
//log.warn("Failed to connect " + connectParam + " " + data + " " + status);
|
||||||
});
|
});
|
||||||
}, delayTime);
|
}, delayTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getOracleStatus(labels){
|
export function getOracleStatus(labels){
|
||||||
|
|
|
@ -72,7 +72,7 @@ module Kubernetes {
|
||||||
|
|
||||||
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
|
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);
|
||||||
|
|
||||||
$scope.deletePrompt = (selected) => {
|
$scope.deletePrompt = (selected) => {
|
||||||
if (angular.isString(selected)) {
|
if (angular.isString(selected)) {
|
||||||
selected = [{
|
selected = [{
|
||||||
id: selected
|
id: selected
|
||||||
|
@ -89,8 +89,8 @@ module Kubernetes {
|
||||||
KubernetesReplicationControllers.delete({
|
KubernetesReplicationControllers.delete({
|
||||||
id: getName(next)
|
id: getName(next)
|
||||||
}, undefined, () => {
|
}, undefined, () => {
|
||||||
if(next.metadata.labels.style === "oracle"){
|
if(next.metadata.labels.style === "oracle"){
|
||||||
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "delete", getName(next), 0);
|
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "delete", next, 0);
|
||||||
}
|
}
|
||||||
deleteSelected(selected, selected.shift());
|
deleteSelected(selected, selected.shift());
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
|
@ -100,7 +100,7 @@ module Kubernetes {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deleteSelected(selected, selected.shift());
|
deleteSelected(selected, selected.shift());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title: '是否需要删除oracle服务?',
|
title: '是否需要删除oracle服务?',
|
||||||
|
@ -127,7 +127,7 @@ module Kubernetes {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.stopPrompt = (selected) =>{
|
$scope.stopPrompt = (selected) =>{
|
||||||
if (angular.isString(selected)) {
|
if (angular.isString(selected)) {
|
||||||
selected = [{
|
selected = [{
|
||||||
id: selected
|
id: selected
|
||||||
|
@ -142,14 +142,14 @@ module Kubernetes {
|
||||||
function stopSelected(selected:Array<KubePod>, next:KubePod) {
|
function stopSelected(selected:Array<KubePod>, next:KubePod) {
|
||||||
if (next) {
|
if (next) {
|
||||||
Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
|
Kubernetes.resizeController($http, KubernetesApiURL, next, 0, () => {
|
||||||
if(next.metadata.labels.style === "oracle"){
|
if(next.metadata.labels.style === "oracle"){
|
||||||
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "stop", getName(next), 0);
|
Kubernetes.connectOracle($http, $timeout, "/java/console/api/cancelOracleConection", "stop", next, 0);
|
||||||
}
|
}
|
||||||
stopSelected(selected, selected.shift());
|
stopSelected(selected, selected.shift());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stopSelected(selected, selected.shift());
|
stopSelected(selected, selected.shift());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title: '是否需要停止oracle服务?',
|
title: '是否需要停止oracle服务?',
|
||||||
|
@ -163,18 +163,18 @@ module Kubernetes {
|
||||||
}).open();
|
}).open();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.reStartPrompt = (selected) => {
|
$scope.reStartPrompt = (selected) => {
|
||||||
function startSelected(selected:Array<KubePod>, next:KubePod){
|
function startSelected(selected:Array<KubePod>, next:KubePod){
|
||||||
if(next){
|
if(next){
|
||||||
if(next.$replicas === 0)
|
if(next.$replicas === 0)
|
||||||
Kubernetes.resizeController($http, KubernetesApiURL, next, 1, () => {
|
Kubernetes.resizeController($http, KubernetesApiURL, next, 1, () => {
|
||||||
console.log("restart " + next.metadata.name);
|
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", next, 200);
|
||||||
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "reStart", getName(next), 0);
|
startSelected(selected, selected.shift());
|
||||||
startSelected(selected, selected.shift());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startSelected(selected, selected.shift());
|
startSelected(selected, selected.shift());
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.extractClick = {
|
$scope.extractClick = {
|
||||||
|
|
Loading…
Reference in New Issue