feat(core): add table actions (edit, pause, delete confirmation) and global action log

- Add Edit and Pause/Resume actions to connections table
- Add delete confirmation modal to secrets table
- Add 'paused' status to connections with full backend support
- Skip paused connections in health checks and secrets scanning
- Add global ActionLog service with filesystem persistence
- Instrument all mutation handlers (connections, secrets, pipelines) with action logging
- Add Action Log view with entity type filtering to dashboard
This commit is contained in:
2026-02-27 11:13:07 +00:00
parent 630b2502f3
commit 81ead52a72
22 changed files with 564 additions and 8 deletions

View File

@@ -66,6 +66,11 @@ export class GitopsViewConnections extends DeesElement {
Created: new Date(item.createdAt).toLocaleDateString(),
})}
.dataActions=${[
{
name: 'Edit',
iconName: 'lucide:edit',
action: async (item: any) => { await this.editConnection(item); },
},
{
name: 'Test',
iconName: 'lucide:plug',
@@ -76,6 +81,31 @@ export class GitopsViewConnections extends DeesElement {
);
},
},
{
name: 'Pause/Resume',
iconName: 'lucide:pauseCircle',
action: async (item: any) => {
const isPaused = item.status === 'paused';
const actionLabel = isPaused ? 'Resume' : 'Pause';
await plugins.deesCatalog.DeesModal.createAndShow({
heading: `${actionLabel} Connection`,
content: html`<p style="color: #fff;">Are you sure you want to ${actionLabel.toLowerCase()} connection "${item.name}"?</p>`,
menuOptions: [
{ name: 'Cancel', action: async (modal: any) => { modal.destroy(); } },
{
name: actionLabel,
action: async (modal: any) => {
await appstate.connectionsStatePart.dispatchAction(
appstate.pauseConnectionAction,
{ connectionId: item.id, paused: !isPaused },
);
modal.destroy();
},
},
],
});
},
},
{
name: 'Delete',
iconName: 'lucide:trash2',
@@ -112,6 +142,51 @@ export class GitopsViewConnections extends DeesElement {
await appstate.connectionsStatePart.dispatchAction(appstate.fetchConnectionsAction, null);
}
private async editConnection(item: any) {
await plugins.deesCatalog.DeesModal.createAndShow({
heading: 'Edit Connection',
content: html`
<style>
.form-row { margin-bottom: 16px; }
.form-info { font-size: 13px; color: #888; margin-bottom: 16px; }
</style>
<div class="form-info">Provider: ${item.providerType}</div>
<div class="form-row">
<dees-input-text .label=${'Name'} .key=${'name'} .value=${item.name}></dees-input-text>
</div>
<div class="form-row">
<dees-input-text .label=${'Base URL'} .key=${'baseUrl'} .value=${item.baseUrl}></dees-input-text>
</div>
<div class="form-row">
<dees-input-text .label=${'API Token (leave empty to keep current)'} .key=${'token'} type="password"></dees-input-text>
</div>
`,
menuOptions: [
{ name: 'Cancel', action: async (modal: any) => { modal.destroy(); } },
{
name: 'Save',
action: async (modal: any) => {
const inputs = modal.shadowRoot.querySelectorAll('dees-input-text');
const data: any = {};
for (const input of inputs) {
data[input.key] = input.value || '';
}
await appstate.connectionsStatePart.dispatchAction(
appstate.updateConnectionAction,
{
connectionId: item.id,
name: data.name,
baseUrl: data.baseUrl,
...(data.token ? { token: data.token } : {}),
},
);
modal.destroy();
},
},
],
});
}
private async addConnection() {
await plugins.deesCatalog.DeesModal.createAndShow({
heading: 'Add Connection',