semantics update
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
isSubmitting = false;
|
||||
}
|
||||
}
|
||||
// [/DEF:handleSubmit:Function]
|
||||
|
||||
function resetForm() {
|
||||
name = '';
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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] -->
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user