diff --git a/backend/database/migrations.py b/backend/database/migrations.py index e6b372a..94958cb 100644 --- a/backend/database/migrations.py +++ b/backend/database/migrations.py @@ -45,6 +45,10 @@ async def ensure_agents_table(): await conn.execute("CREATE TYPE config_status AS ENUM ('PENDING', 'APPLIED');") logger.info("Successfully created config_status enum type.") + await conn.execute("ALTER TYPE config_status ADD VALUE IF NOT EXISTS 'REJECTED';") + await conn.execute("ALTER TYPE config_status ADD VALUE IF NOT EXISTS 'DELETION';") + logger.info("Ensured REJECTED and DELETION values exist in config_status enum.") + # First, create essential tables if they don't exist await create_essential_tables(conn) diff --git a/frontend/src/components/ApplyManagement.js b/frontend/src/components/ApplyManagement.js index 35256bd..1541e6e 100644 --- a/frontend/src/components/ApplyManagement.js +++ b/frontend/src/components/ApplyManagement.js @@ -1243,39 +1243,41 @@ const ApplyManagement = () => { {/* Pending Versions Section */} {pendingVersions.length > 0 && ( -
- + <div style={{ marginBottom: 24, background: '#fffbe6', borderRadius: 8, border: '1px solid #ffe58f', padding: '16px 16px 8px' }}> + <Title level={5} style={{ marginTop: 0 }}> <ClockCircleOutlined style={{ marginRight: 8, color: '#faad14' }} /> Pending Changes ({pendingVersions.length}) - - {pendingVersions.map((version, index) => ( - } - > -
-
{version.version_name}
-
- {new Date(version.created_at).toLocaleString()} +
+ + {pendingVersions.map((version, index) => ( + } + > +
+
{version.version_name}
+
+ {new Date(version.created_at).toLocaleString()} +
+
+ PENDING +
+
-
- PENDING -
- -
- - ))} - + + ))} + +
)} @@ -1298,31 +1300,33 @@ const ApplyManagement = () => { style={{ margin: '20px 0' }} /> ) : ( - - {appliedVersions.map((version, index) => ( - : undefined} - > -
-
{version.version_name}
-
- {new Date(version.created_at).toLocaleString()} +
+ + {appliedVersions.map((version, index) => ( + : undefined} + > +
+
{version.version_name}
+
+ {new Date(version.created_at).toLocaleString()} +
+
- -
- - ))} - + + ))} + +
)} @@ -1343,42 +1347,44 @@ const ApplyManagement = () => { style={{ margin: '20px 0' }} /> ) : ( - - {rejectedVersions.map((version, index) => ( - } - > -
-
{version.version_name}
-
- Rejected: {new Date(version.updated_at || version.created_at).toLocaleString()} +
+ + {rejectedVersions.map((version, index) => ( + } + > +
+
{version.version_name}
+
+ Rejected: {new Date(version.updated_at || version.created_at).toLocaleString()} +
+ + + +
- - - - -
- - ))} - + + ))} + +
)}