parent
2570630a36
commit
3aec8f7361
@ -1,4 +1,7 @@
|
|||||||
/// <reference path="../../includes.d.ts" />
|
/// <reference path="../../includes.d.ts" />
|
||||||
/// <reference path="configPlugin.d.ts" />
|
/// <reference path="configPlugin.d.ts" />
|
||||||
|
/// <reference path="../../developer/ts/developerNavigation.d.ts" />
|
||||||
declare module Configs {
|
declare module Configs {
|
||||||
|
function shareInit($scope: any, $location: any, $routeParams: any): void;
|
||||||
|
function createNewObejct(array: Array<any>, obj: any): any[];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/// <reference path="../../includes.d.ts" />
|
/// <reference path="../../includes.d.ts" />
|
||||||
|
/// <reference path="developerNavigation.d.ts" />
|
||||||
declare module Developer {
|
declare module Developer {
|
||||||
function createCurrentSubNavBar($scope: any, $location: any, $routeParams: any): any;
|
function createCurrentSubNavBar($scope: any, $location: any, $routeParams: any): any;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
<ul ng-controller="Configs.MenuItemController" class="nav nav-pills" role="tablist">
|
<ul ng-controller="Configs.MenuItemController" class="nav nav-pills" role="tablist">
|
||||||
<li ng-repeat="item in menuItem" role="presentation">
|
<li ng-repeat="item in menuItem" role="presentation">
|
||||||
<a href="{{item.href}}"><span class="{{item.icon}}"></span> {{item.title}}</a>
|
<a href="{{item.href}}"><span class="{{item.icon}}"></span> {{item.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1 +1,8 @@
|
|||||||
<div class="">hello</div>
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<div hawtio-breadcrumbs></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div hawtio-tabs></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1 +1,41 @@
|
|||||||
<div class="c"> cccc</div>
|
<div ng-controller="Configs.KubeController">
|
||||||
|
<div class="row">
|
||||||
|
<div hawtio-breadcrumbs></div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div hawtio-tabs></div>
|
||||||
|
</div>
|
||||||
|
<div class="container-content container-fluid sj_content">
|
||||||
|
<div class="row">
|
||||||
|
<table class="table" hawtio-simple-table="tableConfig" />
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1">
|
||||||
|
<button class="btn pull-right" ng-click="create()">
|
||||||
|
<span class="glyphicon glyphicon-plus"></span> 添加
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row" ng-show="tableForm.length>=0 && (edit || add)">
|
||||||
|
<h3 ng-show="edit">编辑汇总库连接信息:</h3>
|
||||||
|
<h3 ng-show="add">添加汇总库信息:</h3>
|
||||||
|
<div class="col-md-6 col-md-offset-1">
|
||||||
|
<form class="form-horizontal" ng-submit="onSubmit(validForm.$valid)" novalidate="novalidate" name="validForm">
|
||||||
|
<div class="form-group" ng-repeat="item in tableForm">
|
||||||
|
<label class="col-sm-2 control-label">{{item.name}}</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" ng-model="item.value">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn" type='submit'>
|
||||||
|
<span class="glyphicon glyphicon-save"></span> 保存
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1,16 +1,69 @@
|
|||||||
/// <reference path="../../includes.ts"/>
|
/// <reference path="../../includes.ts"/>
|
||||||
/// <reference path="configPlugin.ts"/>
|
/// <reference path="configPlugin.ts"/>
|
||||||
|
/// <reference path="../../developer/ts/developerNavigation.ts"/>
|
||||||
module Configs{
|
module Configs{
|
||||||
_module.controller('Configs.MenuItemController',['$scope', '$location', ($scope, $location) => {
|
_module.controller('Configs.MenuItemController',['$scope', '$location', ($scope, $location) => {
|
||||||
$scope.menuItem=[{
|
$scope.menuItem=[{
|
||||||
icon: "glyphicon glyphicon-cloud-upload",
|
icon: "glyphicon glyphicon-cloud-upload",
|
||||||
title:"数据管理配置",
|
label: "数据管理配置",
|
||||||
|
title: "配置数据存储信息",
|
||||||
href: UrlHelpers.join(context, "/gluster-fs/setting")
|
href: UrlHelpers.join(context, "/gluster-fs/setting")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "glyphicon glyphicon-th-list",
|
icon: "glyphicon glyphicon-th-list",
|
||||||
title:"服务集群配置",
|
label: "服务集群配置",
|
||||||
|
title: "配置服务集群信息",
|
||||||
href: UrlHelpers.join(context, "/kube-cluster/setting")
|
href: UrlHelpers.join(context, "/kube-cluster/setting")
|
||||||
}]
|
}]
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
|
function createConfigBreadcrumbs($scope, $location, $routeParams){
|
||||||
|
var url = $location.url();
|
||||||
|
var label, title;
|
||||||
|
switch (url) {
|
||||||
|
case "/config/gluster-fs/setting":
|
||||||
|
label = "数据管理配置";
|
||||||
|
title= "配置数据存储信息";
|
||||||
|
break;
|
||||||
|
case "/config/kube-cluster/setting":
|
||||||
|
label = "服务集群配置";
|
||||||
|
title= "配置服务集群信息";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Developer.activateCurrent([{
|
||||||
|
href: url,
|
||||||
|
label: label,//item.label,
|
||||||
|
title: title//item.title
|
||||||
|
}]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function shareInit($scope, $location, $routeParams){
|
||||||
|
$scope.subTabConfig = createConfigBreadcrumbs($scope, $location, $routeParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createNewObejct(array:Array<any>, obj){
|
||||||
|
var result =[];
|
||||||
|
if(obj){
|
||||||
|
angular.forEach(array, (arr) =>{
|
||||||
|
result.push({
|
||||||
|
field: arr.field,
|
||||||
|
name: arr.displayName,
|
||||||
|
value: obj[arr.field]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
angular.forEach(array, (arr) =>{
|
||||||
|
result.push({
|
||||||
|
field: arr.field,
|
||||||
|
name: arr.displayName,
|
||||||
|
value: null
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in new issue