diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/assets/javascripts/serverless/serverless_bundle.js | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/assets/javascripts/serverless/serverless_bundle.js')
-rw-r--r-- | app/assets/javascripts/serverless/serverless_bundle.js | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/app/assets/javascripts/serverless/serverless_bundle.js b/app/assets/javascripts/serverless/serverless_bundle.js index ed3b633d766..24a9b4ac521 100644 --- a/app/assets/javascripts/serverless/serverless_bundle.js +++ b/app/assets/javascripts/serverless/serverless_bundle.js @@ -6,6 +6,9 @@ import { createStore } from './store'; export default class Serverless { constructor() { if (document.querySelector('.js-serverless-function-details-page') != null) { + const entryPointData = document.querySelector('.js-serverless-function-details-page').dataset; + const store = createStore(entryPointData); + const { serviceName, serviceDescription, @@ -15,9 +18,7 @@ export default class Serverless { servicePodcount, serviceMetricsUrl, prometheus, - clustersPath, - helpPath, - } = document.querySelector('.js-serverless-function-details-page').dataset; + } = entryPointData; const el = document.querySelector('#js-serverless-function-details'); const service = { @@ -32,35 +33,26 @@ export default class Serverless { this.functionDetails = new Vue({ el, - store: createStore(), + store, render(createElement) { return createElement(FunctionDetails, { props: { func: service, hasPrometheus: prometheus !== undefined, - clustersPath, - helpPath, }, }); }, }); } else { - const { statusPath, clustersPath, helpPath } = document.querySelector( - '.js-serverless-functions-page', - ).dataset; + const entryPointData = document.querySelector('.js-serverless-functions-page').dataset; + const store = createStore(entryPointData); const el = document.querySelector('#js-serverless-functions'); this.functions = new Vue({ el, - store: createStore(), + store, render(createElement) { - return createElement(Functions, { - props: { - clustersPath, - helpPath, - statusPath, - }, - }); + return createElement(Functions); }, }); } |