Sorting Resources Alphabetically by Default

This commit is contained in:
Pallavi Kumari
2025-10-18 14:43:54 +05:30
parent 240c5b005b
commit c17efde6bf
2 changed files with 20 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ export default async function ResourcesPage(props: ResourcesPageProps) {
await authCookieHeader()
);
resources = res.data.data.resources;
} catch (e) {}
} catch (e) { }
let siteResources: ListAllSiteResourcesByOrgResponse["siteResources"] = [];
try {
@@ -51,7 +51,7 @@ export default async function ResourcesPage(props: ResourcesPageProps) {
AxiosResponse<ListAllSiteResourcesByOrgResponse>
>(`/org/${params.orgId}/site-resources`, await authCookieHeader());
siteResources = res.data.data.siteResources;
} catch (e) {}
} catch (e) { }
let org = null;
try {
@@ -88,8 +88,8 @@ export default async function ResourcesPage(props: ResourcesPageProps) {
resource.passwordId !== null ||
resource.whitelist ||
resource.headerAuthId
? "protected"
: "not_protected",
? "protected"
: "not_protected",
enabled: resource.enabled,
domainId: resource.domainId || undefined,
ssl: resource.ssl
@@ -128,6 +128,10 @@ export default async function ResourcesPage(props: ResourcesPageProps) {
defaultView={
env.flags.enableClients ? defaultView : "proxy"
}
defaultSort={{
id: "name",
desc: false
}}
/>
</OrgProvider>
</>