|
@@ -73,7 +73,7 @@ export default {
|
|
this.$root.socket.on('edit-label', this.editLabelInList);
|
|
this.$root.socket.on('edit-label', this.editLabelInList);
|
|
|
|
|
|
// get model
|
|
// get model
|
|
- this.$root.socket.get(`/projects/${this.$root.project.identifier}/model`)
|
|
|
|
|
|
+ this.$root.socket.get(`/projects/${this.$root.project.id}/model`)
|
|
.then(response => response.json())
|
|
.then(response => response.json())
|
|
.then(model => {
|
|
.then(model => {
|
|
this.supported.labeledImages = model.supports.includes('labeled-images');
|
|
this.supported.labeledImages = model.supports.includes('labeled-images');
|
|
@@ -197,18 +197,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
createResult: function (result) {
|
|
createResult: function (result) {
|
|
- if (result['file_id'] !== this.current.identifier)
|
|
|
|
|
|
+ if (result['file_id'] !== this.current.id)
|
|
return;
|
|
return;
|
|
|
|
|
|
for (let r of this.results)
|
|
for (let r of this.results)
|
|
- if (r.identifier === result.identifier)
|
|
|
|
|
|
+ if (r.id === result.id)
|
|
return;
|
|
return;
|
|
|
|
|
|
this.results.push(result);
|
|
this.results.push(result);
|
|
},
|
|
},
|
|
removeResult: function (result) {
|
|
removeResult: function (result) {
|
|
for (let i = 0; i < this.results.length; i++) {
|
|
for (let i = 0; i < this.results.length; i++) {
|
|
- if (this.results[i].identifier === result.identifier) {
|
|
|
|
|
|
+ if (this.results[i].id === result.id) {
|
|
this.results.splice(i, 1);
|
|
this.results.splice(i, 1);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -216,14 +216,14 @@ export default {
|
|
},
|
|
},
|
|
editResult: function (result) {
|
|
editResult: function (result) {
|
|
for (let i = 0; i < this.results.length; i++) {
|
|
for (let i = 0; i < this.results.length; i++) {
|
|
- if (this.results[i].identifier === result.identifier) {
|
|
|
|
|
|
+ if (this.results[i].id === result.id) {
|
|
this.$set(this.results, i, result);
|
|
this.$set(this.results, i, result);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getLabels: function () {
|
|
getLabels: function () {
|
|
- this.$root.socket.get(`/projects/${this.$root.project.identifier}/labels`)
|
|
|
|
|
|
+ this.$root.socket.get(`/projects/${this.$root.project.id}/labels`)
|
|
.then(response => response.json())
|
|
.then(response => response.json())
|
|
.then(labels => {
|
|
.then(labels => {
|
|
this.labels = [];
|
|
this.labels = [];
|
|
@@ -231,18 +231,18 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
addLabelToList: function (label) {
|
|
addLabelToList: function (label) {
|
|
- if (label['project_id'] !== this.$root.project.identifier)
|
|
|
|
|
|
+ if (label['project_id'] !== this.$root.project.id)
|
|
return;
|
|
return;
|
|
|
|
|
|
for (let l of this.labels)
|
|
for (let l of this.labels)
|
|
- if (l.identifier === label.identifier)
|
|
|
|
|
|
+ if (l.id === label.id)
|
|
return;
|
|
return;
|
|
|
|
|
|
this.labels.push(label);
|
|
this.labels.push(label);
|
|
},
|
|
},
|
|
removeLabelFromList: function (label) {
|
|
removeLabelFromList: function (label) {
|
|
for (let i = 0; i < this.labels.length; i++) {
|
|
for (let i = 0; i < this.labels.length; i++) {
|
|
- if (this.labels[i].identifier === label.identifier) {
|
|
|
|
|
|
+ if (this.labels[i].id === label.id) {
|
|
this.labels.splice(i, 1);
|
|
this.labels.splice(i, 1);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -250,7 +250,7 @@ export default {
|
|
},
|
|
},
|
|
editLabelInList: function (label) {
|
|
editLabelInList: function (label) {
|
|
for (let i = 0; i < this.labels.length; i++) {
|
|
for (let i = 0; i < this.labels.length; i++) {
|
|
- if (this.labels[i].identifier === label.identifier) {
|
|
|
|
|
|
+ if (this.labels[i].id === label.id) {
|
|
this.$set(this.labels, i, label);
|
|
this.$set(this.labels, i, label);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -264,7 +264,7 @@ export default {
|
|
this.video.play = false;
|
|
this.video.play = false;
|
|
this.video.frame = 0;
|
|
this.video.frame = 0;
|
|
|
|
|
|
- this.$root.socket.get(`/data/${newVal.identifier}/results`)
|
|
|
|
|
|
+ this.$root.socket.get(`/data/${newVal.id}/results`)
|
|
.then(response => response.json())
|
|
.then(response => response.json())
|
|
.then(results => {
|
|
.then(results => {
|
|
this.results = results;
|
|
this.results = results;
|