Web_Manager_Develope
wu ming 8 years ago
parent 648fdc307d
commit 0df0f24a8d

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

@ -0,0 +1,4 @@
/// <reference path="../../includes.d.ts" />
declare module Developer {
var KubeTaskController: ng.IModule;
}

@ -2,6 +2,7 @@
/// <reference path="kubernetesInterfaces.d.ts" />
/// <reference path="utilHelpers.d.ts" />
/// <reference path="readPlacedivision.d.ts" />
/// <reference path="../../configs/ts/ConfigsHelper.d.ts" />
declare module Kubernetes {
var context: string;
var hash: string;

15
defs.d.ts vendored

@ -1,22 +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/configsDataService.d.ts"/>
/// <reference path="d.ts/configs/ts/configsUtils.d.ts"/>
/// <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/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/readPlacedivision.d.ts"/>
/// <reference path="d.ts/configs/ts/configPlugin.d.ts"/>
/// <reference path="d.ts/configs/ts/ConfigsHelper.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/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/fileMigrationTask.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"/>
@ -32,6 +28,7 @@
/// <reference path="d.ts/developer/ts/projectSelector.d.ts"/>
/// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/configs/ts/configsDataService.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
@ -76,3 +73,7 @@
/// <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"/>
/// <reference path="d.ts/configs/ts/configsUtils.d.ts"/>
/// <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"/>

File diff suppressed because one or more lines are too long

@ -35,8 +35,17 @@
</th>
</tr>
<tr ng-repeat="row in volume.brick track by $index" class="row.class">
<td ng-repeat="col in row" class="col.class">
<span class="col.class">{{col.title}}</span>
<td >
<span class="">服务器{{$index+1}}</span>
</td>
<td >
<span class="">{{row.ip}}</span>
</td>
<td >
<span class="">存储路径:{{row.path}}</span>
</td>
<td >
<span class="">已用{{row.usedSize}}/共{{row.availableSize}}</span>
</td>
</tr>
</table>

@ -35,7 +35,7 @@
<button class="btn sj_btn_blue" type='submit' style="color:#fff;">
<span class="glyphicon glyphicon-save "></span> 保存
</button>
<button class="btn sj_btn_grey" type='submit'>
<button class="btn sj_btn_grey" ng-click='cancel()'>
<span class="glyphicon glyphicon-remove "></span> 取消
</button>
</div>

@ -60,6 +60,7 @@ module Configs{
if(data){
result = data;
}
console.log(data);
}
});
this.cluster = result;

@ -72,6 +72,12 @@ module Configs{
removeElementsByValue($scope.tableForm, [{key: "name", value: "序号"},{key: "name", value: "连接状态"},{key: "name", value: "操作"}]);
}
$scope.cancel = () => {
$scope.tableForm =null;
$scope.add = false;
$scope.edit = false;
}
$scope.onSubmit = () => {
$scope.edit = false;
$scope.add = false;
@ -101,6 +107,6 @@ module Configs{
}
});
//removeElementByValue($scope.model, data._id, "_id");
}) ;
});
}]);
}

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

@ -71,18 +71,18 @@
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
请选择迁移集群
</label>
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in configs.cluster " />
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in volumes " />
</div>
<div class="form-group">
<div class="col-sm-12 alert alert-warning">
<span class="help-block" ng-show="!volumes || volumes.length == 0">
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">
<span class="help-block" >
当前没有可以迁移的集群,请在数据集群配置页面进行配置!
</span>
</div>
</div>
<div>
<treecontrol class="tree-classic" tree-model="x.folder" options="treeOptions" on-selection="showSelected(node)" selected-node="selectNode">
<div ng-hide= "!volumes || volumes.length == 0">
<treecontrol class="tree-classic" tree-model="migrationClick.selectedItem.folder" options="treeOptions" on-selection="showSelected(node)" selected-node="selectNode">
{{node.name}}
</treecontrol>
</div>

@ -0,0 +1,7 @@
/// <reference path="../../includes.ts"/>
/// <reference path="developerPlugin.ts"/>
module Developer {
export var KubeTaskController = controller("KubeTaskController", ["$scope", ($scope) => {
}]);
}

@ -31,6 +31,20 @@ module Developer {
labelSelected: "a8"
}
}
$scope.dataForTheTree =[
{ "name" : "Joe", "age" : "21", "children" : [
{ "name" : "Smith", "age" : "42", "children" : [] },
{ "name" : "Gary", "age" : "21", "children" : [
{ "name" : "Jenifer", "age" : "23", "children" : [
{ "name" : "Dani", "age" : "32", "children" : [] },
{ "name" : "Max", "age" : "34", "children" : [] }
]}
]}
]},
{ "name" : "Albert", "age" : "33", "children" : [] },
{ "name" : "Ron", "age" : "29", "children" : [] }
];;
//配置数据表格需要显示的内容及显示格式
$scope.tableConfig = {
data: 'model.data',
@ -177,6 +191,8 @@ module Developer {
var migrationClick = $scope.migrationClick;
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
migrationClick.selectedItem = $scope.volumes[0];
console.log(migrationClick.selectedItem.folder.childNodes);
migrationClick.dialog.open();
},
close: () => {
@ -203,15 +219,18 @@ module Developer {
isTarget: "false"
}, (rc) =>{
Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", Kubernetes.getName(rc), 0);
$location.path('/kubernetes/namespace/default/replicationControllers');
});
});
$timeout(() => {
$location.path('/kubernetes/namespace/default/replicationControllers');
}, 200);
}
function init($scope,$location,$routeParams){
$scope.model.updateModel();
if(ConfigsModel.cluster!=null)
$scope.volumes = ConfigsModel.cluster;
//创建二级菜单
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.navbarItems =[{

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

@ -2,6 +2,7 @@
/// <reference path="kubernetesInterfaces.ts"/>
/// <reference path="utilHelpers.ts"/>
/// <reference path="readPlacedivision.ts"/>
/// <reference path="../../configs/ts/ConfigsHelper.ts"/>
module Kubernetes {
export var context = '/kubernetes';
@ -1739,12 +1740,12 @@ module Kubernetes {
var client = Kubernetes.createKubernetesClient('replicationcontrollers','default');
var RCTemplate = new resourceRCTemplate();
var rcTemplate = RCTemplate.createRC(obj);
console.log(JSON.stringify(rcTemplate));
client.put(rcTemplate, function(obj) {
console.log("Created: ", obj);
if (angular.isFunction(onCompleteFn)) {
onCompleteFn(obj);
}
},(err) =>{
console.log(err);
});
}

Loading…
Cancel
Save