@ -72,7 +72,7 @@ module Kubernetes {
Kubernetes . initShared ( $scope , $location , $http , $timeout , $routeParams , KubernetesModel , KubernetesState , KubernetesApiURL ) ;
$scope . deletePrompt = ( selected ) = > {
$scope . deletePrompt = ( selected ) = > {
if ( angular . isString ( selected ) ) {
selected = [ {
id : selected
@ -89,8 +89,8 @@ module Kubernetes {
KubernetesReplicationControllers . delete ( {
id : getName ( next )
} , undefined , ( ) = > {
if ( next . metadata . labels . style === "oracle" ) {
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/cancelOracleConection" , "delete" , getName( next) , 0 ) ;
if ( next . metadata . labels . style === "oracle" ) {
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/cancelOracleConection" , "delete" , next, 0 ) ;
}
deleteSelected ( selected , selected . shift ( ) ) ;
} , ( error ) = > {
@ -100,7 +100,7 @@ module Kubernetes {
} ) ;
}
}
deleteSelected ( selected , selected . shift ( ) ) ;
deleteSelected ( selected , selected . shift ( ) ) ;
}
} ,
title : '是否需要删除oracle服务? ' ,
@ -127,7 +127,7 @@ module Kubernetes {
} ) ;
}
$scope . stopPrompt = ( selected ) = > {
$scope . stopPrompt = ( selected ) = > {
if ( angular . isString ( selected ) ) {
selected = [ {
id : selected
@ -142,14 +142,14 @@ module Kubernetes {
function stopSelected ( selected :Array < KubePod > , next :KubePod ) {
if ( next ) {
Kubernetes . resizeController ( $http , KubernetesApiURL , next , 0 , ( ) = > {
if ( next . metadata . labels . style === "oracle" ) {
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/cancelOracleConection" , "stop" , getName( next) , 0 ) ;
if ( next . metadata . labels . style === "oracle" ) {
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/cancelOracleConection" , "stop" , next, 0 ) ;
}
stopSelected ( selected , selected . shift ( ) ) ;
} ) ;
}
}
stopSelected ( selected , selected . shift ( ) ) ;
stopSelected ( selected , selected . shift ( ) ) ;
}
} ,
title : '是否需要停止oracle服务? ' ,
@ -163,18 +163,18 @@ module Kubernetes {
} ) . open ( ) ;
} ;
$scope . reStartPrompt = ( selected ) = > {
$scope . reStartPrompt = ( selected ) = > {
function startSelected ( selected :Array < KubePod > , next :KubePod ) {
if ( next ) {
if ( next . $replicas === 0 )
Kubernetes . resizeController ( $http , KubernetesApiURL , next , 1 , ( ) = > {
console . log ( "restart " + next . metadata . name ) ;
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/connectOracle" , "reStart" , getName ( next ) , 0 ) ;
startSelected ( selected , selected . shift ( ) ) ;
Kubernetes . connectOracle ( $http , $timeout , "/java/console/api/connectOracle" , "reStart" , next , 200 ) ;
startSelected ( selected , selected . shift ( ) ) ;
} ) ;
}
}
startSelected ( selected , selected . shift ( ) ) ;
} ;
$scope . extractClick = {