Skip to content

Commit

Permalink
fix by code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan7empest committed Jan 8, 2024
1 parent c7cd21e commit 339080d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/components/JobWizard/JobWizard.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ const generateParameters = parametersTableData => {
?.filter(parameter => !parameter.data.isHyper && parameter.data.isChecked)
.forEach(parameter => {
if (parameter.data.name === 'context' && !parameter.data.value) return false

parameters[parameter.data.name] = convertParameterValue(
parameter.data.value,
parameter.data.type
Expand Down
13 changes: 4 additions & 9 deletions src/utils/parseJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,8 @@ export const parseJob = (job, tab) => {
}
}
} else {
const filteredContextParameter = job.spec?.parameters
? Object.fromEntries(
Object.entries(job.spec.parameters).filter(([key, value]) =>
key !== 'context' ? key : value
)
)
: {}
let jobParameters = { ...job.spec?.parameters } || {}
if ('context' in jobParameters && !jobParameters.context) delete jobParameters.context

jobItem = {
artifacts: job.status.artifacts || [],
Expand All @@ -75,9 +70,9 @@ export const parseJob = (job, tab) => {
name: job.metadata.name,
outputPath: job.spec?.output_path,
owner: job.metadata.labels?.owner,
parameters: filteredContextParameter,
parameters: jobParameters,
parametersChips: [
...parseKeyValues(filteredContextParameter || {}),
...parseKeyValues(jobParameters),
...parseKeyValues(job.spec?.hyperparams || {})
],
project: job.metadata.project,
Expand Down

0 comments on commit 339080d

Please sign in to comment.