Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marie JONES <marie.jones@corp.ovh.com>
- Loading branch information
Showing
7 changed files
with
87 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,5 @@ | ||
angular | ||
.module('managerApp') | ||
.config(($stateProvider) => { | ||
$stateProvider.state('paas.cda', { | ||
url: '/cda', | ||
template: '<div data-ui-view="cdaDetails"></div>', | ||
translations: { | ||
format: 'json', | ||
value: ['.'], | ||
}, | ||
abstract: true, | ||
}); | ||
}) | ||
.run(($transitions, CdaService) => { | ||
$transitions.onSuccess({ to: 'paas.cda.**' }, (transition) => { | ||
CdaService.initDetails(transition.params().serviceName); | ||
}); | ||
angular.module('managerApp').run(($transitions, CdaService) => { | ||
$transitions.onSuccess({ to: 'paas.cda.**' }, (transition) => { | ||
CdaService.initDetails(transition.params().serviceName); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
packages/manager/apps/cloud/client/app/cda/cda/cda.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import angular from 'angular'; | ||
import 'angular-translate'; | ||
import '@ovh-ux/ui-kit'; | ||
import ngTranslateAsyncLoader from '@ovh-ux/ng-translate-async-loader'; | ||
import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; | ||
|
||
import routing from './cda.routing'; | ||
|
||
const moduleName = 'ovhManagerCephCluster'; | ||
|
||
angular | ||
.module(moduleName, [ | ||
ngTranslateAsyncLoader, | ||
'oui', | ||
'pascalprecht.translate', | ||
ListLayoutHelper.moduleName, | ||
]) | ||
.config(routing) | ||
.run(/* @ngTranslationsInject:json ./translations */); | ||
|
||
export default moduleName; |
25 changes: 25 additions & 0 deletions
25
packages/manager/apps/cloud/client/app/cda/cda/cda.routing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ListLayoutHelper } from '@ovh-ux/manager-ng-layout-helpers'; | ||
|
||
export default /* @ngInject */ ($stateProvider) => { | ||
$stateProvider.state('paas.cda.index', { | ||
url: `?${ListLayoutHelper.urlQueryParams}`, | ||
views: { | ||
cdaDetails: { | ||
component: 'managerListLayout', | ||
}, | ||
}, | ||
params: ListLayoutHelper.stateParams, | ||
resolve: { | ||
...ListLayoutHelper.stateResolves, | ||
apiPath: () => '/dedicated/ceph', | ||
dataModel: () => 'dedicated.ceph.clusterGet.response', | ||
defaultFilterColumn: () => 'serviceName', | ||
header: /* @ngInject */ ($translate) => $translate.instant('cda_title'), | ||
customizableColumns: () => true, | ||
getServiceNameLink: /* @ngInject */ ($state) => ({ serviceName }) => | ||
$state.href('paas.cda.cda-details', { | ||
serviceName, | ||
}), | ||
}, | ||
}); | ||
}; |
3 changes: 3 additions & 0 deletions
3
packages/manager/apps/cloud/client/app/cda/cda/translations/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"cda_title": "Ceph cluster" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/manager/apps/cloud/client/app/cda/details/cda-details.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import angular from 'angular'; | ||
import '@uirouter/angularjs'; | ||
import 'oclazyload'; | ||
|
||
const moduleName = 'ovhManagerCephClusterLazyLoading'; | ||
|
||
angular.module(moduleName, ['ui.router', 'oc.lazyLoad']).config( | ||
/* @ngInject */ ($stateProvider) => { | ||
$stateProvider | ||
.state('paas.cda', { | ||
url: '/cda', | ||
template: '<div data-ui-view="cdaDetails"></div>', | ||
translations: { | ||
format: 'json', | ||
value: ['.'], | ||
}, | ||
abstract: true, | ||
}) | ||
.state('paas.cda.index.**', { | ||
url: '', | ||
lazyLoad: ($transition$) => { | ||
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad'); | ||
|
||
return import('./cda/cda.module').then((mod) => | ||
$ocLazyLoad.inject(mod.default || mod), | ||
); | ||
}, | ||
}); | ||
}, | ||
); | ||
export default moduleName; |