File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed
quick-start/src/main/webapp/WEB-INF/static Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 44 < img id ="img_logo " src ="images/logo.png ">
55 </ div >
66 < div id ="sitemenu " class ="col-xs-6 col-sm-6 col-md-6 dropdown " ng-if ="status != null ">
7- < button type ="submit " name ="installUserModules " class ="btn btn-primary " ng-if ="status.installed " ng-click ="installUserModules() "> Deploy to server</ button >
8- < button type ="submit " name ="uninstall " class ="btn btn-primary " ng-if ="status.installed " ng-click ="uninstall() "> Uninstall</ button >
7+ < button type ="submit " name ="installUserModules " class ="btn btn-primary " ng-if ="status.installed " ng-click ="installUserModules() " ng-disabled =" action.type != null " > Deploy to server</ button >
8+ < button type ="submit " name ="uninstall " class ="btn btn-primary " ng-if ="status.installed " ng-click ="uninstall() " ng-disabled =" action.type != null " > Uninstall</ button >
99 < button class ="btn btn-default dropdown-toggle " type ="button " id ="headerDropdownMenu " data-toggle ="dropdown " aria-expanded ="true ">
1010 Welcome {{status.mlUsername}}! < span class ="caret "> </ span >
1111 </ button >
1414 </ ul >
1515 </ div >
1616 </ div >
17- < div id ="message " class ="alert alert-info " ng-if ="status != null && action.type !== 'Uninstall ' ">
18- < a href ="dismiss " class ="close " data-dismiss ="alert " aria-label ="close "> ×</ a >
17+ < div id ="message " class ="alert alert-info " ng-if ="status != null && action.type === 'Install ' ">
18+ < a href ="dismiss " class ="close " data-dismiss ="alert " aria-label ="close "> ×</ a >
1919 < ul >
2020 < li ng-if ="status.serverVersionAccepted "> ML version is acceptable.</ li >
2121 < li ng-if ="!status.serverVersionAccepted "> ML version is unacceptable.</ li >
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ module.directive('header', [
1717 }
1818 , link : function ( scope , element , attrs ) {
1919 scope . logout = function ( ) {
20+ if ( scope . action . type != null ) {
21+ return ;
22+ }
2023 scope . loading = true ;
2124 DataHub . logout ( )
2225 . finally ( function ( ) {
@@ -28,10 +31,12 @@ module.directive('header', [
2831 DataHub . preUninstall ( ) ;
2932 } ,
3033 scope . installUserModules = function ( ) {
31- scope . loading = true ;
34+ scope . action . type = 'Deploy to Server' ;
35+ scope . action . progressType = 'success' ;
36+ scope . action . message = 'Deploy to Server is in progress' ;
3237 DataHub . installUserModules ( )
3338 . finally ( function ( ) {
34- scope . loading = false ;
39+ scope . action . type = null ;
3540 } ) ;
3641 }
3742 }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module.factory('DataHub', [
2222 service . status = data ;
2323 if ( ! service . status . installed ) {
2424 service . action . type = "Install" ;
25- service . action . message = "Install in progress..." ;
25+ service . action . message = "Install is in progress..." ;
2626 service . action . progressType = "success" ;
2727 }
2828 } )
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ <h4 class="no_margin_top"><strong>Login</strong></h4>
4545
4646 < div class ="row center-block text-center ">
4747 < div class ="col-md-12 ">
48- < button class ="btn btn-primary width_100 " ng-click ="login "> Login</ button >
48+ < button class ="btn btn-primary width_100 " ng-click ="login " ng-disabled =" loading " > Login</ button >
4949 </ div >
5050 </ div >
5151 </ div >
You can’t perform that action at this time.
0 commit comments