mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-24 23:23:15 +01:00
- Added upstream objects
- Renamed host templates to nginx templates - Generate upstream templates - Better nginx error reporting when reloading - Use tparse for golang test reporting
This commit is contained in:
1 parent
b3ae2f4dbb
commit
5e5f0de0e2
82 files changed
+2209
-294
No files matched your search
@@ -6,7 +6,7 @@ export * from "./useDNSProviders";
|
||||
export * from "./useDNSProvidersAcmesh";
|
||||
export * from "./useHealth";
|
||||
export * from "./useHosts";
|
||||
export * from "./useHostTemplates";
|
||||
export * from "./useNginxTemplates";
|
||||
export * from "./useSettings";
|
||||
export * from "./useUser";
|
||||
export * from "./useUsers";
|
||||
@@ -1,18 +1,18 @@
|
||||
import {
|
||||
getHostTemplates,
|
||||
HostTemplatesResponse,
|
||||
getNginxTemplates,
|
||||
NginxTemplatesResponse,
|
||||
tableSortToAPI,
|
||||
tableFiltersToAPI,
|
||||
} from "api/npm";
|
||||
import { useQuery } from "react-query";
|
||||
|
||||
const fetchHostTemplates = (
|
||||
const fetchNginxTemplates = (
|
||||
offset = 0,
|
||||
limit = 10,
|
||||
sortBy?: any,
|
||||
filters?: any,
|
||||
) => {
|
||||
return getHostTemplates(
|
||||
return getNginxTemplates(
|
||||
offset,
|
||||
limit,
|
||||
tableSortToAPI(sortBy),
|
||||
@@ -20,16 +20,16 @@ const fetchHostTemplates = (
|
||||
);
|
||||
};
|
||||
|
||||
const useHostTemplates = (
|
||||
const useNginxTemplates = (
|
||||
offset = 0,
|
||||
limit = 10,
|
||||
sortBy?: any,
|
||||
filters?: any,
|
||||
options = {},
|
||||
) => {
|
||||
return useQuery<HostTemplatesResponse, Error>(
|
||||
["hosts", { offset, limit, sortBy, filters }],
|
||||
() => fetchHostTemplates(offset, limit, sortBy, filters),
|
||||
return useQuery<NginxTemplatesResponse, Error>(
|
||||
["nginx-templates", { offset, limit, sortBy, filters }],
|
||||
() => fetchNginxTemplates(offset, limit, sortBy, filters),
|
||||
{
|
||||
keepPreviousData: true,
|
||||
staleTime: 15 * 1000, // 15 seconds
|
||||
@@ -38,4 +38,4 @@ const useHostTemplates = (
|
||||
);
|
||||
};
|
||||
|
||||
export { fetchHostTemplates, useHostTemplates };
|
||||
export { fetchNginxTemplates, useNginxTemplates };
|
||||
Reference in new issue
Block a user