mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
fix(edge-stacks): various custom template issues [BE-11414] (#189)
This commit is contained in:
parent
16a1825990
commit
97e7a3c5e2
24 changed files with 749 additions and 374 deletions
|
@ -1,6 +1,6 @@
|
|||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import { withError } from '@/react-tools/react-query';
|
||||
import { withGlobalError } from '@/react-tools/react-query';
|
||||
import { RegistryId } from '@/react/portainer/registries/types/registry';
|
||||
import axios, {
|
||||
json2formData,
|
||||
|
@ -11,7 +11,7 @@ import { buildUrl } from './buildUrl';
|
|||
|
||||
export function useParseRegistries() {
|
||||
return useMutation(parseRegistries, {
|
||||
...withError('Failed parsing registries'),
|
||||
...withGlobalError('Failed parsing registries'),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ export async function parseRegistries({
|
|||
fileContent?: string;
|
||||
}) {
|
||||
if (!file && !fileContent) {
|
||||
throw new Error('File or fileContent must be provided');
|
||||
return [];
|
||||
}
|
||||
|
||||
let currentFile = file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue