|
|
@ -11,13 +11,13 @@
|
|
|
|
module Developer {
|
|
|
|
module Developer {
|
|
|
|
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element",
|
|
|
|
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element",
|
|
|
|
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element) => {
|
|
|
|
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element) => {
|
|
|
|
$scope.model=DataModel;
|
|
|
|
$scope.model=DataModel;
|
|
|
|
init($scope, $location, $routeParams);
|
|
|
|
init($scope, $location, $routeParams);
|
|
|
|
$scope.model.initParamOptions();
|
|
|
|
|
|
|
|
$scope.options = DataModel.paramOptions;
|
|
|
|
$scope.options = DataModel.paramOptions;
|
|
|
|
|
|
|
|
console.log($scope.options);
|
|
|
|
$scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption;
|
|
|
|
$scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption;
|
|
|
|
$scope.options.dataType = getDataType($location);
|
|
|
|
$scope.options.dataType = getDataType($location);
|
|
|
|
|
|
|
|
console.log($scope.volumes);
|
|
|
|
//console.log(JSON.stringify($scope.volumes[0].folderNode));
|
|
|
|
//console.log(JSON.stringify($scope.volumes[0].folderNode));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -160,23 +160,22 @@ module Developer {
|
|
|
|
|
|
|
|
|
|
|
|
$scope.migrationClick = {
|
|
|
|
$scope.migrationClick = {
|
|
|
|
items:null,
|
|
|
|
items:null,
|
|
|
|
selectedItem: $scope.volumes[0] || "当前没有可以迁移的集群",
|
|
|
|
selectedItem: $scope.volumes[0] || {"name": "当前没有可以迁移的集群"},
|
|
|
|
dialog: new UI.Dialog(),
|
|
|
|
dialog: new UI.Dialog(),
|
|
|
|
onOk: () => {
|
|
|
|
onOk: () => {
|
|
|
|
var migrationClick = $scope.migrationClick;
|
|
|
|
var migrationClick = $scope.migrationClick;
|
|
|
|
var volumeName = migrationClick.selectedItem.name;
|
|
|
|
Configs.oracleInfoOperate($http, "/java/console/api/volume", Configs.OperateType.MOVE,
|
|
|
|
var selectItems = $scope.tableConfig.selectedItems;
|
|
|
|
{
|
|
|
|
var selectNode = $scope.selectNode;
|
|
|
|
"name": migrationClick.selectedItem.name,
|
|
|
|
console.log(migrationClick);
|
|
|
|
"selectItems": $scope.tableConfig.selectedItems,
|
|
|
|
console.log(selectItems);
|
|
|
|
"selectNode": $scope.selectNode
|
|
|
|
console.log(selectNode);
|
|
|
|
}, (result, status) => {
|
|
|
|
/*Configs.oracleInfoOperate($http, "/java/console/api/volume", Configs.OperateType.MOVE, {"id":selectedItem.name}, (result, status) => {
|
|
|
|
|
|
|
|
if(status===200){
|
|
|
|
if(status===200){
|
|
|
|
//$scope.model.updateOracleParam();
|
|
|
|
//$scope.model.updateOracleParam();
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
throw "资源请求失败";
|
|
|
|
throw "资源请求失败";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});*/
|
|
|
|
});
|
|
|
|
migrationClick.close();
|
|
|
|
migrationClick.close();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
open: (selected) =>{
|
|
|
|
open: (selected) =>{
|
|
|
@ -213,7 +212,6 @@ module Developer {
|
|
|
|
|
|
|
|
|
|
|
|
function init($scope,$location,$routeParams){
|
|
|
|
function init($scope,$location,$routeParams){
|
|
|
|
$scope.model.updateModel();
|
|
|
|
$scope.model.updateModel();
|
|
|
|
|
|
|
|
|
|
|
|
if(ConfigsModel.cluster!=null)
|
|
|
|
if(ConfigsModel.cluster!=null)
|
|
|
|
$scope.volumes = ConfigsModel.cluster;
|
|
|
|
$scope.volumes = ConfigsModel.cluster;
|
|
|
|
//创建二级菜单
|
|
|
|
//创建二级菜单
|
|
|
|