- {allocations.length !== 0 ? null :
-
- You do not have given out allocated any resources at this time.
- When you approve grant applications, the allocated resources will be shown here.
-
}
+ > : <>
+
+ {allocations.length !== 0 ? null :
+
+ You do not have given out allocated any resources at this time.
+ When you approve grant applications, the allocated resources will be shown here.
+
}
- {allocations.map(([rawType, tree]) => {
- const type = rawType as ProductType;
+ {allocations.map(([rawType, tree]) => {
+ const type = rawType as ProductType;
- return
-
- {Accounting.productAreaTitle(type)}
-
- }
- right={
- {tree.usageAndQuota.map((uq, idx) => {
- let label = `${okPercentage.toFixed(2)}% Ok` +
- ` | ${atRiskPercentage.toFixed(2)}% At risk` +
- ` | ${underusedPercentage.toFixed(2)}% Underused`;
- return
+ return
+
+ {Accounting.productAreaTitle(type)}
+
+ }
+ right={
+ {tree.usageAndQuota.map((uq, idx) => {
+ let label = `${okPercentage.toFixed(2)}% Ok` +
+ ` | ${atRiskPercentage.toFixed(2)}% At risk` +
+ ` | ${underusedPercentage.toFixed(2)}% Underused`;
+ return
;
}
- )}
- }
- indent={indent}
- >
- {tree.wallets.map((wallet, idx) =>
-
-
- {wallet.category.name}
-
- }
- right={
-
+ )}
}
+ indent={indent}
>
-
- )}
- ;
+ {tree.wallets.map((wallet, idx) =>
+
+
+ {wallet.category.name}
+
+ }
+ right={
+
+ }
+ >
+
+ )}
+ ;
})}
@@ -912,7 +912,7 @@ const FilteredUsageAndQuota: React.FunctionComponent<{
return <>
{filteredEntries.map((uq, idx) => {
if (idx > 2) return null;
- return
;
+ return
;
})}
>
}
@@ -1114,8 +1114,8 @@ const SubProjectListRow: React.FunctionComponent<{
}
right={
}
onActivate={open => {
if (open) setNodeState(TreeAction.OPEN, workspaceId, g.category.name);
@@ -1290,7 +1290,7 @@ export const SubProjectFilters: React.FunctionComponent<{
}, []);
useEffect(() => {
- dispatchEvent({ type: "SubProjectFilterSettingsLoad", settings: subProjectsDefaultSettings });
+ dispatchEvent({type: "SubProjectFilterSettingsLoad", settings: subProjectsDefaultSettings});
}, []);
const [ascending, setAscending] = useState
(true);
@@ -1346,7 +1346,7 @@ export const SubProjectFilters: React.FunctionComponent<{
state={state}
/> : null
))}
-
+
Sort by
@@ -1373,7 +1373,7 @@ export const SubProjectFilters: React.FunctionComponent<{
+ onClick={onSortingToggle} />
@@ -1381,7 +1381,7 @@ export const SubProjectFilters: React.FunctionComponent<{
+ zIndex={10000} gap={"8px"}>
diff --git a/frontend-web/webclient/app/Accounting/Allocations/ProviderOnlySections.tsx b/frontend-web/webclient/app/Accounting/Allocations/ProviderOnlySections.tsx
index 11727b3ff0..0e6b67c6d7 100644
--- a/frontend-web/webclient/app/Accounting/Allocations/ProviderOnlySections.tsx
+++ b/frontend-web/webclient/app/Accounting/Allocations/ProviderOnlySections.tsx
@@ -13,7 +13,7 @@ import {removePrefixFrom} from "@/Utilities/TextUtilities";
import {callAPI} from "@/Authentication/DataHook";
import * as Gifts from "@/Accounting/Gifts";
import {Client} from "@/Authentication/HttpClientInstance";
-import {sendFailureNotification, sendNotification, sendSuccessNotification, SnackType} from "@/Notifications";
+import {sendFailureNotification, sendSuccessNotification} from "@/Notifications";
const wayfIdpsPairs = WAYF.wayfIdps.map(it => ({value: it, content: it}));
@@ -169,7 +169,7 @@ export const GiftSection: React.FunctionComponent<{
gift.id = id;
dispatchEvent({type: "GiftCreated", gift});
sendSuccessNotification("Gift Created");
- } catch (e) {
+ } catch (e: any) {
sendFailureNotification("Failed to create a gift: " + extractErrorMessage(e));
} finally {
creatingGift.current = false;
@@ -183,7 +183,7 @@ export const GiftSection: React.FunctionComponent<{
try {
await callAPI(Gifts.remove({giftId: id}));
- } catch (e) {
+ } catch (e: any) {
sendFailureNotification("Failed to delete gift: " + extractErrorMessage(e));
return;
}
@@ -216,59 +216,59 @@ export const GiftSection: React.FunctionComponent<{
>
-
- | Description |
- {g.description} |
-
-
- | Criteria |
-
-
- {g.criteria.map(c => {
- switch (c.type) {
- case "anyone":
- return - All UCloud users
- case "wayf":
- return - Users
- from {c.org}
- case "email":
- return - @{c.domain}
- }
- })}
-
- |
-
-
- | Resources |
-
-
- {g.resources.map((r, idx) => {
- const pc = (state.remoteData.managedProducts ?? {})[r.provider]?.find(it => it.name === r.category);
- if (!pc) return null;
- return -
- {r.category} / {r.provider}: {Accounting.balanceToString(pc, r.balanceRequested)}
-
- })}
-
- |
-
-
- | Granted |
-
- {g.renewEvery == 0 ? "Once" : (g.renewEvery == 1 ? "Every month" : "Every " + g.renewEvery.toString() + " months")}
- |
-
-
- | Delete |
-
-
- |
-
+
+ | Description |
+ {g.description} |
+
+
+ | Criteria |
+
+
+ {g.criteria.map(c => {
+ switch (c.type) {
+ case "anyone":
+ return - All UCloud users
+ case "wayf":
+ return - Users
+ from {c.org}
+ case "email":
+ return - @{c.domain}
+ }
+ })}
+
+ |
+
+
+ | Resources |
+
+
+ {g.resources.map((r, idx) => {
+ const pc = (state.remoteData.managedProducts ?? {})[r.provider]?.find(it => it.name === r.category);
+ if (!pc) return null;
+ return -
+ {r.category} / {r.provider}: {Accounting.balanceToString(pc, r.balanceRequested)}
+
+ })}
+
+ |
+
+
+ | Granted |
+
+ {g.renewEvery == 0 ? "Once" : (g.renewEvery == 1 ? "Every month" : "Every " + g.renewEvery.toString() + " months")}
+ |
+
+
+ | Delete |
+
+
+ |
+
@@ -282,7 +282,7 @@ export const GiftSection: React.FunctionComponent<{
-
+
);
}
-function LinkBlock(props: {href?: string; children: React.ReactNode & React.ReactNode[]}) {
- return