mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 11:38:55 +00:00
misc: addressed review comments
This commit is contained in:
+2
-3
@@ -26,7 +26,7 @@ export const ExternalCaSection = () => {
|
||||
|
||||
const onRemoveCaSubmit = async (caId: string, type: CaType) => {
|
||||
try {
|
||||
if (!currentWorkspace?.slug) return;
|
||||
if (!currentWorkspace?.id) return;
|
||||
|
||||
await deleteCa({ caId, type, projectId: currentWorkspace.id });
|
||||
|
||||
@@ -67,7 +67,7 @@ export const ExternalCaSection = () => {
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
createNotification({
|
||||
text: `Failed to ${status === CaStatus.ACTIVE ? "enabled" : "disabled"} CA`,
|
||||
text: `Failed to ${status === CaStatus.ACTIVE ? "enable" : "disable"} CA`,
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
@@ -84,7 +84,6 @@ export const ExternalCaSection = () => {
|
||||
{(isAllowed) => (
|
||||
<Button
|
||||
colorSchema="primary"
|
||||
type="submit"
|
||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||
onClick={() => handlePopUpOpen("ca")}
|
||||
isDisabled={!isAllowed}
|
||||
|
||||
+5
-4
@@ -66,7 +66,8 @@ export const PkiSubscriberDetailsSection = ({ subscriberName, handlePopUpOpen }:
|
||||
const { mutateAsync: issuePkiSubscriberCert, isPending: isIssuingCert } =
|
||||
useIssuePkiSubscriberCert();
|
||||
|
||||
const { mutateAsync: orderPkiSubscriberCert } = useOrderPkiSubscriberCert();
|
||||
const { mutateAsync: orderPkiSubscriberCert, isPending: isOrderingCert } =
|
||||
useOrderPkiSubscriberCert();
|
||||
|
||||
const onIssuePkiSubscriberCert = async () => {
|
||||
try {
|
||||
@@ -90,8 +91,8 @@ export const PkiSubscriberDetailsSection = ({ subscriberName, handlePopUpOpen }:
|
||||
await orderPkiSubscriberCert({ subscriberName, projectId });
|
||||
|
||||
createNotification({
|
||||
text: "Successfully ordered certificate. It will be issued after CA processing.",
|
||||
type: "success"
|
||||
text: "Successfully ordered certificate. It will be issued after CA processing which could take a few minutes.",
|
||||
type: "info"
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -198,7 +199,7 @@ export const PkiSubscriberDetailsSection = ({ subscriberName, handlePopUpOpen }:
|
||||
className="mt-2 w-full"
|
||||
colorSchema="primary"
|
||||
type="button"
|
||||
isLoading={isIssuingCert}
|
||||
isLoading={isIssuingCert || isOrderingCert}
|
||||
onClick={() => {
|
||||
onIssuePkiSubscriberCert();
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user