Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/service/etcd-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ class EtcdData extends Events {
}

async getResult() {
const [discovery, algorithms, pipelines, algorithmBuilds, experiments, dataSources, boards] = await Promise.all([
const [discovery, algorithms, pipelines, algorithmBuilds, experiments, dataSources, devenvs, boards] = await Promise.all([
this._getDiscovery(),
this._getAlgorithms(),
this._getStoredPipelines(),
this._getAlgorithmBuilds(),
this._getExperiments(),
this._getDataSources(),
this._getDevEnvs(),
this._getBoards()
]);
this.lastResults = { discovery, algorithms, pipelines, algorithmBuilds, experiments, dataSources, boards };
this.lastResults = { discovery, algorithms, pipelines, algorithmBuilds, experiments, dataSources, devenvs, boards };
return this.lastResults;
}

Expand Down Expand Up @@ -144,6 +145,10 @@ class EtcdData extends Events {
return this._db.dataSources.listDataSources();
}

async _getDevEnvs() {
return this._db.devenvs.fetchAll({ sort: { created: 'desc' }, limit: MAX_ITEMS });
}

async _getAlgorithmBuilds() {
return this._db.algorithms.builds.fetchAll({ sort: { startTime: 'desc' }, limit: MAX_ITEMS });
}
Expand Down
3 changes: 2 additions & 1 deletion lib/service/result-gather.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ResultGather extends Events {
this._working = true;
const { nodeStatistics, diskSpace } = nodeStatisticsData.getLatestResult();

const { jobs, discovery, algorithms, pipelines, algorithmBuilds, boards, experiments, dataSources } = etcdApi.getLastResults();
const { jobs, discovery, algorithms, pipelines, algorithmBuilds, boards, experiments, dataSources, devenvs } = etcdApi.getLastResults();
const { taskMap, batchMap, nodeMap } = board.mapBoards(boards);
await board.addHasMetricsToMap(nodeMap);
for (const exp of jobs) {
Expand All @@ -109,6 +109,7 @@ class ResultGather extends Events {
pipelines,
experiments,
dataSources,
devenvs,
algorithmBuilds,
boards: { batchMap, taskMap, nodeMap }
});
Expand Down
27 changes: 16 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@hkube/config": "^2.0.11",
"@hkube/consts": "^1.0.36",
"@hkube/db": "^1.0.42",
"@hkube/db": "^1.0.46",
"@hkube/elastic-client": "^1.0.0",
"@hkube/etcd": "^5.1.6",
"@hkube/healthchecks": "^1.0.2",
Expand Down