mirror of https://github.com/rancher/dashboard.git
pr feedback
This commit is contained in:
parent
2ae4685e3b
commit
71585a503e
|
|
@ -1306,6 +1306,7 @@ validation:
|
||||||
flowOutput:
|
flowOutput:
|
||||||
both: Requires "Output" or "Cluster Output" to be selected.
|
both: Requires "Output" or "Cluster Output" to be selected.
|
||||||
global: Requires "Cluster Output" to be selected.
|
global: Requires "Cluster Output" to be selected.
|
||||||
|
invalidCron: Invalid cron schedule
|
||||||
k8s:
|
k8s:
|
||||||
identifier:
|
identifier:
|
||||||
emptyLabel: '"{key}" cannot have an empty key'
|
emptyLabel: '"{key}" cannot have an empty key'
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ export function containerImages(spec, getters, errors) {
|
||||||
|
|
||||||
if (spec.jobTemplate) {
|
if (spec.jobTemplate) {
|
||||||
// cronjob pod template is nested slightly different than other types
|
// 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 {
|
} else {
|
||||||
const { template:{ spec:{ containers } } } = spec;
|
const { template:{ spec:{ containers = [] } } } = spec;
|
||||||
|
|
||||||
container = containers[0];
|
container = containers[0] || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!container.image) {
|
if (!container.image) {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@ export function cronSchedule(schedule = '', getters, errors) {
|
||||||
try {
|
try {
|
||||||
cronstrue.toString(schedule);
|
cronstrue.toString(schedule);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
errors.push('Invalid cron schedule');
|
errors.push(getters['i18n/t']('validation.invalidCron'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue