Merge branch 'Web_Manager_Develope' of https://git.trustie.net/fhx569287825/aggregation-platform into Web_Manager_Develope

This commit is contained in:
Linda 2016-09-09 08:21:16 +08:00
commit 6141ec9723
23 changed files with 1594 additions and 1284 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;
}

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

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="configPlugin.d.ts" />
/// <reference path="../../developer/ts/developerNavigation.d.ts" />
declare module Configs {
function shareInit($scope: any, $location: any, $routeParams: any): void;
function createNewObejct(array: Array<any>, obj: any): any[];
}

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

@ -0,0 +1,13 @@
/// <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;
};
var controller: (name: string, inlineAnnotatedConstructor: any[]) => ng.IModule;
}

View File

@ -1,4 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
function createCurrentSubNavBar($scope: any, $location: any, $routeParams: any): any;
}

View File

@ -60,4 +60,5 @@ declare module Developer {
function environmentInstanceLink(env: any, projectName?: any): string;
function namespaceLink($scope: any, $routeParams: any, path?: any): string;
function normalizeHref(href: string): string;
function activateCurrent(navBarItems: any): any;
}

View File

@ -1,5 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
declare module Developer {
var _module: ng.IModule;
var controller: (name: string, inlineAnnotatedConstructor: any[]) => ng.IModule;

View File

@ -1,5 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesModel.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="dataManagerHelper.d.ts" />

11
defs.d.ts vendored
View File

@ -1,13 +1,18 @@
/// <reference path="d.ts/includes.d.ts"/>
/// <reference path="d.ts/configs/ts/configPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/developerNavigation.d.ts"/>
/// <reference path="d.ts/configs/ts/configsHelper.d.ts"/>
/// <reference path="d.ts/configs/ts/configsUtils.d.ts"/>
/// <reference path="d.ts/configs/ts/kubeClusterSetting.d.ts"/>
/// <reference path="d.ts/configs/ts/shareController.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerHelper.d.ts"/>
/// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerNavigation.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>

View File

@ -207,353 +207,6 @@ legend {
background-color: Red;
}
/* This is for the 'Overview' page with all the rows of boxes */
.service-view-rectangle {
position: relative;
margin-left: 0;
margin-right: 0px;
margin-bottom: 15px;
margin-top: 0;
background-color: #fafafa;
border-width: 1px;
border-style: solid;
border-color: #eeeeee;
}
.service-view-rectangle .service-view-header {
margin-top: 5px;
margin-bottom: 5px;
line-height: 20px;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-box {
background-color: #eeeeee;
display: inline-block;
font-size: smaller;
}
.service-view-rectangle .service-view-header-delete .red {
opacity: 0.5;
transition: opacity 1s;
font-size: larger;
}
.service-view-rectangle .service-view-header-delete:hover .red {
opacity: 1;
}
.service-view-rectangle .service-view-icon img {
width: 32px;
height: 32px;
margin-right: 6px;
}
.service-view-rectangle .service-view-name {
font-size: larger;
font-weight: bold;
}
.service-view-rectangle .service-view-detail-header {
padding-top: 5px;
padding-bottom: 5px;
line-height: 20px;
}
.service-view-rectangle .service-view-detail-rectangle {
background-color: #eeeeee;
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-rectangle .value {
font-weight: bold;
}
.service-view-rectangle .service-view-detail-pod-summary,
.service-view-rectangle .service-view-detail-pod-summary-expand {
display: inline-block;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 20px;
padding-right: 20px;
margin-right: 8px;
margin-bottom: 8px;
background-color: #ffffff;
}
.service-view-rectangle .service-view-detail-pod-summary table td,
.service-view-rectangle .service-view-detail-pod-summary-expand table td {
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-pod-status,
.service-view-rectangle .service-view-detail-pod-connect {
line-height: 36px;
padding-right: 20px;
}
.service-view-rectangle .service-view-detail-pod-status i,
.service-view-rectangle .service-view-detail-pod-connect i {
font-size: 36px;
display: inline-block;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-expand {
color: #a0a0a0;
font-size: 18px;
padding-right: 0px;
}
.kubernetes-view .filter-header {
margin-bottom: 1em;
}
/* This is all for the diagram, not the 'Overview' page */
.kubernetes-overview {
width: 100%;
height: 100%;
display: table;
table-layout: fixed;
}
.kubernetes-overview-row {
display: table-row;
}
.kubernetes-overview-cell {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 0;
}
.service-wrapper {
display: block;
vertical-align: middle;
}
.kubernetes-node {
margin-left: auto;
margin-right: auto;
cursor: pointer;
text-align: center;
vertical-align: middle;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
transition: background 0.5s;
z-index: 1000;
}
.kubernetes-host-container {
margin-top: 5px;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
text-align: center;
max-width: 600px;
min-width: 300px;
padding: 0;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.kubernetes-pod-node {
display: block;
margin: 0;
padding: 0;
min-height: 48px;
line-height: 48px;
border-radius: 0;
border: 1px solid transparent;
border-top: 1px solid #d4d4d4;
box-shadow: none;
vertical-align: middle;
}
.css-table {
display: table;
width: 100%;
height: 100%;
}
.css-table-row {
display: table-row;
}
.css-table-row .pod-status-cell {
text-align: left;
padding-left: 5px;
padding-right: 5px;
}
.css-table-row .pod-status-cell i {
margin-left: 3px;
margin-right: 3px;
}
.css-table-row .pod-status-cell .clickable {
width: auto !important;
}
.css-table-cell {
display: table-cell;
vertical-align: middle;
}
.kubernetes-pod-node i {
font-size: 24px;
}
.kubernetes-overview-services {
width: 200px;
}
.kubernetes-service-node {
display: block;
margin-bottom: 10px;
width: 200px;
min-height: 66px;
padding: 0;
line-height: 48px;
}
.kubernetes-service-node .node-body {
display: inline;
padding-left: 10px;
line-height: 64px;
font-size: 20px;
float: left;
}
.kubernetes-service-node .node-header {
display: inline;
float: right;
}
.node-header {
padding-right: 10px;
white-space: nowrap;
line-height: 64px;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-replicationController-node {
border-radius: 64px;
display: block;
width: 64px;
height: 64px;
padding: 7px;
font-weight: bold;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-overview-cell .app-icon-medium {
width: 48px;
height: 48px;
}
.kubernetes-replicationController-node img {
width: 64px;
}
.kubernetes-node:hover,
.kubernetes-node.hovered {
background: #ddddff;
}
.pod-status-cell {
width: 80px;
line-height: 20px;
}
.pod-label-cell {
float: right;
text-align: right;
min-height: 48px;
}
.pod-label-cell .ngCellText {
white-space: normal;
}
.pod-log-lines * {
padding-left: 5px;
padding-right: 5px;
font-family: monospace;
margin: 0;
line-height: 14px;
}
.pod-log-lines * .black {
color: #222;
}
.pod-log-lines * .red {
color: #f22;
}
.pod-log-lines * .green {
color: #2f2;
}
.pod-log-lines * .yellow {
color: #ff2;
}
.pod-log-lines * .blue {
color: #22f;
}
.pod-log-lines * .purple {
color: #f2f;
}
.pod-log-lines * .cyan {
color: #2dd;
}
.pod-log-lines * .white {
color: #ddd;
}
.top-bottom-middle {
line-height: 34px;
}
.terminal-window {
position: fixed;
bottom: 0;
background: white;
border: 1px solid #d4d4d4;
overflow: hidden;
z-index: 1040;
}
.terminal-window .resize-dot {
width: 16px;
height: 16px;
border: 1px solid #d4d4d4;
background: white;
position: absolute;
bottom: 10px;
right: 10px;
cursor: nwse-resize;
border-radius: 8px;
z-index: 10000;
}
.terminal-window.minimized .resize-dot,
.terminal-window.maximized .resize-dot {
display: none;
}
.terminal-window.minimized .terminal-title,
.terminal-window.maximized .terminal-title {
cursor: inherit;
}
.terminal-window .terminal-body {
overflow: auto;
}
.terminal-window .terminal-body .terminal-wrapper > .terminal * {
font-family: 'DroidSansMonoRegular';
}
.terminal-window .terminal-title {
cursor: move;
border-bottom: 1px solid #d4d4d4;
}
.terminal-window .terminal-title > h5 {
display: inline-block;
margin-left: 5px;
}
.terminal-window .terminal-title > i {
font-size: 16px;
margin-right: 5px;
margin-top: 7px;
}
kubernetes-container-terminal .terminal-wrapper {
display: block !important;
}
kubernetes-container-terminal .terminal-actions {
position: absolute !important;
}
.pod-log-window .scroll-indicator {
position: absolute;
bottom: 0;
line-height: 32px;
left: 20px;
right: 20px;
background-color: #ffffff;
border-top: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
border-right: 1px solid #d4d4d4;
border-radius: 4px 4px 0 0;
cursor: pointer;
z-index: 10000;
opacity: 0.7;
}
.pod-log-window .terminal-body {
overflow-y: auto;
overflow-x: hidden;
}
.environment-row a {
color: black;
}
@ -1033,6 +686,353 @@ a:hover.data_file_btn {
background: url(../img/icons2.gif) -6px 9px no-repeat;
}
/* This is for the 'Overview' page with all the rows of boxes */
.service-view-rectangle {
position: relative;
margin-left: 0;
margin-right: 0px;
margin-bottom: 15px;
margin-top: 0;
background-color: #fafafa;
border-width: 1px;
border-style: solid;
border-color: #eeeeee;
}
.service-view-rectangle .service-view-header {
margin-top: 5px;
margin-bottom: 5px;
line-height: 20px;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-box {
background-color: #eeeeee;
display: inline-block;
font-size: smaller;
}
.service-view-rectangle .service-view-header-delete .red {
opacity: 0.5;
transition: opacity 1s;
font-size: larger;
}
.service-view-rectangle .service-view-header-delete:hover .red {
opacity: 1;
}
.service-view-rectangle .service-view-icon img {
width: 32px;
height: 32px;
margin-right: 6px;
}
.service-view-rectangle .service-view-name {
font-size: larger;
font-weight: bold;
}
.service-view-rectangle .service-view-detail-header {
padding-top: 5px;
padding-bottom: 5px;
line-height: 20px;
}
.service-view-rectangle .service-view-detail-rectangle {
background-color: #eeeeee;
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-rectangle .value {
font-weight: bold;
}
.service-view-rectangle .service-view-detail-pod-summary,
.service-view-rectangle .service-view-detail-pod-summary-expand {
display: inline-block;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 20px;
padding-right: 20px;
margin-right: 8px;
margin-bottom: 8px;
background-color: #ffffff;
}
.service-view-rectangle .service-view-detail-pod-summary table td,
.service-view-rectangle .service-view-detail-pod-summary-expand table td {
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-pod-status,
.service-view-rectangle .service-view-detail-pod-connect {
line-height: 36px;
padding-right: 20px;
}
.service-view-rectangle .service-view-detail-pod-status i,
.service-view-rectangle .service-view-detail-pod-connect i {
font-size: 36px;
display: inline-block;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-expand {
color: #a0a0a0;
font-size: 18px;
padding-right: 0px;
}
.kubernetes-view .filter-header {
margin-bottom: 1em;
}
/* This is all for the diagram, not the 'Overview' page */
.kubernetes-overview {
width: 100%;
height: 100%;
display: table;
table-layout: fixed;
}
.kubernetes-overview-row {
display: table-row;
}
.kubernetes-overview-cell {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 0;
}
.service-wrapper {
display: block;
vertical-align: middle;
}
.kubernetes-node {
margin-left: auto;
margin-right: auto;
cursor: pointer;
text-align: center;
vertical-align: middle;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
transition: background 0.5s;
z-index: 1000;
}
.kubernetes-host-container {
margin-top: 5px;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
text-align: center;
max-width: 600px;
min-width: 300px;
padding: 0;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.kubernetes-pod-node {
display: block;
margin: 0;
padding: 0;
min-height: 48px;
line-height: 48px;
border-radius: 0;
border: 1px solid transparent;
border-top: 1px solid #d4d4d4;
box-shadow: none;
vertical-align: middle;
}
.css-table {
display: table;
width: 100%;
height: 100%;
}
.css-table-row {
display: table-row;
}
.css-table-row .pod-status-cell {
text-align: left;
padding-left: 5px;
padding-right: 5px;
}
.css-table-row .pod-status-cell i {
margin-left: 3px;
margin-right: 3px;
}
.css-table-row .pod-status-cell .clickable {
width: auto !important;
}
.css-table-cell {
display: table-cell;
vertical-align: middle;
}
.kubernetes-pod-node i {
font-size: 24px;
}
.kubernetes-overview-services {
width: 200px;
}
.kubernetes-service-node {
display: block;
margin-bottom: 10px;
width: 200px;
min-height: 66px;
padding: 0;
line-height: 48px;
}
.kubernetes-service-node .node-body {
display: inline;
padding-left: 10px;
line-height: 64px;
font-size: 20px;
float: left;
}
.kubernetes-service-node .node-header {
display: inline;
float: right;
}
.node-header {
padding-right: 10px;
white-space: nowrap;
line-height: 64px;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-replicationController-node {
border-radius: 64px;
display: block;
width: 64px;
height: 64px;
padding: 7px;
font-weight: bold;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-overview-cell .app-icon-medium {
width: 48px;
height: 48px;
}
.kubernetes-replicationController-node img {
width: 64px;
}
.kubernetes-node:hover,
.kubernetes-node.hovered {
background: #ddddff;
}
.pod-status-cell {
width: 80px;
line-height: 20px;
}
.pod-label-cell {
float: right;
text-align: right;
min-height: 48px;
}
.pod-label-cell .ngCellText {
white-space: normal;
}
.pod-log-lines * {
padding-left: 5px;
padding-right: 5px;
font-family: monospace;
margin: 0;
line-height: 14px;
}
.pod-log-lines * .black {
color: #222;
}
.pod-log-lines * .red {
color: #f22;
}
.pod-log-lines * .green {
color: #2f2;
}
.pod-log-lines * .yellow {
color: #ff2;
}
.pod-log-lines * .blue {
color: #22f;
}
.pod-log-lines * .purple {
color: #f2f;
}
.pod-log-lines * .cyan {
color: #2dd;
}
.pod-log-lines * .white {
color: #ddd;
}
.top-bottom-middle {
line-height: 34px;
}
.terminal-window {
position: fixed;
bottom: 0;
background: white;
border: 1px solid #d4d4d4;
overflow: hidden;
z-index: 1040;
}
.terminal-window .resize-dot {
width: 16px;
height: 16px;
border: 1px solid #d4d4d4;
background: white;
position: absolute;
bottom: 10px;
right: 10px;
cursor: nwse-resize;
border-radius: 8px;
z-index: 10000;
}
.terminal-window.minimized .resize-dot,
.terminal-window.maximized .resize-dot {
display: none;
}
.terminal-window.minimized .terminal-title,
.terminal-window.maximized .terminal-title {
cursor: inherit;
}
.terminal-window .terminal-body {
overflow: auto;
}
.terminal-window .terminal-body .terminal-wrapper > .terminal * {
font-family: 'DroidSansMonoRegular';
}
.terminal-window .terminal-title {
cursor: move;
border-bottom: 1px solid #d4d4d4;
}
.terminal-window .terminal-title > h5 {
display: inline-block;
margin-left: 5px;
}
.terminal-window .terminal-title > i {
font-size: 16px;
margin-right: 5px;
margin-top: 7px;
}
kubernetes-container-terminal .terminal-wrapper {
display: block !important;
}
kubernetes-container-terminal .terminal-actions {
position: absolute !important;
}
.pod-log-window .scroll-indicator {
position: absolute;
bottom: 0;
line-height: 32px;
left: 20px;
right: 20px;
background-color: #ffffff;
border-top: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
border-right: 1px solid #d4d4d4;
border-radius: 4px 4px 0 0;
cursor: pointer;
z-index: 10000;
opacity: 0.7;
}
.pod-log-window .terminal-body {
overflow-y: auto;
overflow-x: hidden;
}
.layout-pf.layout-pf-fixed .container-pf-nav-pf-vertical {
margin-left: 170px;
}

File diff suppressed because one or more lines are too long

View File

@ -249,7 +249,7 @@ gulp.task('connect', ['watch'], function() {
}, {
proto: "http",
port: "8080",
hostname: "192.168.0.101",
hostname: "192.168.0.102",
path: '/java/console/api',
targetPath: "/"
}];

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>
@ -95,7 +94,7 @@
<script type="text/javascript" src="libs/codemirror/mode/clike/clike.js"></script>
<script type="text/javascript" src="libs/codemirror/mode/yaml/yaml.js"></script>
<!-- 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/patternfly/dist/js/patternfly.js"></script>
<script src="libs/hawtio-extension-service/dist/hawtio-extension-service.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>
<ul class="nav navbar-nav navbar-primary sj_topnav" hawtio-main-nav></ul>
<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()">

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.label}}</a>
</li>
</ul>

View File

@ -0,0 +1,8 @@
<div>
<div class="row">
<div hawtio-breadcrumbs></div>
</div>
<div class="row">
<div hawtio-tabs></div>
</div>
</div>

View File

@ -0,0 +1,41 @@
<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>

View File

@ -0,0 +1,69 @@
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
/// <reference path="../../developer/ts/developerNavigation.ts"/>
module Configs{
_module.controller('Configs.MenuItemController',['$scope', '$location', ($scope, $location) => {
$scope.menuItem=[{
icon: "glyphicon glyphicon-cloud-upload",
label: "数据管理配置",
title: "配置数据存储信息",
href: UrlHelpers.join(context, "/gluster-fs/setting")
},
{
icon: "glyphicon glyphicon-th-list",
label: "服务集群配置",
title: "配置服务集群信息",
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;
}
}

View File

@ -0,0 +1,28 @@
/// <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);
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
_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))
.when(context, {redirectTo: UrlHelpers.join(context, '/kube-cluster/setting')});
}]);
_module.run(['viewRegistry', '$templateCache', 'HawtioExtension', '$compile', (viewRegistry, $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);
});
viewRegistry['config'] = templatePath + "shareLayout.html";
}]);
hawtioPluginLoader.addModule(pluginName);
}

View File

@ -1,4 +1,5 @@
/// <reference path="../../includes.ts"/>
/// <reference path="developerNavigation.ts"/>
module Developer{
var log = Logger.get('developer-navigation');
export function createCurrentSubNavBar($scope, $location, $routeParams){
@ -44,73 +45,5 @@ module Developer{
}]
}
]);
}
function activateCurrent(navBarItems) {
navBarItems = _.compact(navBarItems);
var injector = HawtioCore.injector;
var $location = injector ? injector.get<ng.ILocationService>("$location") : null;
if ($location) {
var path = normalizeHref(trimQuery($location.path()));
var found = false;
function makeActive(item) {
item.active = true;
found = true;
}
function getHref(item) {
var href = item.href;
var trimHref = trimQuery(href);
return normalizeHref(trimHref);
}
angular.forEach(navBarItems, (item) => {
if (!found && item) {
if (angular.isFunction(item.isActive)) {
if (item.isActive(item, path)) {
makeActive(item);
}
} else {
var trimHref = getHref(item);
if (!trimHref) {
return;
}
if (trimHref === path) {
makeActive(item);
}
}
}
});
// Maybe it's a sub-item of a tab, let's fall back to that maybe
if (!found) {
angular.forEach(navBarItems, (item) => {
if (!found) {
if (!angular.isFunction(item.isActive)) {
var trimHref = getHref(item);
if (!trimHref) {
return;
}
if (_.startsWith(path, trimHref)) {
makeActive(item);
}
}
}
});
}
// still not found, let's log it
if (!found) {
log.debug("No navigation tab found for path:", path);
}
}
return navBarItems;
}
function trimQuery(text) {
if (text) {
var idx = text.indexOf("?");
if (idx >= 0) {
return text.substring(0, idx);
}
}
return text;
}
}
}

View File

@ -645,7 +645,7 @@ module Developer {
return href.replace(regex, '/');
}
function activateCurrent(navBarItems) {
export function activateCurrent(navBarItems) {
navBarItems = _.compact(navBarItems);
var injector = HawtioCore.injector;
var $location = injector ? injector.get<ng.ILocationService>("$location") : null;

View File

@ -1,24 +1,23 @@
/// <reference path="../../includes.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
module Developer {
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl']);
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
export var route = PluginHelpers.createRoutingFunction(templatePath);
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
$routeProvider.when(context, route('workspaces.html', false))
.when("/data-manager", route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/all'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/financial'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'task'), route('apps.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
.otherwise(context);
}]);
}]);
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
log.debug("Running");
log.debug("Running");
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';

View File

@ -1,6 +1,6 @@
/// <reference path="../../includes.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesModel.ts"/>
/// <reference path="developerEnrichers.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="dataManagerHelper.ts"/>
@ -8,9 +8,10 @@
module Developer {
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel","KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element",
($scope, KubernetesModel:Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element) => {
init($scope,location,$routeParams);
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element) => {
init($scope, $location, $routeParams);
console.log($location.url());
$scope.model=DataModel;
$scope.model.initParamOptions();
$scope.options = DataModel.paramOptions;

View File

@ -11,8 +11,7 @@ module Kubernetes {
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
export var route = PluginHelpers.createRoutingFunction(templatePath);
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
_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))
@ -25,9 +24,7 @@ module Kubernetes {
.when(UrlHelpers.join(context, 'hosts/:id'), route('host.html', true))
.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);
.when(context, {redirectTo: UrlHelpers.join(context, 'replicationControllers')});
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);
}