Compare commits

..

6 Commits

Author SHA1 Message Date
D. Berge
5fc51de7d8 Adapt Log view to new configuration endpoint in the API 2023-09-10 12:01:59 +02:00
D. Berge
158e0fb788 Adapt Log view to new label payload from API 2023-09-10 12:01:30 +02:00
D. Berge
941d15c1bc Return labels directly from project configuration.
NOTE: This is a breaking API change. Before this it returned an
array of labels, now it returns an object.
2023-09-10 11:59:38 +02:00
D. Berge
54fbc76da5 Merge branch '261-wrong-missing-shots-value-in-sequence-summary' into 'devel'
Resolve "Wrong missing shots value in sequence summary"

Closes #261

See merge request wgp/dougal/software!35
2023-09-09 18:46:33 +00:00
D. Berge
fb3d3be546 Trailing slash in API call results in "unauthorised" error.
No idea why.
2023-09-09 20:39:49 +02:00
D. Berge
8e11e242ed Remove NODE_OPTIONS from scripts.
Node version 18 does not seem to like it.
2023-09-09 20:37:08 +02:00
4 changed files with 12 additions and 11 deletions

View File

@@ -3,8 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --host=0.0.0.0",
"build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build"
"serve": "vue-cli-service serve --host=0.0.0.0",
"build": "vue-cli-service build"
},
"dependencies": {
"@mdi/font": "^7.2.96",

View File

@@ -604,16 +604,16 @@ export default {
async getLabelDefinitions () {
const url = `/project/${this.$route.params.project}/label`;
const labelSet = {};
const labels = await this.api([url]) || [];
labels.forEach( l => labelSet[l.name] = l.data );
this.labels = labelSet;
//const labelSet = {};
this.labels = await this.api([url]) ?? {};
//labels.forEach( l => labelSet[l.name] = l.data );
//this.labels = labelSet;
},
async getPresetRemarks () {
const url = `/project/${this.$route.params.project}/configuration/events/presetRemarks`;
const url = `/project/${this.$route.params.project}/configuration`;
this.presetRemarks = await this.api([url]);
this.presetRemarks = (await this.api([url]))?.events?.presetRemarks ?? {};
},
newItem (from = {}) {

View File

@@ -98,7 +98,7 @@ export default {
methods: {
async list () {
this.items = await this.api(["/project/"]) || [];
this.items = await this.api(["/project"]) || [];
},
async summary (item) {

View File

@@ -1,10 +1,11 @@
const { label } = require('../../../lib/db');
const { project } = require('../../../lib/db');
module.exports = async function (req, res, next) {
try {
res.status(200).send(await label.list(req.params.project, req.query));
const labels = (await project.configuration.get(req.params.project))?.labels ?? {};
res.status(200).send(labels);
next();
} catch (err) {
next(err);