添加设置按钮

This commit is contained in:
wu ming 2016-09-08 08:37:22 +08:00
commit 2570630a36
17 changed files with 256 additions and 117 deletions

6
d.ts/configs/config.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../includes.d.ts" />
declare module Configs {
var pluginName: string;
var context: string;
var _module: ng.IModule;
}

4
d.ts/configs/ts/ConfigsHelper.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="configPlugin.d.ts" />
declare module Configs {
}

12
d.ts/configs/ts/configPlugin.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
/// <reference path="../../includes.d.ts" />
declare module Configs {
var pluginName: string;
var context: string;
var pluginPath: string;
var templatePath: string;
var _module: ng.IModule;
var route: (templateName: string, reloadOnSearch?: boolean) => {
templateUrl: string;
reloadOnSearch: boolean;
};
}

2
defs.d.ts vendored
View File

@ -1,4 +1,6 @@
/// <reference path="d.ts/includes.d.ts"/>
/// <reference path="d.ts/configs/ts/configPlugin.d.ts"/>
/// <reference path="d.ts/configs/ts/ConfigsHelper.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerHelper.d.ts"/>
/// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,6 @@
<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" href="dist/hawtio-kubernetes.css" />
<link rel="stylesheet" type="text/css" href="new/sj_style.css">
<!-- bower:js -->
<script src="libs/jquery/dist/jquery.js"></script>
@ -129,14 +128,24 @@
}
</style>
</head>
<body >
<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>
<body>
<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>
<ul class="nav navbar-nav navbar-primary sj_topnav" hawtio-main-nav></ul>
<ul class="nav navbar-nav navbar-utility">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-cog"></span> 配置<b class="caret"></b>
</a>
<div class="dropdown-menu" hawtio-extension name="config-setting">
</div>
</li>
</ul>
</nav>
<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 class="row" ng-class="getClass()" >
<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()">
<hawtio-breadcrumbs-outlet></hawtio-breadcrumbs-outlet>
</div>
<div class="row" ng-class="getClass()">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -15,9 +15,11 @@ a:hover,a:active{color:#333;}
.fr{ float:right;}
.cl{ clear:both; overflow:hidden;}
/* public*/
.mt2{margin-top: 3px;}
.ml5{ margin-top: 5px;}.ml10{ margin-top: 10px;}
.ml5{ margin-left:5px;}.ml10{ margin-left:10px;}
.mr5{ margin-right:5px;}.mr10{ margin-right:10px;}
.mb10{ margin-bottom: 10px;}
a.sj_btn_grey{ display:inline-block; padding:0px 15px; height:30px; line-height:30px; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; background-image:-webkit-linear-gradient(top, #fdfdfd,#e8e8e8);background-image:linear-gradient(top,#fdfdfd,#e8e8e8); border:1px solid #cecece; color:#505050;}
a:hover.sj_btn_grey{ background-image:-webkit-linear-gradient(top, #eeeeee,#d3d3d3);background-image:linear-gradient(top,#eeeeee,#d3d3d3);}
.sj_btn_grey{ display:inline-block; padding:0px 15px; height:30px; line-height:30px; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; background-image:-webkit-linear-gradient(top, #fdfdfd,#e8e8e8);background-image:linear-gradient(top,#fdfdfd,#e8e8e8); border:1px solid #cecece; color:#505050;}
@ -25,11 +27,11 @@ a:hover.sj_btn_grey{ background-image:-webkit-linear-gradient(top, #eeeeee,#d3d3
/* sj_header */
.sj_header{ height:70px; width:100%; background:#1d1d1d;}
.sj_header a.sj_logo{ display:block; height:41px; width:146px; padding:14px 20px 0 12px;}
.sj_topnav{ height:70px; width:100%; padding-left: 180px; }
.sj_topnav li a{ height:70px; line-height:70px; font-size:14px; color:#fff; padding:0 20px;}
.sj_topnav{ height:70px; width:100%; padding-left: 170px; }
.navbar-pf .sj_topnav > li > a{ height:70px; line-height:70px; font-size:14px; color:#fff; padding:0px 20px;}
.sj_topnav li a:hover,.sj_topnav li a.sj_topnav_active{ background-image:-webkit-linear-gradient(top, #424242,#323232);background-image:linear-gradient(top,#424242,#323232); }
/* sj_content */
.sj_content{ width:100%; position:relative; color:#505050;}
.sj_content{ margin-top: 56px;}
.sj_leftnav{ width:170px; min-height:800px; max-height:985px; background:#1d1d1d; position:absolute; left:0; top:0px;}
.sj_leftnav_i{ background:#717171; padding:0 5px;;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-left:80px; }
.sj_menu {margin-top:12px;background:#1d1d1d; }
@ -41,32 +43,25 @@ a:hover.sj_btn_grey{ background-image:-webkit-linear-gradient(top, #eeeeee,#d3d3
.sj_menu_ul{ }
.sj_menu_ul li a{ display: block; background: #1d1d1d; color: #fff;padding-left: 30px; height: 40px; line-height: 40px; }
.sj_menu_ul li a:hover{background: #fff; color:#1d1d1d;}
#menu li a:hover { background-image:-webkit-linear-gradient(top, #535353,#353535);background-image:linear-gradient(top,#535353,#353535);}
#menu li ul li a { background: #1d1d1d; color: #fff;padding-left: 20px; border:none;}
#menu li ul li a:hover,.sj_leftnav ul#menu li ul li .leftnavact { background: #fff; color:#1d1d1d;}
.sj_menu_01{ background:url(../new/images/sj_icons.png) 0 0px no-repeat; padding-left:20px;}
.sj_menu_02{ background:url(../new/images/sj_icons.png) 0 -29px no-repeat; padding-left:20px;}
.sj_menu_03{ background:url(../new/images/sj_icons.png) 0 -112px no-repeat; padding-left:20px;}
.sj_menu_04{ background:url(../new/images/sj_icons.png) 0 -133px no-repeat; padding-left:20px;}
.sj_contentbox{ width:100%; background:#fff; min-height:800px; }
.sj_icons_home{ background:url(../new/images/sj_icons.png) 0 -60px no-repeat; width:15px; height:15px; margin-top:10px; margin-right:3px;}
.sj_content_position{ background:#eee; height:35px; line-height:35px; color:#7a7a7a; margin:2px 0 0 170px; padding-left:20px;}
.sj_content_position{ background:#e1e1e1; height:35px; line-height:35px; color:#7a7a7a; padding-left:20px; margin-left:-20px; margin-bottom: 20px; width: 110%;}
.sj_content_position ul li{ float:left;}
.sj_filter li{ float:left;}
.sj_filter li a{ display: inline-block; border:1px solid #cecece;background-image:-webkit-linear-gradient(top, #fcfcfc,#e9e9e9);background-image:linear-gradient(top, #fcfcfc,#e9e9e9); padding:5px 15px; color:#505050; margin-right:5px;}
.sj_filter li a{ display: inline-block; border:1px solid #cecece;background-image:-webkit-linear-gradient(top, #fcfcfc,#e9e9e9);background-image:linear-gradient(top, #fcfcfc,#e9e9e9); padding:5px 15px; color:#363636; margin-right:5px;}
.sj_filter li a:hover,.sj_filter li a.active{ background:#cdcdcd; border:1px solid #9e9e9e;}
.sj_content_top{ margin:20px 20px 0 190px;}
.sj_searchbox{position:relative;}
.sj_search_input{-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; border:1px solid #d3d3d3; background:#fff; padding-left:5px; color:#888; height:28px; width:210px;box-shadow: inset 0px 0px 5px #dcdcdc; }
.sj_search_input{-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; border:1px solid #d3d3d3; background:#f5f5f5; padding-left:5px; color:#888; height:32px; width:310px;box-shadow: inset 0px 0px 5px #dcdcdc; }
.sj_searchbox a.sj_search_btn{ position:absolute; top:5px; right:5px; background:url(../new/images/sj_icons.png) 0 -82px no-repeat; display:block; width:20px; height:20px; }
/* table */
.sj_content_table{ }
.sj_content_table > tbody > tr > td{ height:36px; line-height:36px;}
.sj_content_table tr td.tl{ text-align:left;}
.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_content_table > thead > tr > th{ height:36px; line-height:36px;}
.sj_content_table > tbody > tr > td{ height:38px; line-height:38px; padding: 0 10px; }
.sj_content_table > thead > tr > th{ height:38px; line-height:38px; padding: 0 10px; }
.sj_content_table .sj_tr_grey{ background:#f3f3f3;}
.sj_table_td01{ width:2%;}
.sj_table_td02{ width:9%;}
@ -83,3 +78,11 @@ a:hover.sj_btn_grey{ background-image:-webkit-linear-gradient(top, #eeeeee,#d3d3
.sj_table_bottom{ height:30px; line-height:30px; }
.sj_table_bottom li{ float:left;}
.sj_table_select{ background:#fff; border:1px solid #b1b1b1; height:25px; margin:0 5px;}
.badge{ font-weight: normal; text-shadow:none; background-color: #a1a1a1;}
.simple-table-checkbox{ text-align: center;}
.table{ margin-bottom: 10px;}
.sj_nav_taps{ border-bottom: none;}
.sj_nav_taps li a{ display: inline-block; font-size: 12px; border:1px solid #cecece;background-image:-webkit-linear-gradient(top, #fcfcfc,#e9e9e9);background-image:linear-gradient(top, #fcfcfc,#e9e9e9); padding:5px 15px; color:#505050; margin-right:5px;}
.sj_nav_taps li a:hover,.sj_nav_taps li a.active{ background:#cdcdcd; border:1px solid #9e9e9e;}
.sj_nav_taps > li.active > a, .sj_nav_taps > li.active > a:hover, .sj_nav_taps > li.active > a:focus { background:#cdcdcd; border:1px solid #9e9e9e; color:#505050;}
.sj_fluid{ padding:0;}

View File

@ -0,0 +1,5 @@
<ul ng-controller="Configs.MenuItemController" class="nav nav-pills" role="tablist">
<li ng-repeat="item in menuItem" role="presentation">
<a href="{{item.href}}"><span class="{{item.icon}}"></span> {{item.title}}</a>
</li>
</ul>

View File

@ -0,0 +1 @@
<div class="">hello</div>

View File

@ -0,0 +1 @@
<div class="c"> cccc</div>

View File

@ -0,0 +1,16 @@
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
module Configs{
_module.controller('Configs.MenuItemController',['$scope', '$location', ($scope, $location) => {
$scope.menuItem=[{
icon:"glyphicon glyphicon-cloud-upload",
title:"数据管理配置",
href: UrlHelpers.join(context, "/gluster-fs/setting")
},
{
icon:"glyphicon glyphicon-th-list",
title:"服务集群配置",
href: UrlHelpers.join(context, "/kube-cluster/setting")
}]
}]);
}

View File

@ -0,0 +1,25 @@
/// <reference path="../../includes.ts"/>
module Configs {
export var pluginName = "Configs";
export var context = "/config";
export var pluginPath = 'plugins/configs/';
export var templatePath = pluginPath + 'html/';
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3']);
export var route = PluginHelpers.createRoutingFunction(templatePath);
_module.config(['$provide', '$routeProvider', ($provide, $routeProvider) =>{
$routeProvider.when(UrlHelpers.join(context, '/gluster-fs/setting'), route('glusterfsSetting.html', false))
.when(UrlHelpers.join(context, '/kube-cluster/setting'), route('kubeClusterSetting.html', false));
}]);
_module.run(['$templateCache', 'HawtioExtension', '$compile', ($templateCache:ng.ITemplateCacheService, ext, $compile:ng.ICompileService) => {
ext.add('config-setting', ($scope) => {
var template = $templateCache.get<string>(UrlHelpers.join(templatePath, "configMenuItem.html"));
return $compile(template)($scope);
});
}]);
hawtioPluginLoader.addModule(pluginName);
}

View File

@ -1,12 +1,25 @@
<div ng-controller="Developer.WorkspacesController" hawtio-card-bg style="margin-top:100px;">
<div ng-controller="Developer.WorkspacesController" hawtio-card-bg >
<div hawtio-breadcrumbs></div>
<div hawtio-tabs></div>
<div class="container-content">
<div class="container-fluid">
<div class="row nav-content">
<ul class="nav nav-tabs" ng-show="navbarItems.length">
<div class="container-content sj_content">
<div class="sj_content_position clear" >
<ul >
<li class="sj_icons_home"></li>
<li>当前位置:</li>
<li><a href="#">数据汇总</a> <span>&gt;</span></li>
<li><a href="#">社保系统</a><span>&gt;</span></li>
<li><a href="#">批次A</a></li>
</ul>
</div>
<div class="container-fluid sj_fluid">
<div class="row nav-content mb10 clear " >
<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>
</ul>
<div class="fr sj_searchbox">
<input type="text" class="sj_search_input"/>
<a href="#" class="sj_search_btn"></a>
</div>
</div>
<div ng-hide="model.data.length" class="align-center">
<p class="alert alert-info">当前没有可以查看的数据.</p>
@ -22,14 +35,14 @@
<a class="sj_btn_grey pull-left mr5" title="删除数据" href="#" ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="deletePrompt(id || tableConfig.selectedItems)">删除数据</a>
</div>
<ul class="fr sj_table_bottom">
<li class="mr5">当前显示1~7行共7行。</li>
<li class="mr5">每页显示
<li class="mr5 " >当前显示1~7行共7行。</li>
<li class="mr5 ">每页显示
<select ng-options="value for value in pageSizeChoses" ng-change="selectAction()" ng-model="options.currentTableSize"></select>
</li>
<li class="mr5">当前页码</li>
<li class="mr5 ">当前页码</li>
<li>
<div class="hawtio-pager clearfix">
<label>{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>
<label >{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>
<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="previous()"><i class="fa fa-step-backward"></i></button>

View File

@ -15,7 +15,7 @@ module Developer {
.when(UrlHelpers.join(context, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'task'), route('apps.html', false))
.otherwise(context);
}]);
}]);
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
log.debug("Running");

View File

@ -12,7 +12,6 @@ module Kubernetes {
export var route = PluginHelpers.createRoutingFunction(templatePath);
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
$routeProvider
.when(UrlHelpers.join(context, '/pods'), route('pods.html', false))
.when(UrlHelpers.join(context, 'replicationControllers'), route('replicationControllers.html', false))
@ -26,8 +25,6 @@ module Kubernetes {
.when(UrlHelpers.join(context, 'pipelines'), route('pipelines.html', false))
.when(UrlHelpers.join(context, 'overview'), route('overview.html', true))
.when(context, {redirectTo: UrlHelpers.join(context, 'replicationControllers')});
console.log("===================");
console.log(context);
angular.forEach([context, "/workspaces/:workspace/projects/:project"], (context) => {
$routeProvider
@ -104,7 +101,7 @@ module Kubernetes {
});
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
console.log("3");
log.debug("Running");
viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
var builder = HawtioNav.builder();

View File

@ -5,7 +5,8 @@ module Navigation {
export var log = Logger.get(pluginName);
export var _module = angular.module(pluginName, []);
_module.run(() => {
_module.run(() =>{
console.log("1");
});
_module.service('HawtioBreadcrumbs', () => {
@ -248,6 +249,7 @@ module Navigation {
}]);
//hawtioPluginLoader.addModule('patternfly');
hawtioPluginLoader.addModule(pluginName);
}