-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connector deletion failure message (#2392)
- Loading branch information
Showing
9 changed files
with
110 additions
and
8 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
backend/alembic/versions/0ebb1d516877_add_ccpair_deletion_failure_message.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""add ccpair deletion failure message | ||
Revision ID: 0ebb1d516877 | ||
Revises: 52a219fb5233 | ||
Create Date: 2024-09-10 15:03:48.233926 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "0ebb1d516877" | ||
down_revision = "52a219fb5233" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.add_column( | ||
"connector_credential_pair", | ||
sa.Column("deletion_failure_message", sa.String(), nullable=True), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.drop_column("connector_credential_pair", "deletion_failure_message") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
web/src/app/admin/connector/[ccPairId]/DeletionErrorStatus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { FiInfo } from "react-icons/fi"; | ||
|
||
export default function DeletionErrorStatus({ | ||
deletion_failure_message, | ||
}: { | ||
deletion_failure_message: string; | ||
}) { | ||
return ( | ||
<div className="mt-2 rounded-md border border-error-300 bg-error-50 p-4 text-error-600 max-w-3xl"> | ||
<div className="flex items-center"> | ||
<h3 className="text-base font-medium">Deletion Error</h3> | ||
<div className="ml-2 relative group"> | ||
<FiInfo className="h-4 w-4 text-error-600 cursor-help" /> | ||
<div className="absolute z-10 w-64 p-2 mt-2 text-sm bg-white rounded-md shadow-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300 border border-gray-200"> | ||
This error occurred while attempting to delete the connector. You | ||
may re-attempt a deletion by clicking the "Delete" button. | ||
</div> | ||
</div> | ||
</div> | ||
<div className="mt-2 text-sm"> | ||
<p>{deletion_failure_message}</p> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters