pr feedback

This commit is contained in:
Nancy Butler 2020-10-09 13:05:08 -07:00
parent 2ae4685e3b
commit 71585a503e
3 changed files with 6 additions and 5 deletions

View File

@ -1306,6 +1306,7 @@ validation:
flowOutput:
both: Requires "Output" or "Cluster Output" to be selected.
global: Requires "Cluster Output" to be selected.
invalidCron: Invalid cron schedule
k8s:
identifier:
emptyLabel: '"{key}" cannot have an empty key'

View File

@ -3,13 +3,13 @@ export function containerImages(spec, getters, errors) {
if (spec.jobTemplate) {
// cronjob pod template is nested slightly different than other types
const { jobTemplate: { spec: { template: { spec: { containers } } } } } = spec;
const { jobTemplate: { spec: { template: { spec: { containers = [] } } } } } = spec;
container = containers[0];
container = containers[0] || {};
} else {
const { template:{ spec:{ containers } } } = spec;
const { template:{ spec:{ containers = [] } } } = spec;
container = containers[0];
container = containers[0] || {};
}
if (!container.image) {

View File

@ -4,6 +4,6 @@ export function cronSchedule(schedule = '', getters, errors) {
try {
cronstrue.toString(schedule);
} catch (e) {
errors.push('Invalid cron schedule');
errors.push(getters['i18n/t']('validation.invalidCron'));
}
}