@ -15,7 +15,7 @@ module Developer {
init ( $scope , $location , $routeParams ) ;
$scope . options = DataModel . paramOptions ;
$scope . pageSizeChoses = DataModel . paramOptions . pagerSizeOption ;
$scope . options . dataType = getDataType ( $location ) ;
$scope . options . dataType = getDataType ( $location ) ;
$scope . treeOptions = {
nodeChildren : "childNodes" ,
@ -79,15 +79,17 @@ module Developer {
]
} ;
$scope . $on ( "dataLabelFilterUpdate" , ( $event , text , key ) = > {
$scope . keyQuery += " " + text ;
} )
$scope . selectBatchItem = ( item ) = > {
$scope . navbarItems . forEach ( ( nav ) = > {
nav . class = "" ;
} ) ;
item . class = "active" ;
if ( item . label === "全部" )
$scope . model . updateParamOption ( "dataBatch" , null ) ;
else
$scope . model . updateParamOption ( "dataBatch" , item . alias ) ;
$scope . model . updateParamOption ( "keyQuery" , $scope . keyQuery ) ;
$scope . model . updateParamOption ( "dataBatch" , item . alias ) ;
}
$scope . isEmptyOrFirst = ( ) = > {
@ -129,18 +131,22 @@ module Developer {
$scope . model . updateParamOption ( "currentPageNum" , idx + 1 ) ;
}
$scope . $watch ( 'options' , ( newValue , oldValue ) = > {
if ( newValue && newValue !== oldValue ) {
$scope . $watch ( 'options' , ( newValue , oldValue ) = > {
if ( newValue ) {
if ( newValue . currentTableSize !== oldValue . currentTableSize )
$scope . options . priorTableSize = oldValue . currentTableSize ;
else
$scope . options . priorTableSize = newValue . currentTableSize ;
$scope . options . priorTableSize = newValue . currentTableSize ;
DataModel . updateModel ( ) ;
}
} , true ) ;
$scope . search = ( ) = > {
$scope . model . updateParamOption ( "keyQuery" , $scope . keyQuery ) ;
}
$scope . deletePrompt = ( selected ) = > {
if ( angular . isString ( selected ) ) {
selected = [ {
@ -154,8 +160,7 @@ module Developer {
var idColl = [ ] ;
if ( result ) {
angular . forEach ( selected , ( select ) = > {
idColl . push ( select . id ) ;
console . log ( select . id ) ;
idColl . push ( select . id ) ;
} ) ;
$http ( {
method : "POST" ,
@ -185,9 +190,7 @@ module Developer {
selectedItem : { "name" : "当前没有可以迁移的集群" } ,
dialog : new UI . Dialog ( ) ,
onOk : ( ) = > {
var migrationClick = $scope . migrationClick ;
console . log ( $scope . tableConfig . selectedItems ) ;
console . log ( $scope . selectNode ) ;
var migrationClick = $scope . migrationClick ;
Configs . oracleInfoOperate ( $http , "/java/console/api/volume" , Configs . OperateType . MOVE ,
{
"name" : migrationClick . selectedItem . name ,
@ -214,8 +217,8 @@ module Developer {
}
} ;
$scope . createOracleService = ( items ) = > {
angular . forEach ( items , ( item ) = > {
$scope . createOracleService = ( items ) = > {
angular . forEach ( items , ( item ) = > {
Kubernetes . createRC ( {
name : item._key ,
labels : {
@ -229,7 +232,8 @@ module Developer {
systemName : item.systemName
} ,
path : item.dataPath + "app/" ,
isTarget : "false"
isTarget : "false" ,
isExtract : item.extractStatus
} , ( rc ) = > {
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/connectOracle" , "create" , rc , 0 ) ;
} ) ;
@ -241,7 +245,9 @@ module Developer {
}
function init ( $scope , $location , $routeParams ) {
$scope . model . updateModel ( ) ;
//$scope.model.updateModel();
$scope . keyQuery = "" ;
$scope . model . updateParamOption ( "keyQuery" , $scope . keyQuery ) ;
if ( ConfigsModel . cluster != null )
$scope . volumes = ConfigsModel . cluster ;
@ -276,10 +282,10 @@ module Developer {
var subPath = path . split ( "/" ) ;
switch ( subPath [ subPath . length - 1 ] ) {
case "financial" :
result = "财政"
result = "财政" ;
break ;
case "social-security" :
result = "社保"
result = "社保" ;
break ;
default :
result = null ;