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

Web_Manager_Develope
Linda 10 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>

File diff suppressed because it is too large Load Diff

@ -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