File tree Expand file tree Collapse file tree
packages/manager/modules/netapp/src/dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,7 +381,4 @@ export default class NetAppDashboardService {
381381 } ) ;
382382 }
383383
384- hasAvailableReplicationsServices ( ) {
385- return ! ! this . replicationsAvaibleServices . length ;
386- }
387384}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default {
2424 totalVolumesStorage : '<' ,
2525 goToCreateReplications : '<' ,
2626 replicationsAvaibleServices : '<' ,
27+ hasAvailableReplicationsServices : '<' ,
2728 isNetworkAvailable : '<' ,
2829 } ,
2930 template,
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ export default class {
22 /* @ngInject */
33 constructor ( NetAppDashboardService ) {
44 this . NetAppDashboardService = NetAppDashboardService ;
5- this . hasAvailableReplicationsServices =
6- NetAppDashboardService . hasAvailableReplicationsServices ;
75 this . selectedReplicationsCheckboxes = { } ;
86 this . AWAITING_REPLICATION_STATUS = 'awaiting_replication' ;
97 }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import controller from './controller';
44export default {
55 bindings : {
66 replicationsAvaibleServices : '<' ,
7+ hasAvailableReplicationsServices : '<' ,
78 goToOrder : '<' ,
89 goToVolumes : '<' ,
910 postReplications : '<' ,
Original file line number Diff line number Diff line change 11export default class NetappVolumesCreateReplicationsCtrl {
2- /* @ngInject */ constructor ( NetAppDashboardService , $translate ) {
3- this . hasAvailableReplicationsServices =
4- NetAppDashboardService . hasAvailableReplicationsServices ;
2+ /* @ngInject */
3+ constructor ( NetAppDashboardService , $translate ) {
54 this . optionsReplicationsAvaibleServices = [ ] ;
65 this . onPostLoad = false ;
76 this . replicationsSelectedVolumes =
@@ -61,7 +60,7 @@ export default class NetappVolumesCreateReplicationsCtrl {
6160 isPrimaryButtonDisabled ( ) {
6261 return (
6362 this . onPostLoad ||
64- ( this . hasAvailableReplicationsServices ( ) && ! this . destinationServiceId )
63+ ( this . hasAvailableReplicationsServices && ! this . destinationServiceId )
6564 ) ;
6665 }
6766}
Original file line number Diff line number Diff line change 22 data-loading ="$ctrl.onPostLoad "
33 data-on-dismiss ="$ctrl.goToVolumes() "
44 data-heading ="{{:: 'netapp_network_volumes_replications_title' | translate }} "
5- data-primary-label ="{{:: !$ctrl.isNetworkAvailable && $ctrl.hasAvailableReplicationsServices() ? 'netapp_network_volumes_replications_button_sync' : 'netapp_network_volumes_replications_button_buy' | translate }} "
5+ data-primary-label ="{{:: !$ctrl.isNetworkAvailable && $ctrl.hasAvailableReplicationsServices ? 'netapp_network_volumes_replications_button_sync' : 'netapp_network_volumes_replications_button_buy' | translate }} "
66 data-primary-action ="$ctrl.onPrimaryClick() "
77 data-secondary-label ="{{:: 'netapp_network_volumes_replications_button_cancel' | translate }} "
88 data-secondary-action ="$ctrl.goToVolumes() "
99 data-primary-disabled ="$ctrl.isPrimaryButtonDisabled() "
1010>
1111 < div
12- data-ng-if ="!$ctrl.replicationsSelectedVolumes.length && $ctrl.hasAvailableReplicationsServices() "
12+ data-ng-if ="!$ctrl.replicationsSelectedVolumes.length && $ctrl.hasAvailableReplicationsServices "
1313 >
1414 < strong
1515 data-translate ="netapp_network_volumes_no_selected_volume_replications_subtitle "
1818 data-translate ="netapp_network_volumes_no_selected_volume_replications_description "
1919 > </ p >
2020 </ div >
21- < div data-ng-if ="!$ctrl.hasAvailableReplicationsServices() ">
21+ < div data-ng-if ="!$ctrl.hasAvailableReplicationsServices ">
2222 < strong
2323 data-translate ="netapp_network_volumes_no_replications_subtitle "
2424 > </ strong >
2727 > </ p >
2828 </ div >
2929 < div
30- data-ng-if ="$ctrl.hasAvailableReplicationsServices() && $ctrl.replicationsSelectedVolumes.length "
30+ data-ng-if ="$ctrl.hasAvailableReplicationsServices && $ctrl.replicationsSelectedVolumes.length "
3131 >
3232 < p data-translate ="netapp_network_volumes_replications_description "> </ p >
3333 < p
Original file line number Diff line number Diff line change @@ -179,6 +179,8 @@ export default /* @ngInject */ ($stateProvider) => {
179179 )
180180 . then ( ( { data = [ ] } ) => data )
181181 . catch ( ( ) => [ ] ) ,
182+ hasAvailableReplicationsServices : /* @ngInject */ ( replicationsAvaibleServices ) =>
183+ ! ! replicationsAvaibleServices . length
182184 } ,
183185 atInternet : {
184186 ignore : true ,
Original file line number Diff line number Diff line change 2222 data-icon-left ="oui-icon oui-icon-arrow-transfer "
2323 class ="mr-2 "
2424 ng-if ="!$ctrl.isNetworkAvailable "
25- data-disabled ="$ctrl.hasAvailableReplicationsServices() && !$ctrl.NetAppDashboardService.replicationsSelectedVolumes.length "
25+ data-disabled ="$ctrl.hasAvailableReplicationsServices && !$ctrl.NetAppDashboardService.replicationsSelectedVolumes.length "
2626 >
2727 < span data-translate ="netapp_volumes_button_replications "> </ span >
2828 </ oui-button >
3838 data-ng-if ="!$ctrl.isNetworkAvailable "
3939 data-model ="$ctrl.selectedReplicationsCheckboxes[$row.id] "
4040 data-on-change ="$ctrl.handleCheckboxChange({volumeId: $row.id, checked: modelValue}) "
41- data-disabled ="$row.status === $ctrl.AWAITING_REPLICATION_STATUS || !$ctrl.hasAvailableReplicationsServices() "
41+ data-disabled ="$row.status === $ctrl.AWAITING_REPLICATION_STATUS "
4242 > </ oui-checkbox >
4343 </ oui-datagrid-column >
4444 < oui-datagrid-column
9999 < span data-translate ="netapp_volumes_edit_volume "> </ span >
100100 </ oui-action-menu-item >
101101 < oui-action-menu-item
102- data-ng-if ="$ctrl.hasAvailableReplicationsServices() && !$ctrl.isNetworkAvailable "
102+ data-ng-if ="!$ctrl.isNetworkAvailable "
103103 data-disabled ="$row.status === $ctrl.AWAITING_REPLICATION_STATUS "
104104 data-on-click ="$ctrl.goToSingleReplication($row.id) "
105105 >
You can’t perform that action at this time.
0 commit comments