Add job agent (#1672)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-01-29 06:38:15 +08:00
committed by GitHub
parent c7f56f30b3
commit f7cd429558
7 changed files with 72 additions and 18 deletions

View File

@@ -21,10 +21,29 @@ if (!artifactApiBaseUrl) {
const apiPathPrefix = import.meta.env.VITE_API_PATH_PREFIX ?? "";
function getGlobalWorkflowIds(): Array<string> {
const globalWorkflowIds = import.meta.env.VITE_GLOBAL_WORKFLOW_IDS;
if (!globalWorkflowIds) {
return [];
}
try {
const globalWorkflowIdsAsAList = JSON.parse(globalWorkflowIds);
if (Array.isArray(globalWorkflowIdsAsAList)) {
return globalWorkflowIdsAsAList;
}
return [];
} catch {
return [];
}
}
const globalWorkflowIds = getGlobalWorkflowIds();
export {
apiBaseUrl,
environment,
envCredential,
artifactApiBaseUrl,
apiPathPrefix,
globalWorkflowIds,
};