-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): add private-database logs to customer module (#13574)
ref: MANAGER-15356 Signed-off-by: Romain Jamet <[email protected]> Co-authored-by: CDS Translator Agent <[email protected]>
- Loading branch information
1 parent
261eef1
commit 6095a9d
Showing
39 changed files
with
381 additions
and
132 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
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
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
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
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
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
27 changes: 27 additions & 0 deletions
27
packages/manager/apps/web/client/app/private-database/logs/data-streams/index.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,27 @@ | ||
import angular from 'angular'; | ||
import '@uirouter/angularjs'; | ||
import 'oclazyload'; | ||
|
||
const moduleName = 'ovhManagerPrivateDatabaseLogsDataStreamsLazyLoading'; | ||
|
||
angular.module(moduleName, ['oc.lazyLoad', 'ui.router']).config( | ||
/* @ngInject */ ($stateProvider) => { | ||
$stateProvider.state( | ||
'app.private-database.dashboard.logs.data-streams.**', | ||
{ | ||
url: '', | ||
lazyLoad: ($transition$) => { | ||
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad'); | ||
|
||
return import('./private-database-data-streams.module').then( | ||
(mod) => { | ||
return $ocLazyLoad.inject(mod.default || mod); | ||
}, | ||
); | ||
}, | ||
}, | ||
); | ||
}, | ||
); | ||
|
||
export default moduleName; |
13 changes: 13 additions & 0 deletions
13
.../client/app/private-database/logs/data-streams/private-database-data-streams.component.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,13 @@ | ||
import controller from './private-database-data-streams.controller'; | ||
import template from './private-database-data-streams.template.html'; | ||
|
||
export default { | ||
bindings: { | ||
projectId: '<', | ||
kind: '<', | ||
goBack: '<', | ||
trackClick: '<', | ||
}, | ||
controller, | ||
template, | ||
}; |
12 changes: 12 additions & 0 deletions
12
.../client/app/private-database/logs/data-streams/private-database-data-streams.constants.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,12 @@ | ||
export const PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS = { | ||
LISTING_PAGE: 'web::private-database::dashboard::logs::data-streams', | ||
ADD_DATA_STREAM: | ||
'web::private-database::dashboard::logs::data-streams::add-datastream', | ||
GO_BACK: | ||
'web::private-database::dashboard::logs::data-streams::back-previous-page', | ||
LDP_DETAIL: | ||
'web::private-database::dashboard::logs::data-streams::ldp-detail', | ||
SUBSCRIBE: 'web::private-database::dashboard::logs::data-streams::subscribe', | ||
UNSUBSCRIBE: | ||
'web::private-database::dashboard::logs::data-streams::unsubscribe', | ||
}; |
19 changes: 19 additions & 0 deletions
19
...client/app/private-database/logs/data-streams/private-database-data-streams.controller.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,19 @@ | ||
import { PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS } from './private-database-data-streams.constants'; | ||
|
||
export default class PrivateDatabasedataStreamsCtrl { | ||
/* @ngInject */ | ||
constructor($stateParams) { | ||
this.$stateParams = $stateParams; | ||
} | ||
|
||
$onInit() { | ||
this.productId = this.$stateParams.productId; | ||
this.PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS = PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS; | ||
this.logSubscriptionApiData = { | ||
url: `/hosting/privateDatabase/${this.productId}/log/subscription`, | ||
params: { | ||
kind: this.kind, | ||
}, | ||
}; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...web/client/app/private-database/logs/data-streams/private-database-data-streams.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,15 @@ | ||
import angular from 'angular'; | ||
import '@uirouter/angularjs'; | ||
import 'angular-translate'; | ||
|
||
import component from './private-database-data-streams.component'; | ||
import routing from './private-database-data-streams.routing'; | ||
|
||
const moduleName = 'ovhManagerPrivateDatabaseDataStreams'; | ||
angular | ||
.module(moduleName, ['pascalprecht.translate', 'ui.router']) | ||
.config(routing) | ||
.component('privateDatabaseDataStreams', component) | ||
.run(/* @ngTranslationsInject:json ../translations */); | ||
|
||
export default moduleName; |
29 changes: 29 additions & 0 deletions
29
...eb/client/app/private-database/logs/data-streams/private-database-data-streams.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,29 @@ | ||
import { PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS } from './private-database-data-streams.constants'; | ||
|
||
export default /* @ngInject */ ($stateProvider) => { | ||
$stateProvider.state('app.private-database.dashboard.logs.data-streams', { | ||
url: '', | ||
params: { | ||
kind: null, | ||
}, | ||
views: { | ||
'[email protected]': | ||
'privateDatabaseDataStreams', | ||
}, | ||
atInternet: { | ||
rename: PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS.LISTING_PAGE, | ||
}, | ||
resolve: { | ||
breadcrumb: () => null, | ||
kind: /* @ngInject */ ($transition$) => $transition$.params().kind, | ||
goBack: /* @ngInject */ ($state, kind, trackClick) => () => { | ||
trackClick(PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS.GO_BACK); | ||
$state.go( | ||
'app.private-database.dashboard.logs', | ||
{ kind }, | ||
{ reload: true }, | ||
); | ||
}, | ||
}, | ||
}); | ||
}; |
10 changes: 10 additions & 0 deletions
10
...client/app/private-database/logs/data-streams/private-database-data-streams.template.html
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,10 @@ | ||
<div data-ovh-alert></div> | ||
|
||
<log-to-customer-list | ||
data-log-subscription-api-data="$ctrl.logSubscriptionApiData" | ||
data-description="{{ 'private_database_data_streams_description_' + $ctrl.kind | translate }}" | ||
data-go-back="$ctrl.goBack" | ||
data-tracking-hits="$ctrl.PRIVATE_DATABASE_DATA_STREAMS_TRACKING_HITS" | ||
data-track-click="$ctrl.trackClick" | ||
> | ||
</log-to-customer-list> |
22 changes: 22 additions & 0 deletions
22
packages/manager/apps/web/client/app/private-database/logs/index.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,22 @@ | ||
import angular from 'angular'; | ||
import '@uirouter/angularjs'; | ||
import 'oclazyload'; | ||
|
||
const moduleName = 'ovhManagerPrivateDatabaseLogsLazyLoading'; | ||
|
||
angular.module(moduleName, ['ui.router', 'oc.lazyLoad']).config( | ||
/* @ngInject */ ($stateProvider) => { | ||
$stateProvider.state('app.private-database.dashboard.logs.**', { | ||
url: '/logs', | ||
lazyLoad: ($transition$) => { | ||
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad'); | ||
|
||
return import('./private-database-logs.module').then((mod) => | ||
$ocLazyLoad.inject(mod.default || mod), | ||
); | ||
}, | ||
}); | ||
}, | ||
); | ||
|
||
export default moduleName; |
10 changes: 0 additions & 10 deletions
10
packages/manager/apps/web/client/app/private-database/logs/logs.module.js
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
packages/manager/apps/web/client/app/private-database/logs/logs.routing.js
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...ages/manager/apps/web/client/app/private-database/logs/private-database-logs.component.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,14 @@ | ||
import template from './private-database-logs.template.html'; | ||
import controller from './private-database-logs.controller'; | ||
|
||
export default { | ||
bindings: { | ||
projectId: '<', | ||
goToListingPage: '<', | ||
logKindsList: '<', | ||
kind: '<', | ||
trackClick: '<', | ||
}, | ||
template, | ||
controller, | ||
}; |
50 changes: 50 additions & 0 deletions
50
...ages/manager/apps/web/client/app/private-database/logs/private-database-logs.constants.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,50 @@ | ||
export const PRIVATE_DATABASE_LOGS_SERVICE_GUIDE_LINK = { | ||
DEFAULT: | ||
'https://help.ovhcloud.com/csm/en-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062040', | ||
FR: | ||
'https://help.ovhcloud.com/csm/fr-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062007', | ||
DE: | ||
'https://help.ovhcloud.com/csm/de-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062033', | ||
ES: | ||
'https://help.ovhcloud.com/csm/es-es-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062037', | ||
WE: | ||
'https://help.ovhcloud.com/csm/en-ie-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062032', | ||
IE: | ||
'https://help.ovhcloud.com/csm/en-ie-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062032', | ||
IT: | ||
'https://help.ovhcloud.com/csm/it-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062041', | ||
PL: | ||
'https://help.ovhcloud.com/csm/pl-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062043', | ||
PT: | ||
'https://help.ovhcloud.com/csm/pt-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062035', | ||
GB: | ||
'https://help.ovhcloud.com/csm/en-gb-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062031', | ||
CA: | ||
'https://help.ovhcloud.com/csm/en-ca-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062034', | ||
QC: | ||
'https://help.ovhcloud.com/csm/fr-ca-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062008', | ||
WS: | ||
'https://help.ovhcloud.com/csm/es-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062042', | ||
AU: | ||
'https://help.ovhcloud.com/csm/en-au-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062036', | ||
SG: | ||
'https://help.ovhcloud.com/csm/en-sg-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062039', | ||
ASIA: | ||
'https://help.ovhcloud.com/csm/asia-web-cloud-db-retrieve-logs?id=kb_article_view&sysparm_article=KB0062038', | ||
}; | ||
|
||
export const PRIVATE_DATABASE_LOGS_KINDS_KEYS = { | ||
dbms: ['message'], | ||
}; | ||
|
||
export const PRIVATE_DATABASE_LOGS_TRACKING_HITS = { | ||
LOGS_PAGE: 'web::private-database::dashboard::logs', | ||
TRANSFER: 'web::private-database::dashboard::logs::subscribe', | ||
STOP_TRANSFER: 'web::private-database::dashboard::logs::unsubscribe', | ||
SUBSCRIBE_OTHER_ACCOUNT: | ||
'web::private-database::dashboard::logs::subscribe-other-datastream', | ||
CREATE_ACCOUNT: 'web::private-database::dashboard::logs::create-account', | ||
CREATE_DATA_STREAM: | ||
'web::private-database::dashboard::logs::create-data-stream', | ||
GRAYLOG_WATCH: 'web::private-database::dashboard::logs::graylog', | ||
}; |
Oops, something went wrong.