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