Commit 9eb4004f authored by Ammar Alakkad's avatar Ammar Alakkad

Refactor passing props to jobs/index.js

parent 715f5de4
...@@ -10,17 +10,29 @@ export default () => { ...@@ -10,17 +10,29 @@ export default () => {
JobApp, JobApp,
}, },
render(createElement) { render(createElement) {
const {
deploymentHelpUrl,
runnerHelpUrl,
runnerSettingsUrl,
variablesSettingsUrl,
endpoint,
pagePath,
logState,
buildStatus,
projectPath,
} = element.dataset;
return createElement('job-app', { return createElement('job-app', {
props: { props: {
deploymentHelpUrl: element.dataset.deploymentHelpUrl, deploymentHelpUrl,
runnerHelpUrl: element.dataset.runnerHelpUrl, runnerHelpUrl,
runnerSettingsUrl: element.dataset.runnerSettingsUrl, runnerSettingsUrl,
variablesSettingsUrl: element.dataset.variablesSettingsUrl, variablesSettingsUrl,
endpoint: element.dataset.endpoint, endpoint,
pagePath: element.dataset.buildOptionsPagePath, pagePath,
logState: element.dataset.buildOptionsLogState, logState,
buildStatus: element.dataset.buildOptionsBuildStatus, buildStatus,
projectPath: element.dataset.projectPath, projectPath,
}, },
}); });
}, },
......
...@@ -12,4 +12,5 @@ ...@@ -12,4 +12,5 @@
runner_help_url: help_page_path('ci/runners/README.html', anchor: 'setting-maximum-job-timeout-for-a-runner'), runner_help_url: help_page_path('ci/runners/README.html', anchor: 'setting-maximum-job-timeout-for-a-runner'),
runner_settings_url: project_runners_path(@build.project, anchor: 'js-runners-settings'), runner_settings_url: project_runners_path(@build.project, anchor: 'js-runners-settings'),
variables_settings_url: project_variables_path(@build.project, anchor: 'js-cicd-variables-settings'), variables_settings_url: project_variables_path(@build.project, anchor: 'js-cicd-variables-settings'),
page_path: project_job_path(@project, @build), build_status: @build.status, build_stage: @build.stage, log_state: '',
build_options: javascript_build_options } } build_options: javascript_build_options } }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment