Web: Client: Dialogs. WarningQuoataDialog. added tenant quota limit
This commit is contained in:
parent
32cb80dd66
commit
5a541a02d2
@ -258,10 +258,10 @@
|
|||||||
"Statistics": "Statistics",
|
"Statistics": "Statistics",
|
||||||
"StorageManagement": "Storage management",
|
"StorageManagement": "Storage management",
|
||||||
"StoragePeriod": "Storage period",
|
"StoragePeriod": "Storage period",
|
||||||
"StorageQuotaWarningDescription": "Storage quota is enabled for this {{productName}}: {{roomsQuotaLimit}} for rooms, {{usersQuotaLimit}} for users. Limitations can occur during data import.",
|
"StorageQuotaWarningDescription": "Storage quota is enabled for this {{productName}}: {{quotaLimits}}. Limitations can occur during data import.",
|
||||||
"RoomsQuotaWarningDescription": "Storage quota is enabled for this {{productName}}: {{roomsQuotaLimit}} for rooms. Limitations can occur during data import.",
|
"RoomsQuotaLimit": "{{roomsQuotaLimit}} for rooms",
|
||||||
"UsersQuotaWarningDescription": "Storage quota is enabled for this {{productName}}: {{usersQuotaLimit}} for users. Limitations can occur during data import.",
|
"UsersQuotaLimit": "{{usersQuotaLimit}} for users",
|
||||||
|
"TenantQuotaLimit": "{{tenantQuotaLimit}} for {{productName}}",
|
||||||
"StudioTimeLanguageSettings": "Language and Time Zone Settings",
|
"StudioTimeLanguageSettings": "Language and Time Zone Settings",
|
||||||
"Submit": "Submit",
|
"Submit": "Submit",
|
||||||
"SuccessfullySaveGreetingSettingsMessage": "Welcome Page settings have been successfully saved",
|
"SuccessfullySaveGreetingSettingsMessage": "Welcome Page settings have been successfully saved",
|
||||||
|
@ -41,30 +41,45 @@ export const WarningQuotaDialog = ({
|
|||||||
onCloseDialog,
|
onCloseDialog,
|
||||||
defaultRoomsQuota,
|
defaultRoomsQuota,
|
||||||
defaultUsersQuota,
|
defaultUsersQuota,
|
||||||
|
tenantCustomQuota,
|
||||||
isDefaultRoomsQuotaSet,
|
isDefaultRoomsQuotaSet,
|
||||||
isDefaultUsersQuotaSet,
|
isDefaultUsersQuotaSet,
|
||||||
|
isTenantCustomQuotaSet,
|
||||||
}: WarningQuotaDialogProps) => {
|
}: WarningQuotaDialogProps) => {
|
||||||
const getWarningDescription = () => {
|
const getWarningDescription = () => {
|
||||||
if (isDefaultRoomsQuotaSet && isDefaultUsersQuotaSet) {
|
const quotaLimits = [];
|
||||||
return t("Settings:StorageQuotaWarningDescription", {
|
|
||||||
usersQuotaLimit: getConvertedSize(t, defaultUsersQuota),
|
|
||||||
roomsQuotaLimit: getConvertedSize(t, defaultRoomsQuota),
|
|
||||||
productName: t("Common:ProductName"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (isDefaultRoomsQuotaSet) {
|
if (isDefaultRoomsQuotaSet) {
|
||||||
return t("Settings:RoomsQuotaWarningDescription", {
|
quotaLimits.push(
|
||||||
|
t("Settings:RoomsQuotaLimit", {
|
||||||
roomsQuotaLimit: getConvertedSize(t, defaultRoomsQuota),
|
roomsQuotaLimit: getConvertedSize(t, defaultRoomsQuota),
|
||||||
productName: t("Common:ProductName"),
|
}),
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
if (isDefaultUsersQuotaSet) {
|
if (isDefaultUsersQuotaSet) {
|
||||||
return t("Settings:UsersQuotaWarningDescription", {
|
quotaLimits.push(
|
||||||
|
t("Settings:UsersQuotaLimit", {
|
||||||
usersQuotaLimit: getConvertedSize(t, defaultUsersQuota),
|
usersQuotaLimit: getConvertedSize(t, defaultUsersQuota),
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (isTenantCustomQuotaSet) {
|
||||||
|
quotaLimits.push(
|
||||||
|
t("Settings:TenantQuotaLimit", {
|
||||||
|
tenantQuotaLimit: getConvertedSize(t, tenantCustomQuota),
|
||||||
|
productName: t("Common:ProductName"),
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quotaLimits.length === 0) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
return t("Settings:StorageQuotaWarningDescription", {
|
||||||
|
quotaLimits: quotaLimits.join(", "),
|
||||||
productName: t("Common:ProductName"),
|
productName: t("Common:ProductName"),
|
||||||
});
|
});
|
||||||
}
|
|
||||||
return "";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -33,6 +33,8 @@ export interface WarningQuotaDialogProps {
|
|||||||
onClickRedirect: () => void;
|
onClickRedirect: () => void;
|
||||||
defaultRoomsQuota: number;
|
defaultRoomsQuota: number;
|
||||||
defaultUsersQuota: number;
|
defaultUsersQuota: number;
|
||||||
|
tenantCustomQuota: number;
|
||||||
isDefaultRoomsQuotaSet?: boolean;
|
isDefaultRoomsQuotaSet?: boolean;
|
||||||
isDefaultUsersQuotaSet?: boolean;
|
isDefaultUsersQuotaSet?: boolean;
|
||||||
|
isTenantCustomQuotaSet?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,10 @@ const SelectFileStep = (props: SelectFileStepProps) => {
|
|||||||
uploadFiles,
|
uploadFiles,
|
||||||
defaultUsersQuota = 0,
|
defaultUsersQuota = 0,
|
||||||
defaultRoomsQuota = 0,
|
defaultRoomsQuota = 0,
|
||||||
|
tenantCustomQuota = 0,
|
||||||
isDefaultUsersQuotaSet,
|
isDefaultUsersQuotaSet,
|
||||||
isDefaultRoomsQuotaSet,
|
isDefaultRoomsQuotaSet,
|
||||||
|
isTenantCustomQuotaSet,
|
||||||
warningQuotaDialogVisible,
|
warningQuotaDialogVisible,
|
||||||
setWarningQuotaDialogVisible,
|
setWarningQuotaDialogVisible,
|
||||||
} = props as InjectedSelectFileStepProps;
|
} = props as InjectedSelectFileStepProps;
|
||||||
@ -184,10 +186,12 @@ const SelectFileStep = (props: SelectFileStepProps) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isQuotaWarningVisible =
|
const isQuotaWarningVisible =
|
||||||
isDefaultUsersQuotaSet || isDefaultRoomsQuotaSet;
|
isDefaultUsersQuotaSet ||
|
||||||
|
isDefaultRoomsQuotaSet ||
|
||||||
|
isTenantCustomQuotaSet;
|
||||||
setWarningQuotaDialogVisible(isQuotaWarningVisible);
|
setWarningQuotaDialogVisible(isQuotaWarningVisible);
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isDefaultUsersQuotaSet, isDefaultRoomsQuotaSet]);
|
}, [isDefaultUsersQuotaSet, isDefaultRoomsQuotaSet, isTenantCustomQuotaSet]);
|
||||||
|
|
||||||
const onClickRedirect = () => {
|
const onClickRedirect = () => {
|
||||||
navigate("/portal-settings/management/disk-space");
|
navigate("/portal-settings/management/disk-space");
|
||||||
@ -505,8 +509,10 @@ const SelectFileStep = (props: SelectFileStepProps) => {
|
|||||||
onClickRedirect={onClickRedirect}
|
onClickRedirect={onClickRedirect}
|
||||||
defaultRoomsQuota={defaultRoomsQuota}
|
defaultRoomsQuota={defaultRoomsQuota}
|
||||||
defaultUsersQuota={defaultUsersQuota}
|
defaultUsersQuota={defaultUsersQuota}
|
||||||
|
tenantCustomQuota={tenantCustomQuota}
|
||||||
isDefaultRoomsQuotaSet={isDefaultRoomsQuotaSet}
|
isDefaultRoomsQuotaSet={isDefaultRoomsQuotaSet}
|
||||||
isDefaultUsersQuotaSet={isDefaultUsersQuotaSet}
|
isDefaultUsersQuotaSet={isDefaultUsersQuotaSet}
|
||||||
|
isTenantCustomQuotaSet={isTenantCustomQuotaSet}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
@ -540,8 +546,10 @@ export default inject<TStore>(
|
|||||||
const {
|
const {
|
||||||
isDefaultRoomsQuotaSet,
|
isDefaultRoomsQuotaSet,
|
||||||
isDefaultUsersQuotaSet,
|
isDefaultUsersQuotaSet,
|
||||||
|
isTenantCustomQuotaSet,
|
||||||
defaultUsersQuota,
|
defaultUsersQuota,
|
||||||
defaultRoomsQuota,
|
defaultRoomsQuota,
|
||||||
|
tenantCustomQuota,
|
||||||
} = currentQuotaStore;
|
} = currentQuotaStore;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -562,8 +570,10 @@ export default inject<TStore>(
|
|||||||
uploadFiles,
|
uploadFiles,
|
||||||
defaultUsersQuota,
|
defaultUsersQuota,
|
||||||
defaultRoomsQuota,
|
defaultRoomsQuota,
|
||||||
|
tenantCustomQuota,
|
||||||
isDefaultRoomsQuotaSet,
|
isDefaultRoomsQuotaSet,
|
||||||
isDefaultUsersQuotaSet,
|
isDefaultUsersQuotaSet,
|
||||||
|
isTenantCustomQuotaSet,
|
||||||
warningQuotaDialogVisible,
|
warningQuotaDialogVisible,
|
||||||
setWarningQuotaDialogVisible,
|
setWarningQuotaDialogVisible,
|
||||||
};
|
};
|
||||||
|
@ -72,8 +72,10 @@ export interface InjectedSelectFileStepProps extends SelectFileStepProps {
|
|||||||
uploadFiles: TStore["importAccountsStore"]["uploadFiles"];
|
uploadFiles: TStore["importAccountsStore"]["uploadFiles"];
|
||||||
defaultUsersQuota: TStore["currentQuotaStore"]["defaultUsersQuota"];
|
defaultUsersQuota: TStore["currentQuotaStore"]["defaultUsersQuota"];
|
||||||
defaultRoomsQuota: TStore["currentQuotaStore"]["defaultRoomsQuota"];
|
defaultRoomsQuota: TStore["currentQuotaStore"]["defaultRoomsQuota"];
|
||||||
|
tenantCustomQuota: TStore["currentQuotaStore"]["tenantCustomQuota"];
|
||||||
isDefaultUsersQuotaSet: TStore["currentQuotaStore"]["isDefaultUsersQuotaSet"];
|
isDefaultUsersQuotaSet: TStore["currentQuotaStore"]["isDefaultUsersQuotaSet"];
|
||||||
isDefaultRoomsQuotaSet: TStore["currentQuotaStore"]["isDefaultRoomsQuotaSet"];
|
isDefaultRoomsQuotaSet: TStore["currentQuotaStore"]["isDefaultRoomsQuotaSet"];
|
||||||
|
isTenantCustomQuotaSet: TStore["currentQuotaStore"]["isTenantCustomQuotaSet"];
|
||||||
warningQuotaDialogVisible: TStore["dialogsStore"]["warningQuotaDialogVisible"];
|
warningQuotaDialogVisible: TStore["dialogsStore"]["warningQuotaDialogVisible"];
|
||||||
setWarningQuotaDialogVisible: TStore["dialogsStore"]["setWarningQuotaDialogVisible"];
|
setWarningQuotaDialogVisible: TStore["dialogsStore"]["setWarningQuotaDialogVisible"];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user