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