修改GFS配置界面

Web_Manager_Develope
wu ming 8 years ago
parent b6411bc87b
commit d5cde984f4

@ -61,6 +61,7 @@ declare module Kubernetes {
function isInclude(rcs: any, rc: any): boolean;
function labelChangeToChines(value: string, key: string): string;
function checkForMigration(replicationControllers: Array<KubePod>, selectItem: Array<any>): any[];
function checkForExit(replicationControllers: Array<KubePod>, selectItem: any): boolean;
function checkForCreateOracle(transferTasks: Array<any>, selectItems: Array<any>): any[];
/**

2
defs.d.ts vendored

@ -38,6 +38,7 @@
/// <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/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/build.d.ts"/>
@ -78,4 +79,3 @@
/// <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/navigation/ts/navigationPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

@ -28,9 +28,9 @@
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-10 sj_form_input">
<input class="form-control " type="text" ng-model="tableForm.name" name="orcName" required="required"/>
<input class="form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="6" required="required"/>
<div class="form-error" ng-show="validForm.orcName.$invalid && submitted">
<span class="alert alert-danger" role="alert" ng-show="validForm.orcName.$error.required">IP不能为空</span>
<span class="alert alert-danger" role="alert" ng-show="validForm.orcName.$error.required">名称不能为空</span> <span class="alert alert-danger" role="alert" ng-show="validForm.orcName.$invalid">请输入输入2-10个字符的数据名称</span>
</div>
</div>
</div>

@ -28,23 +28,24 @@
</script>
<script type="text/ng-template" id="newDialog.html">
<div class="sj_new_box">
<form name="volumeForm" class=" mb10" ng-submit="onSubmit(ngDialogData)" novalidate="novalidate">
<form name="volumeForm" class=" mb10" novalidate="novalidate">
<table class="sj_new_table clear">
<tbody>
<tr>
<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 class="new_left">云盘名</th>
<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"/>
</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 _\-.%]+)+$/"/>
</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>
<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>
</th> -->
</tr>
<tr ng-repeat="row in ngDialogData.brick">
<th class="new_left">
@ -75,14 +76,14 @@
</th>
<th>
<!--<button class="sj_btn_grey fl">连接</button>-->
<a href="#" class="sj_icon_del ml5 fl" 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>
</th>
</tr>
<tr>
<th>&nbsp;</th>
<th>
<button class="sj_btn_blue mr5" type="submit" >保存</button>
<button class="sj_btn_blue mr5" ng-click="onSubmit(ngDialogData)" >保存</button>
</th>
<th>
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>

@ -22,7 +22,7 @@ module Configs{
data: {
name: '',
path: '',
status: false,
status: true,
brick: [{
ip: ["0", "0", "0", "0"],
path: '',
@ -79,7 +79,7 @@ module Configs{
}
$scope.$on('update', (event, data) => {
angular.forEach(data.brick, (brick) =>{
angular.forEach(data["brick"], (brick) =>{
var ip = [];
if(brick["ip"] instanceof Object){
for(var key in brick["ip"])

@ -46,11 +46,6 @@ module Configs{
field: "suffix",
displayName: "表后缀"
},
{
field: "status",
displayName: "连接状态",
cellTemplate: $templateCache.get("connectStatus.html")
},
{
field: "entity",
displayName: "操作",

@ -8,8 +8,8 @@
<li role="presentation" ng-repeat="item in navbarItems" class="{{item.class}}"><a href="#" ng-click="selectBatchItem(item)">{{item.label}}</a></li>
</ul>
<div class="fr sj_searchbox">
<input type="text" class="sj_search_input" ng-model="keyQuery" placeholder="请选择或输入关键字,多关键字请用空格隔开"/>
<a href="#" class="sj_search_btn" ng-click="search()"></a>
<input type="text" class="sj_search_input" ng-model="keyQuery" placeholder="请选择或输入关键字,多关键字请用空格隔开" onkeydown="if(event.keyCode==13){searchButton.click()}"/>
<a href="#" class="sj_search_btn" id="searchButton" ng-click="search()"></a>
</div>
</div>
<div ng-hide="model.data.length" class="align-center">
@ -19,8 +19,8 @@
<table class="table table-striped table-bordered sj_content_table" hawtio-simple-table="tableConfig"></table>
<div class="row clear">
<div class=" fl">
<input type="checkbox" class="fl mr5 " style="margin-top: 8px;" />
<label class="fl mr5 " style="margin-top: 5px; font-style:nomal;">全选</label>
<!--<input type="checkbox" class="fl mr5 " style="margin-top: 8px;" />
<label class="fl mr5 " style="margin-top: 5px; font-style:nomal;">全选</label>-->
<span class="pull-right">&nbsp;</span>
<button class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="deletePrompt(id || tableConfig.selectedItems)">
<i class="glyphicon glyphicon-trash"></i> 删除

@ -48,10 +48,7 @@ module Developer {
columnDefs: [
{
field: "_key",
displayName: '编码',
customSortField: (field) =>{
return field.id;
}
displayName: '编码'
},
{
field: "name",
@ -79,7 +76,11 @@ module Developer {
displayName: '汇总状态',
cellTemplate: $templateCache.get("dataExtractTemplate.html")
}
]
],
sortInfo: {
sortBy: "_key",
ascending: true
}
};
$scope.$on("dataLabelFilterUpdate", ($event, text, key) => {
@ -236,6 +237,8 @@ module Developer {
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
if(exitedItems.length == 0){
angular.forEach(items,(item)=>{
var isExited = Kubernetes.checkForExit($scope.replicasModel.replicationControllers, item);
if(!isExited){
Kubernetes.createRC({
name: item._key,
labels: {
@ -256,6 +259,7 @@ module Developer {
}, (rc) =>{
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
});
}
});
$timeout(() => {

@ -26,7 +26,10 @@ module Kubernetes {
columnDefs: [
{ field: '$oracleName',
displayName: '服务名称',
cellTemplate: $templateCache.get("idTemplate.html")
cellTemplate: $templateCache.get("idTemplate.html"),
customSortField: (field) => {
return field;
}
},
//{ field: '$replicas',
// displayName: 'Scale',
@ -63,7 +66,11 @@ module Kubernetes {
displayName: '数据汇总状态',
cellTemplate: $templateCache.get("dataSummaryTemplate.html")
}
]
],
sortInfo: {
sortBy: "$oracleName",
ascending: false
}
}
Kubernetes.initShared($scope, $location, $http, $timeout, $routeParams, KubernetesModel, KubernetesState, KubernetesApiURL);

@ -34,7 +34,6 @@ module Kubernetes {
// controller that deals with the labels per pod
export var Labels = controller("Labels", ["$scope", "$location", ($scope, $location) => {
console.log($scope.entity);
$scope.labels = [];
var labelKeyWeights = {
"region": 1,

@ -252,7 +252,7 @@ module Kubernetes {
return result;
}
function checkForExit(replicationControllers:Array<KubePod>, selectItem){
export function checkForExit(replicationControllers:Array<KubePod>, selectItem){
for(var index in replicationControllers) {
var replicas = replicationControllers[index];
if(getName(replicas)==selectItem._key && getAnnotationValueBykey(replicas,"year") == selectItem["year"])

Loading…
Cancel
Save