semantics update

This commit is contained in:
2026-01-13 09:11:27 +03:00
parent 9a9c5879e6
commit ae1d630ad6
21 changed files with 4389 additions and 3471 deletions

View File

@@ -45,6 +45,7 @@
isSubmitting = false;
}
}
// [/DEF:handleSubmit:Function]
function resetForm() {
name = '';

View File

@@ -29,6 +29,7 @@
isLoading = false;
}
}
// [/DEF:fetchConnections:Function]
// [DEF:handleDelete:Function]
// @PURPOSE: Deletes a connection configuration.
@@ -43,6 +44,7 @@
addToast(e.message, 'error');
}
}
// [/DEF:handleDelete:Function]
onMount(fetchConnections);

View File

@@ -23,6 +23,13 @@
let results = null;
let pollInterval;
// [DEF:fetchEnvironments:Function]
/**
* @purpose Fetches available environments.
* @pre API is available.
* @post envs variable is populated.
* @returns {Promise<void>}
*/
async function fetchEnvironments() {
try {
const res = await fetch('/api/environments');
@@ -31,7 +38,15 @@
addToast('Failed to fetch environments', 'error');
}
}
// [/DEF:fetchEnvironments:Function]
// [DEF:handleRunDebug:Function]
/**
* @purpose Triggers the debug task.
* @pre Required fields are selected.
* @post Task is started and polling begins.
* @returns {Promise<void>}
*/
async function handleRunDebug() {
isRunning = true;
results = null;
@@ -66,7 +81,16 @@
addToast(e.message, 'error');
}
}
// [/DEF:handleRunDebug:Function]
// [DEF:startPolling:Function]
/**
* @purpose Polls for task completion.
* @pre Task ID is valid.
* @post Polls until success/failure.
* @param {string} taskId - ID of the task.
* @returns {void}
*/
function startPolling(taskId) {
if (pollInterval) clearInterval(pollInterval);
pollInterval = setInterval(async () => {
@@ -89,6 +113,7 @@
}
}, 2000);
}
// [/DEF:startPolling:Function]
onMount(fetchEnvironments);
</script>
@@ -161,4 +186,5 @@
</div>
</div>
{/if}
</div>
</div>
<!-- [/DEF:DebugTool:Component] -->

View File

@@ -37,6 +37,7 @@
addToast('Failed to fetch data', 'error');
}
}
// [/DEF:fetchData:Function]
// [DEF:handleRunMapper:Function]
// @PURPOSE: Triggers the MapperPlugin task.
@@ -77,6 +78,7 @@
isRunning = false;
}
}
// [/DEF:handleRunMapper:Function]
onMount(fetchData);
</script>

View File

@@ -30,6 +30,7 @@
addToast('Failed to fetch environments', 'error');
}
}
// [/DEF:fetchEnvironments:Function]
// [DEF:handleSearch:Function]
// @PURPOSE: Triggers the SearchPlugin task.
@@ -56,6 +57,7 @@
addToast(e.message, 'error');
}
}
// [/DEF:handleSearch:Function]
// [DEF:startPolling:Function]
// @PURPOSE: Polls for task completion and results.
@@ -84,6 +86,7 @@
}
}, 2000);
}
// [/DEF:startPolling:Function]
onMount(fetchEnvironments);
</script>