mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 21:27:31 +00:00
misc: finalized labels
This commit is contained in:
@@ -39,7 +39,6 @@ export const triggerSecretApprovalSlackNotif = async ({
|
|||||||
environment,
|
environment,
|
||||||
secretPath
|
secretPath
|
||||||
}: TTriggerSecretApprovalSlackNotif) => {
|
}: TTriggerSecretApprovalSlackNotif) => {
|
||||||
// construct message here
|
|
||||||
const appCfg = getConfig();
|
const appCfg = getConfig();
|
||||||
const project = await projectDAL.findProjectWithOrg(projectId);
|
const project = await projectDAL.findProjectWithOrg(projectId);
|
||||||
const user = await userDAL.findById(secretApprovalRequest.committerUserId);
|
const user = await userDAL.findById(secretApprovalRequest.committerUserId);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export enum WorkflowIntegrationPlatform {
|
export enum WorkflowIntegrationPlatform {
|
||||||
SLACK = "slack"
|
SLACK = "Slack"
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SlackIntegration = {
|
export type SlackIntegration = {
|
||||||
|
|||||||
+1
-5
@@ -38,11 +38,7 @@ export const AddWorkflowIntegrationForm = ({ isOpen, onToggle }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onOpenChange={(state) => handleFormReset(state)}>
|
<Modal isOpen={isOpen} onOpenChange={(state) => handleFormReset(state)}>
|
||||||
<ModalContent
|
<ModalContent title={`Add a ${selectedPlatform ?? "workflow"} integration`} className="my-4">
|
||||||
title="Add a workflow integration"
|
|
||||||
subTitle="Configure a workflow integration"
|
|
||||||
className="my-4"
|
|
||||||
>
|
|
||||||
<AnimatePresence exitBeforeEnter>
|
<AnimatePresence exitBeforeEnter>
|
||||||
{wizardStep === WizardSteps.SelectPlatform && (
|
{wizardStep === WizardSteps.SelectPlatform && (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ type Props = {
|
|||||||
export const IntegrationFormDetails = ({ isOpen, id, onOpenChange, workflowPlatform }: Props) => {
|
export const IntegrationFormDetails = ({ isOpen, id, onOpenChange, workflowPlatform }: Props) => {
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
|
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
|
||||||
<ModalContent title="Workflow integration details">
|
<ModalContent title={`${WorkflowIntegrationPlatform.SLACK} integration`}>
|
||||||
{workflowPlatform === WorkflowIntegrationPlatform.SLACK && (
|
{workflowPlatform === WorkflowIntegrationPlatform.SLACK && (
|
||||||
<SlackIntegrationForm id={id} onClose={() => onOpenChange(false)} />
|
<SlackIntegrationForm id={id} onClose={() => onOpenChange(false)} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
+3
-3
@@ -89,7 +89,7 @@ export const SlackIntegrationForm = ({ id, onClose }: Props) => {
|
|||||||
control={control}
|
control={control}
|
||||||
name="slug"
|
name="slug"
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl label="Alias" errorText={error?.message} isError={Boolean(error)}>
|
<FormControl label="Alias" isRequired errorText={error?.message} isError={Boolean(error)}>
|
||||||
<Input placeholder="" {...field} />
|
<Input placeholder="" {...field} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
@@ -104,13 +104,13 @@ export const SlackIntegrationForm = ({ id, onClose }: Props) => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{slackIntegration && (
|
{slackIntegration && (
|
||||||
<FormControl label="Slack workspace">
|
<FormControl label="Connected Slack workspace">
|
||||||
<Input value={slackIntegration?.teamName} isReadOnly className="bg-white/[0.07]" />
|
<Input value={slackIntegration?.teamName} isReadOnly className="bg-white/[0.07]" />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
)}
|
)}
|
||||||
<div className="mt-6 flex items-center space-x-4">
|
<div className="mt-6 flex items-center space-x-4">
|
||||||
<Button type="submit" isLoading={isSubmitting || isConnectLoading} isDisabled={!isDirty}>
|
<Button type="submit" isLoading={isSubmitting || isConnectLoading} isDisabled={!isDirty}>
|
||||||
{slackIntegration ? "Save" : "Connect"}
|
{slackIntegration ? "Save" : "Connect Slack"}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline_bg" onClick={onClose}>
|
<Button variant="outline_bg" onClick={onClose}>
|
||||||
Cancel
|
Cancel
|
||||||
|
|||||||
Reference in New Issue
Block a user