mirror of https://github.com/portainer/portainer
refactor(edge/update): choose images from registry [BE-10964] (#6)
Co-authored-by: oscarzhou <oscar.zhou@portainer.io>release/2.25.0
parent
c59872553a
commit
333dfe1ebf
|
@ -76,6 +76,10 @@ function CreateView() {
|
||||||
Edge Groups
|
Edge Groups
|
||||||
</Link>{' '}
|
</Link>{' '}
|
||||||
page to assign environments and create groups.
|
page to assign environments and create groups.
|
||||||
|
<br />
|
||||||
|
You can upgrade from any agent version to 2.17 or later only.
|
||||||
|
You can not upgrade to an agent version prior to 2.17 . The
|
||||||
|
ability to rollback to originating version is for 2.15.0+ only.
|
||||||
</TextTip>
|
</TextTip>
|
||||||
|
|
||||||
<Formik
|
<Formik
|
||||||
|
@ -96,13 +100,6 @@ function CreateView() {
|
||||||
error={errors.groupIds}
|
error={errors.groupIds}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextTip color="blue">
|
|
||||||
You can upgrade from any agent version to 2.17 or later
|
|
||||||
only. You can not upgrade to an agent version prior to
|
|
||||||
2.17 . The ability to rollback to originating version is
|
|
||||||
for 2.15.0+ only.
|
|
||||||
</TextTip>
|
|
||||||
|
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<ScheduleTypeSelector />
|
<ScheduleTypeSelector />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -91,7 +91,7 @@ function ItemView() {
|
||||||
<Widget>
|
<Widget>
|
||||||
<Widget.Title title="Update & Rollback Scheduler" icon={Settings} />
|
<Widget.Title title="Update & Rollback Scheduler" icon={Settings} />
|
||||||
<Widget.Body>
|
<Widget.Body>
|
||||||
<TextTip color="blue">
|
<TextTip color="blue" className="mb-2">
|
||||||
Devices need to be allocated to an Edge group, visit the{' '}
|
Devices need to be allocated to an Edge group, visit the{' '}
|
||||||
<Link
|
<Link
|
||||||
to="edge.groups"
|
to="edge.groups"
|
||||||
|
@ -100,6 +100,10 @@ function ItemView() {
|
||||||
Edge Groups
|
Edge Groups
|
||||||
</Link>{' '}
|
</Link>{' '}
|
||||||
page to assign environments and create groups.
|
page to assign environments and create groups.
|
||||||
|
<br />
|
||||||
|
You can upgrade from any agent version to 2.17 or later only.
|
||||||
|
You can not upgrade to an agent version prior to 2.17 . The
|
||||||
|
ability to rollback to originating version is for 2.15.0+ only.
|
||||||
</TextTip>
|
</TextTip>
|
||||||
|
|
||||||
<Formik
|
<Formik
|
||||||
|
|
|
@ -44,5 +44,19 @@ export function validation(
|
||||||
otherwise: (schema) => schema.required('No rollback options available'),
|
otherwise: (schema) => schema.required('No rollback options available'),
|
||||||
}),
|
}),
|
||||||
registryId: number().default(0),
|
registryId: number().default(0),
|
||||||
|
agentImage: string()
|
||||||
|
.default('')
|
||||||
|
.when('registryId', {
|
||||||
|
is: 0,
|
||||||
|
then: (schema) => schema.optional(),
|
||||||
|
otherwise: (schema) => schema.required('Agent image is required'),
|
||||||
|
}),
|
||||||
|
updaterImage: string()
|
||||||
|
.default('')
|
||||||
|
.when('registryId', {
|
||||||
|
is: 0,
|
||||||
|
then: (schema) => schema.optional(),
|
||||||
|
otherwise: (schema) => schema.required('Updater image is required'),
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,6 @@ export function useGenericRegistriesQuery<T = Registry[]>(
|
||||||
export async function getRegistries() {
|
export async function getRegistries() {
|
||||||
try {
|
try {
|
||||||
const { data } = await axios.get<Registry[]>('/registries');
|
const { data } = await axios.get<Registry[]>('/registries');
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw parseAxiosError(e as Error, 'Unable to retrieve registries');
|
throw parseAxiosError(e as Error, 'Unable to retrieve registries');
|
||||||
|
|
Loading…
Reference in New Issue