数据管理配置页面前端编写

Web_Manager_Develope
Linda 8 years ago
commit c6cf79cb61

@ -1,5 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="configPlugin.d.ts" />
declare module Configs {
var EableEdit: ng.IModule;
var TableEdit: ng.IModule;
}

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

@ -1,5 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="developerPlugin.d.ts" />
/// <reference path="dataManagerModel.d.ts" />
/// <reference path="dataManagerHelper.d.ts" />
declare module Developer {
var KubeTaskController: ng.IModule;
}

@ -6,4 +6,5 @@ declare module Kubernetes {
var DataLabels: ng.IModule;
var Labels: ng.IModule;
var Status: ng.IModule;
var TaskEdit: ng.IModule;
}

4
defs.d.ts vendored

@ -7,8 +7,8 @@
/// <reference path="d.ts/configs/ts/glusterfsSetting.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/developer/ts/dataManagerHelper.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/readPlacedivision.d.ts"/>
@ -34,6 +34,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"/>
@ -76,4 +77,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

@ -129,6 +129,12 @@ treecontrol li:hover{}
.sj_control-label{ padding:0; line-height:30px; }
.modal-footer{ margin-top: 0;}
.badge-info{ background-color: #3498db;}
.btn:focus {
outline: none;
outline-offset: 0; }
.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 class="container-content sj_content">
<div class="row">
<div class="col-md-1">
<button class="btn pull-right sj_btn_blue" ng-click="create()">
<span class="glyphicon glyphicon-plus"></span> 添加
<div class="mb10">
<button class="btn sj_btn_green" style="color:#fff;" ng-click="create()">
<span class="glyphicon glyphicon-plus "></span> 添加
</button>
</div>
</div>
<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>
<th class="sj_c_green simple-table-checkbox" style="padding:0 10px;color: #58b358;">已启用</th>
<th class="no-fade table-header">
<span class="">{{volume.name}}</span>
</th>
<th class="no-fade table-header">
<th class="no-fade table-header" colspan="2">
<span class="">云路径:{{volume.path}}</span>
</th>
<th class="no-fade table-header">
<span class="">状态</span>
</th>
<th class="no-fade table-header">
<span class="">已用{{volume.usedSize}}/共{{allSize}}</span>
<span class="">已用&nbsp;{{volume.usedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{{allSize}}</span>
</th>
<th class="no-fade table-header">
<button class="btn sj_btn" ng-click="editRow(volume)">
@ -34,7 +34,12 @@
</button>
</th>
</tr>
</thead>
<tbody>
<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 >
<span class="">服务器{{$index+1}}</span>
</td>
@ -45,9 +50,11 @@
<span class="">存储路径:{{row.path}}</span>
</td>
<td >
<span class="">已用{{row.usedSize}}/共{{row.availableSize}}</span>
<span class="">已用&nbsp;{{row.usedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{{row.availableSize}}</span>
</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>

@ -1,5 +1,5 @@
<script type="text/ng-template" id="tableEdit.html" >
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Configs.EableEdit">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Configs.TableEdit">
<button class="btn sj_btn" ng-click="editRow(entity)">
<span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;编辑
</button>

@ -1,7 +1,7 @@
/// <reference path="../../includes.ts"/>
/// <reference path="configPlugin.ts"/>
module Configs{
export var EableEdit = controller('EableEdit', ['$scope', ($scope) => {
export var TableEdit = controller('TableEdit', ['$scope', ($scope) => {
$scope.editRow = (entity)=>{
$scope.$emit('editRow', entity);
}
@ -9,5 +9,5 @@ module Configs{
$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}
}]);
}]);
}

@ -6,11 +6,11 @@
<div hawtio-tabs></div>
</div>
<div class="container-content ">
<div class="row align-center mb10" ng-hide="model.oracleParam.length">
<div class="row align-center mb10" ng-hide="true">
<p class="alert alert-info">当前没有可以查看的任务列表!</p>
</div>
<div class="row mb10" ng-show="model.oracleParam.length">
<table class="table table-bordered table-striped sj_content_table" hawtio-simple-table="tableConfig" />
<div class="row mb10" ng-show="model.data.length">
<table class="table table-bordered table-striped sj_content_table" hawtio-simple-table="tableConfig" />
</div>
</div>
</div>

@ -1,5 +1,6 @@
/// <reference path="../../includes.ts"/>
/// <reference path="developerNavigation.ts"/>
/// <reference path="developerHelpers.ts"/>
module Developer{
var log = Logger.get('developer-navigation');
export function createCurrentSubNavBar($scope, $location, $routeParams){
@ -43,7 +44,12 @@ module Developer{
label: "社保",
title: "社保数据"
}]
}
},
{
href: UrlHelpers.join(context,"Overview/","task"),
label: "任务",
title: "任务查看"
}
]);
}
}

@ -12,7 +12,8 @@ module Developer {
.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, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/task'), route('fileMigrationTask.html', false))
.otherwise(context);
}]);

@ -1,7 +1,65 @@
/// <reference path="../../includes.ts"/>
/// <reference path="developerPlugin.ts"/>
/// <reference path="dataManagerModel.ts"/>
/// <reference path="dataManagerHelper.ts"/>
module Developer {
export var KubeTaskController = controller("KubeTaskController", ["$scope", ($scope) => {
export var KubeTaskController = controller("KubeTaskController", ["$scope", "$location", "$routeParams", "DataModel", "$templateCache", ($scope, $location, $routeParams, DataModel, $templateCache) => {
$scope.model = DataModel;
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.model.data = [{_key: 2, name: "南京市-玄武区", labels:{system: 34, batch: 2}, status: 1, process:75},
{_key: 4, name: "南京市-雨花区", labels:{system: 14, batch: 1}, status: 0, process:0},
{_key: 5, name: "南京市-六合区", labels:{system: 76, batch: 1}, status: 2, process:100},
{_key: 6, name: "南京市-浦口区", labels:{system: 76, batch: 1}, status: 3, process:97}];
$scope.tableConfig = {
data: 'model.data',
showSelectionCheckbox: false,
enableRowClickSelection: false,
multiSelect: true,
selectedItems: [],
filterOptions: {
filterText: $location.search()["q"] || ''
},
columnDefs: [{
field: "_key",
displayName: '编码',
customSortField: (field) =>{
return field.id;
}
},
{
field: "name",
displayName: '市-区/县'
},
{
field: "systemName",
displayName: '系统名称'
},
{
field: "labels",
displayName: '数据标签',
cellTemplate: $templateCache.get("dataLabelsTemplate.html")
},
{
field: "status",
displayName: '迁移状态',
cellTemplate: $templateCache.get("taskStatus.html")
},
{
field: "process",
displayName: '迁移进度',
cellTemplate: $templateCache.get("taskProcess.html")
},
{
field: "entity",
displayName: '操作',
cellTemplate: $templateCache.get("taskEdit.html")
}
]};
$scope.$on("deleteRow", (event, data) =>{
console.log("删除任务");
});
}]);
}

@ -1,16 +0,0 @@
<div ng-controller="Developer.KubeTaskController">
<div class="row">
<div hawtio-breadcrumbs></div>
</div>
<div class="row">
<div hawtio-tabs></div>
</div>
<div class="container-content ">
<div class="row align-center mb10" ng-hide="model.oracleParam.length">
<p class="alert alert-info">当前没有可以查看的任务列表!</p>
</div>
<div class="row mb10" ng-show="model.oracleParam.length">
<table class="table table-bordered table-striped sj_content_table" hawtio-simple-table="tableConfig" />
</div>
</div>
</div>

@ -1,145 +1,117 @@
<script type="text/ng-template" id="runButton.html">
<button ng-show="model.showRunButton"
class="btn btn-success pull-right"
ng-click="viewTemplates()"
title="Run an application from a template">
<i class="fa fa-play-circle"></i> Run ...
</button>
<button ng-show="model.showRunButton" class="btn btn-success pull-right" ng-click="viewTemplates()" title="Run an application from a template">
<i class="fa fa-play-circle"></i> Run ...
</button>
</script>
<script type="text/ng-template" id="idTemplate.html">
<div class="ngCellText nowrap">
<a href=""
title="View details for {{row.entity.metadata.name || row.entity.name}}">
<!--<img class="app-icon-small" ng-src="{{row.entity.$iconUrl}}" ng-show="row.entity.$iconUrl">-->
<strong>{{row.entity.$oracleName || row.entity.name}}</strong></a>
</div>
<div class="ngCellText nowrap">
<a href="" title="View details for {{row.entity.metadata.name || row.entity.name}}">
<!--<img class="app-icon-small" ng-src="{{row.entity.$iconUrl}}" ng-show="row.entity.$iconUrl">-->
<strong>{{row.entity.$oracleName || row.entity.name}}</strong></a>
</div>
</script>
<script type="text/ng-template" id="selectorTemplate.html">
<div class="ngCellText">
<span ng-repeat="(name, value) in row.entity.spec.selector track by $index">
<div class="ngCellText">
<span ng-repeat="(name, value) in row.entity.spec.selector track by $index">
<strong>{{name}}</strong>: {{value}}
</span>
</div>
</div>
</script>
<script type="text/ng-template" id="podCountsAndLinkTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Status">
<a ng-show="row.entity.$podCounters.podsLink" title="pods status">
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===2)" class="badge badge-success" > 启动</span>
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===0)" class="badge badge-info" > 等待</span>
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===1)" class="badge badge-warning " > 失败</span>
<span ng-show="row.entity.$podCounters.valid || row.entity.$podCounters.waiting" class="badge badge-info"> 等待</span>
<span ng-show="!(row.entity.$podCounters.waiting || row.entity.$podCounters.ready || row.entity.$podCounters.valid || row.entity.$podCounters.error)" class="badge"> 停止</span>
<span ng-show="row.entity.$podCounters.error" class="badge badge-warning" > 失败</span>
</a>
</div>
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Status">
<a ng-show="row.entity.$podCounters.podsLink" title="pods status">
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===2)" class="badge badge-success"> 启动</span>
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===0)" class="badge badge-info"> 等待</span>
<span ng-show="row.entity.$podCounters.ready && (row.entity.$oracleStatus===1)" class="badge badge-warning "> 失败</span>
<span ng-show="row.entity.$podCounters.valid || row.entity.$podCounters.waiting" class="badge badge-info"> 等待</span>
<span ng-show="!(row.entity.$podCounters.waiting || row.entity.$podCounters.ready || row.entity.$podCounters.valid || row.entity.$podCounters.error)" class="badge"> 停止</span>
<span ng-show="row.entity.$podCounters.error" class="badge badge-warning"> 失败</span>
</a>
</div>
</script>
<script type="text/ng-template" id="dataSummaryTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity" >
<a ng-show="row.entity.$podCounters.podsLink" title="pods status">
<span ng-show="row.entity.$extractStatus === 0" class="badge badge-info" href=""> 未汇总</span>
<span ng-show="row.entity.$extractStatus === 1" class="badge badge-success" href=""> 正在汇总</span>
<span ng-show="row.entity.$extractStatus === 2" class="badge" href=""> 已完成</span>
<span ng-show="row.entity.$extractStatus === 3" class="badge badge-warning" href=""> 失败</span>
<div ng-show="row.entity.$extractStatus === 10">
<span class="badge badge-remind"> 汇总数据库</span>
<span ng-include = "'oracleLogTemplate.html'"></span>
</div>
</a>
</div>
<div class="ngCellText" ng-init="entity=row.entity">
<a ng-show="row.entity.$podCounters.podsLink" title="pods status">
<span ng-show="row.entity.$extractStatus === 0" class="badge badge-info" href=""> 未汇总</span>
<span ng-show="row.entity.$extractStatus === 1" class="badge badge-success" href=""> 正在汇总</span>
<span ng-show="row.entity.$extractStatus === 2" class="badge" href=""> 已完成</span>
<span ng-show="row.entity.$extractStatus === 3" class="badge badge-warning" href=""> 失败</span>
<div ng-show="row.entity.$extractStatus === 10">
<span class="badge badge-remind"> 汇总数据库</span>
<span ng-include="'oracleLogTemplate.html'"></span>
</div>
</a>
</div>
</script>
<script type="text/ng-template" id="labelTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Labels">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="label in labels track by $index"
class="pod-label badge"
ng-class="labelClass(label.key)"
ng-click="handleClick(entity, label.key, label)"
title="{{label.key}}">{{label.title}}</span>
</div>
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Labels">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="label in labels track by $index" class="pod-label badge" ng-class="labelClass(label.key)" ng-click="handleClick(entity, label.key, label)" title="{{label.key}}">{{label.title}}</span>
</div>
</script>
<script type="text/ng-template" id="eventSourceTemplate.html">
<div class="ngCellText" ng-init="labels=row.entity.source">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="(key, value) in labels track by $index"
class="pod-label badge"
class="background-light-grey mouse-pointer"
title="{{key}}"
ng-click="$emit('labelFilterUpdate', key + '=' + value)">{{value}}</span>
</div>
<div class="ngCellText" ng-init="labels=row.entity.source">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="(key, value) in labels track by $index" class="pod-label badge" class="background-light-grey mouse-pointer" title="{{key}}" ng-click="$emit('labelFilterUpdate', key + '=' + value)">{{value}}</span>
</div>
</script>
<script type="text/ng-template" id="dataLabelsTemplate.html" ng-controller="Kubernetes.DataLabels">
<div class="ngCellText" ng-init="labels=row.entity.labels" >
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="(key, value) in labels track by $index"
class="pod-label badge"
ng-class="labelClass(label.key)"
ng-click="labelClick(entity, label.key, label.value)"
title="{{label.key}}">{{value}}</span>
</div>
<div class="ngCellText" ng-init="labels=row.entity.labels">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="(key, value) in labels track by $index" class="pod-label badge" ng-class="labelClass(label.key)" ng-click="labelClick(entity, label.key, label.value)" title="{{label.key}}">{{value}}</span>
</div>
</script>
<script type="text/ng-template" id="hostTemplate.html">
<div class="ngCellText" ng-init="host=row.entity.$host">
<span class="pod-label badge background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'host=' + host)">{{host}}</span>
</div>
<div class="ngCellText" ng-init="host=row.entity.$host">
<span class="pod-label badge background-light-grey mouse-pointer" ng-click="$emit('labelFilterUpdate', 'host=' + host)">{{host}}</span>
</div>
</script>
<script type="text/ng-template" id="portalAddress.html">
<div class="ngCellText">
<div ng-repeat="port in row.entity.$ports track by $index">
<a target="_blank" href="{{row.entity.$connectUrl}}"
ng-show="row.entity.$connectUrl && row.entity.$podCounters.ready"
title="Protocol {{row.entity.spec.protocol}}">
<div class="ngCellText">
<div ng-repeat="port in row.entity.$ports track by $index">
<a target="_blank" href="{{row.entity.$connectUrl}}" ng-show="row.entity.$connectUrl && row.entity.$podCounters.ready" title="Protocol {{row.entity.spec.protocol}}">
{{row.entity.$host}}
</a>
<span ng-hide="row.entity.$connectUrl && row.entity.$podCounters.ready">{{row.entity.spec.portalIP || row.entity.spec.clusterIP}}:{{port}}</span>
<span ng-hide="row.entity.$connectUrl && row.entity.$podCounters.ready">{{row.entity.spec.portalIP || row.entity.spec.clusterIP}}:{{port}}</span>
</div>
</div>
</div>
</script>
<script type="text/ng-template" id="iconCellTemplate.html">
<div class="ngCellText">
<img class="app-icon-small" ng-src="{{row.entity.$iconUrl}}">
</div>
<div class="ngCellText">
<img class="app-icon-small" ng-src="{{row.entity.$iconUrl}}">
</div>
</script>
<script type="text/ng-template" id="ageTemplate.html">
<div class="ngCellText " ng-model="row.entity.$pods[0].$age">
{{row.entity.$pods[0].$age}}
</div>
<div class="ngCellText " ng-model="row.entity.$pods[0].$age">
{{row.entity.$pods[0].$age}}
</div>
</script>
<script type="text/ng-template" id="firstTimestampTemplate.html">
<div class="ngCellText" title="{{row.entity.$firstTimestamp}}">
{{row.entity.$firstTimestamp | relativeTime}}
</div>
<div class="ngCellText" title="{{row.entity.$firstTimestamp}}">
{{row.entity.$firstTimestamp | relativeTime}}
</div>
</script>
<script type="text/ng-template" id="lastTimestampTemplate.html">
<div class="ngCellText" title="{{row.entity.$lastTimestamp}}">
{{row.entity.$lastTimestamp | relativeTime}}
</div>
<div class="ngCellText" title="{{row.entity.$lastTimestamp}}">
{{row.entity.$lastTimestamp | relativeTime}}
</div>
</script>
<script type="text/ng-template" id="eventKindTemplate.html">
<div class="ngCellText" ng-init="kind=row.entity.involvedObject.kind">
<span class="pod-label badge"
class="background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'kind=' + kind)">{{kind}}</span>
</div>
<div class="ngCellText" ng-init="kind=row.entity.involvedObject.kind">
<span class="pod-label badge" class="background-light-grey mouse-pointer" ng-click="$emit('labelFilterUpdate', 'kind=' + kind)">{{kind}}</span>
</div>
</script>
<script type="text/ng-template" id="eventNameTemplate.html">
<div class="ngCellText" ng-init="name=row.entity.involvedObject.name">
<span class="pod-label badge"
class="background-light-grey mouse-pointer"
ng-click="$emit('labelFilterUpdate', 'name=' + name)">{{name}}</span>
</div>
<div class="ngCellText" ng-init="name=row.entity.involvedObject.name">
<span class="pod-label badge" class="background-light-grey mouse-pointer" ng-click="$emit('labelFilterUpdate', 'name=' + name)">{{name}}</span>
</div>
</script>
<script type="text/ng-template" id="eventSummaryTemplate.html">
<div class="ngCellText" title="Number of events on this resource">
<a ng-show="row.entity.$pods[0].$eventsLink" href="{{row.entity.$pods[0].$eventsLink}}">
<span class="badge">{{row.entity.$pods[0].$events.length}}</span>
</a>
</div>
<div class="ngCellText" title="Number of events on this resource">
<a ng-show="row.entity.$pods[0].$eventsLink" href="{{row.entity.$pods[0].$eventsLink}}">
<span class="badge">{{row.entity.$pods[0].$events.length}}</span>
</a>
</div>
</script>
<script type="text/ng-template" id="connectTemplate.html">
<span ng-show="entity.$jolokiaUrl && entity.$ready" ng-controller="Kubernetes.ConnectController">
@ -158,61 +130,54 @@
</span>
</script>
<script type="text/ng-template" id="logIconTemplate.html">
<span ng-show="entity.status.phase === 'Running'" ng-controller="Kubernetes.PodLogLinkController">
<span ng-show="entity.status.phase === 'Running'" ng-controller="Kubernetes.PodLogLinkController">
<i class="fa fa-file-text" title="Open up the logs for {{entity.metadata.name}}" ng-click="openLogs(entity)"></i>
</span>
</script>
<script type="text/ng-template" id="oracleLogTemplate.html">
<span ng-controller="Kubernetes.PodLogLinkController">
<span ng-controller="Kubernetes.PodLogLinkController">
<i class="fa fa-file-text" title="打开{{entity.$oracleName}}的汇总日志" ng-click="openLogs(entity)"></i>
</span>
</script>
<script type="text/ng-template" id="connectParamTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity">
<p ng-show="row.entity.$pods.length"><strong>{{row.entity.$pods[0].$host}}:{{row.entity.$pods[0].spec.containers[0].ports[0].hostPort}}/orcl</strong></p>
</div>
<div class="ngCellText" ng-init="entity=row.entity">
<p ng-show="row.entity.$pods.length"><strong>{{row.entity.$pods[0].$host}}:{{row.entity.$pods[0].spec.containers[0].ports[0].hostPort}}/orcl</strong></p>
</div>
</script>
<script type="text/ng-template" id="statusTemplate.html">
<div class="ngCellText nowrap" ng-init="entity=row.entity" ng-controller="Kubernetes.PodStatus"
title="Pod {{entity.metadata.name}} is {{entity.status.phase}}">
<!-- in detail view -->
<p ng-show="data"><strong>Status: </strong></p>
<i class="fa {{entity.$statusCss}}"></i>
<span ng-show="data">{{data}}</span>
<!-- in table -->
<span ng-include="'connectTemplate.html'"></span>
<span ng-include="'termTemplate.html'"></span>
<span ng-include="'logIconTemplate.html'"></span>
</div>
<div class="ngCellText nowrap" ng-init="entity=row.entity" ng-controller="Kubernetes.PodStatus" title="Pod {{entity.metadata.name}} is {{entity.status.phase}}">
<!-- in detail view -->
<p ng-show="data"><strong>Status: </strong></p>
<i class="fa {{entity.$statusCss}}"></i>
<span ng-show="data">{{data}}</span>
<!-- in table -->
<span ng-include="'connectTemplate.html'"></span>
<span ng-include="'termTemplate.html'"></span>
<span ng-include="'logIconTemplate.html'"></span>
</div>
</script>
<script type="text/ng-template" id="resizeDialog.html">
<div modal="resizeDialog.dialog.show">
<form class="form-horizontal" ng-submit="resizeDialog.onOk()">
<div class="modal-header"><h4>Scale {{resizeDialog.controller.metadata.name}}</h4></div>
<div class="modal-body">
<div class="control-group">
<label class="control-label" for="replicas">Number of pods you would like to scale to?</label>
<div class="controls">
<input type="number" min="0" id="replicas" ng-model="resizeDialog.newReplicas">
</div>
</div>
</div>
<div class="modal-footer">
<input class="btn btn-primary" type="submit"
ng-disabled="resizeDialog.newReplicas === resizeDialog.controller.status.replicas"
value="Resize">
<button class="btn btn-warning cancel sj_btn_grey" type="button" ng-click="resizeDialog.close()">取消</button>
</div>
</form>
</div>
<div modal="resizeDialog.dialog.show">
<form class="form-horizontal" ng-submit="resizeDialog.onOk()">
<div class="modal-header">
<h4>Scale {{resizeDialog.controller.metadata.name}}</h4></div>
<div class="modal-body">
<div class="control-group">
<label class="control-label" for="replicas">Number of pods you would like to scale to?</label>
<div class="controls">
<input type="number" min="0" id="replicas" ng-model="resizeDialog.newReplicas">
</div>
</div>
</div>
<div class="modal-footer">
<input class="btn btn-primary" type="submit" ng-disabled="resizeDialog.newReplicas === resizeDialog.controller.status.replicas" value="Resize">
<button class="btn btn-warning cancel sj_btn_grey" type="button" ng-click="resizeDialog.close()">取消</button>
</div>
</form>
</div>
</script>
<script type="text/ng-template" id="namespaceSelector.html">
<span ng-controller="Kubernetes.NamespaceController">
<span ng-controller="Kubernetes.NamespaceController">
namespace:
<select ng-model="namespace" ng-options="namespace for namespace in namespaces"
title="choose the namespace - which is a selection of resources in kubernetes">
@ -220,37 +185,64 @@
</span>
</script>
<script type="text/ng-template" id="pendingPipelines.html">
<div class="row" ng-controller="Developer.PipelinesController">
<div class="row">
<div class="col-md-12">
<div ng-hide="model.fetched">
<div class="align-center">
<i class="fa fa-spinner fa-spin"></i>
</div>
</div>
<div ng-show="model.fetched">
<div ng-hide="model.job.builds.length" class="align-center">
<p class="alert alert-info">There are no pipelines for this job.</p>
</div>
<div ng-show="model.job.builds.length">
<div class="pipeline-build-block" ng-repeat="build in model.job.builds | filter:model.filterText track by $index">
<div pipeline-view></div>
<div class="row" ng-controller="Developer.PipelinesController">
<div class="row">
<div class="col-md-12">
<div ng-hide="model.fetched">
<div class="align-center">
<i class="fa fa-spinner fa-spin"></i>
</div>
</div>
<div ng-show="model.fetched">
<div ng-hide="model.job.builds.length" class="align-center">
<p class="alert alert-info">There are no pipelines for this job.</p>
</div>
<div ng-show="model.job.builds.length">
<div class="pipeline-build-block" ng-repeat="build in model.job.builds | filter:model.filterText track by $index">
<div pipeline-view></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</script>
<script type="text/ng-template" id="taskEdit.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.TaskEdit">
<button class="btn sj_btn" ng-click="deleteRow(entity)">
<span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;删除
</button>
</div>
</script>
<!-- 迁移进度条 -->
<script type="text/ng-template" id="taskProcess.html">
<div class="ngCellText progress" ng-init="entity=row.entity">
<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">20%</span>
</div>
<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">20%</span>
</div>
</div>
</script>
<!--迁移状态显示 -->
<script type="text/ng-template" id="taskStatus.html">
<div class="ngCellText" ng-init="entity=row.entity">
<span ng-show="entity.status===0" class="glyphicon glyphicon-minus"></span>
<span ng-show="entity.status===1" class="glyphicon glyphicon-transfer"></span>
<span ng-show="entity.status===2" class="glyphicon glyphicon-ok"></span>
<span ng-show="entity.status===3" class="glyphicon glyphicon-remove"></span>
</div>
</script>
<script type="text/ng-template" id="creationTimeTemplate.html">
<div class="ngCellText" title="created at: {{row.entity.$creationDate | date : 'h:mm:ss a, EEE MMM yyyy'}}">
{{row.entity.$creationDate.relative()}}
</div>
<div class="ngCellText" title="created at: {{row.entity.$creationDate | date : 'h:mm:ss a, EEE MMM yyyy'}}">
{{row.entity.$creationDate.relative()}}
</div>
</script>
<div ng-controller="Kubernetes.TopLevel">
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over
uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>
</div>
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>
</div>
</div>

@ -113,4 +113,10 @@ module Kubernetes {
console.log(newValue);
},true);*/
}]);
export var TaskEdit = controller('TaskEdit', ['$scope', ($scope) => {
$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}
}]);
}

@ -209,7 +209,7 @@ module Navigation {
</ul>
</div>
<div ng-hide="subTab.items.length" class="sj_menu_nav" >
<i class=" sj_menu_02" ></i><a href="{{subTab.href}}">{{subTab.label}}</a>
<i class=" sj_menu_02" ></i><a href="{{subTab.href}}">{{subTab.label}}</a>
</div>
</li>
</ul>

Loading…
Cancel
Save