mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 06:28:11 +00:00
improve UI & greptile review fixes
This commit is contained in:
+5
-5
@@ -125,25 +125,25 @@ export const GatewayCliDeploymentMethod = () => {
|
|||||||
accessTokenTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }]
|
accessTokenTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }]
|
||||||
});
|
});
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Automatically enabled token authentication for this identity.",
|
text: "Token authentication has been automatically enabled for the selected identity. By default, it is configured to allow all IP addresses with a default token TTL of 30 days. You can manage these settings in Access Control.",
|
||||||
type: "info"
|
type: "warning"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const token = await createToken({
|
const token = await createToken({
|
||||||
identityId: validatedIdentity.id,
|
identityId: validatedIdentity.id,
|
||||||
name: "gateway token (autogenerated)"
|
name: `gateway token for ${name} (autogenerated)`
|
||||||
});
|
});
|
||||||
setIdentityToken(token.accessToken);
|
setIdentityToken(token.accessToken);
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Automatically generated a token for this identity.",
|
text: "Automatically generated a token for the selected identity.",
|
||||||
type: "info"
|
type: "info"
|
||||||
});
|
});
|
||||||
setStep("command");
|
setStep("command");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Failed to generate token for identity",
|
text: "Failed to generate token for the selected identity",
|
||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
setIdentityToken("");
|
setIdentityToken("");
|
||||||
|
|||||||
+4
-6
@@ -27,21 +27,19 @@ export const GatewayDeploymentMethodSelect = ({ onSelect }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="grid h-118 grid-cols-4 content-start gap-2">
|
<div className="grid h-118 grid-cols-4 content-start gap-2">
|
||||||
{deploymentOptions.map((option) => {
|
{deploymentOptions.map((option) => {
|
||||||
const { image, name } = option;
|
const { image, name, method } = option;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
key={method}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleResourceSelect(option.method)}
|
onClick={() => handleResourceSelect(method)}
|
||||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||||
>
|
>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<img
|
<img
|
||||||
src={`/images/integrations/${image}`}
|
src={`/images/integrations/${image}`}
|
||||||
style={{
|
className="mt-auto w-12"
|
||||||
width: "50px"
|
|
||||||
}}
|
|
||||||
className="mt-auto"
|
|
||||||
alt={`${name} logo`}
|
alt={`${name} logo`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export const RelayTab = withPermission(
|
|||||||
replace: true
|
replace: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [action]);
|
}, [action, handlePopUpOpen, navigate]);
|
||||||
|
|
||||||
const deleteRelayById = useDeleteRelayById();
|
const deleteRelayById = useDeleteRelayById();
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -104,25 +104,25 @@ export const RelayCliDeploymentMethod = () => {
|
|||||||
accessTokenTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }]
|
accessTokenTrustedIps: [{ ipAddress: "0.0.0.0/0" }, { ipAddress: "::/0" }]
|
||||||
});
|
});
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Automatically enabled token authentication for this identity.",
|
text: "Token authentication has been automatically enabled for the selected identity. By default, it is configured to allow all IP addresses with a default token TTL of 30 days. You can manage these settings in Access Control.",
|
||||||
type: "info"
|
type: "warning"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const token = await createToken({
|
const token = await createToken({
|
||||||
identityId: validatedIdentity.id,
|
identityId: validatedIdentity.id,
|
||||||
name: "relay token (autogenerated)"
|
name: `relay token for ${name} (autogenerated)`
|
||||||
});
|
});
|
||||||
setIdentityToken(token.accessToken);
|
setIdentityToken(token.accessToken);
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Automatically generated a token for this identity.",
|
text: "Automatically generated a token for the selected identity.",
|
||||||
type: "info"
|
type: "info"
|
||||||
});
|
});
|
||||||
setStep("command");
|
setStep("command");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
createNotification({
|
createNotification({
|
||||||
text: "Failed to generate token for identity",
|
text: "Failed to generate token for the selected identity",
|
||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
setIdentityToken("");
|
setIdentityToken("");
|
||||||
|
|||||||
+4
-6
@@ -27,21 +27,19 @@ export const RelayDeploymentMethodSelect = ({ onSelect }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div className="grid h-118 grid-cols-4 content-start gap-2">
|
<div className="grid h-118 grid-cols-4 content-start gap-2">
|
||||||
{deploymentOptions.map((option) => {
|
{deploymentOptions.map((option) => {
|
||||||
const { image, name } = option;
|
const { image, name, method } = option;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
key={method}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleResourceSelect(option.method)}
|
onClick={() => handleResourceSelect(method)}
|
||||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||||
>
|
>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<img
|
<img
|
||||||
src={`/images/integrations/${image}`}
|
src={`/images/integrations/${image}`}
|
||||||
style={{
|
className="mt-auto w-12"
|
||||||
width: "50px"
|
|
||||||
}}
|
|
||||||
className="mt-auto"
|
|
||||||
alt={`${name} logo`}
|
alt={`${name} logo`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user