提交 9eb4004f 编写于 作者: A Ammar Alakkad

Refactor passing props to jobs/index.js

上级 715f5de4
......@@ -10,17 +10,29 @@ export default () => {
JobApp,
},
render(createElement) {
const {
deploymentHelpUrl,
runnerHelpUrl,
runnerSettingsUrl,
variablesSettingsUrl,
endpoint,
pagePath,
logState,
buildStatus,
projectPath,
} = element.dataset;
return createElement('job-app', {
props: {
deploymentHelpUrl: element.dataset.deploymentHelpUrl,
runnerHelpUrl: element.dataset.runnerHelpUrl,
runnerSettingsUrl: element.dataset.runnerSettingsUrl,
variablesSettingsUrl: element.dataset.variablesSettingsUrl,
endpoint: element.dataset.endpoint,
pagePath: element.dataset.buildOptionsPagePath,
logState: element.dataset.buildOptionsLogState,
buildStatus: element.dataset.buildOptionsBuildStatus,
projectPath: element.dataset.projectPath,
deploymentHelpUrl,
runnerHelpUrl,
runnerSettingsUrl,
variablesSettingsUrl,
endpoint,
pagePath,
logState,
buildStatus,
projectPath,
},
});
},
......
......@@ -12,4 +12,5 @@
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'),
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 } }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册