|
@@ -21,6 +21,17 @@
|
|
v-model="model">
|
|
v-model="model">
|
|
Model
|
|
Model
|
|
</select-input>
|
|
</select-input>
|
|
|
|
+
|
|
|
|
+ <div class="features">
|
|
|
|
+ This model supports:
|
|
|
|
+
|
|
|
|
+ <ul>
|
|
|
|
+ <li v-for="(feature, key) in current.supports"
|
|
|
|
+ v-bind:key="key">
|
|
|
|
+ {{ feature }}
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<button-row class="footer">
|
|
<button-row class="footer">
|
|
@@ -46,7 +57,7 @@ export default {
|
|
name: "project-creation-window",
|
|
name: "project-creation-window",
|
|
components: {ButtonRow, ButtonInput, SelectInput, TextareaInput, TextInput},
|
|
components: {ButtonRow, ButtonInput, SelectInput, TextareaInput, TextInput},
|
|
props: ['status', 'socket'],
|
|
props: ['status', 'socket'],
|
|
- data: function() {
|
|
|
|
|
|
+ data: function () {
|
|
return {
|
|
return {
|
|
name: '',
|
|
name: '',
|
|
nameError: false,
|
|
nameError: false,
|
|
@@ -56,24 +67,42 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- models: function() {
|
|
|
|
|
|
+ models: function () {
|
|
|
|
+ const supported = {
|
|
|
|
+ 'bounding-boxes': 'bounding boxes',
|
|
|
|
+ 'labeled-bounding-boxes': 'labeled bounding boxes',
|
|
|
|
+ 'labeled-images': 'labeled images',
|
|
|
|
+ };
|
|
let result = [];
|
|
let result = [];
|
|
|
|
|
|
for (let o in this.status.models) {
|
|
for (let o in this.status.models) {
|
|
result.push({
|
|
result.push({
|
|
- 'name': this.status.models[o].name,
|
|
|
|
- 'value': this.status.models[o].id
|
|
|
|
- });
|
|
|
|
|
|
+ 'id': this.status.models[o].id,
|
|
|
|
+ 'name': this.status.models[o].name,
|
|
|
|
+ 'value': this.status.models[o].id,
|
|
|
|
+ 'supports': this.status.models[o].supports
|
|
|
|
+ .map(k => k in supported ? supported[k] : 'unknown feature')
|
|
|
|
+ }
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
|
+ },
|
|
|
|
+ current: function () {
|
|
|
|
+ for (let model of this.models) {
|
|
|
|
+ if (model.id === this.model) {
|
|
|
|
+ return model;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created: function() {
|
|
|
|
|
|
+ created: function () {
|
|
this.model = this.models[0].value;
|
|
this.model = this.models[0].value;
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- create: function() {
|
|
|
|
|
|
+ create: function () {
|
|
this.nameError = !this.name;
|
|
this.nameError = !this.name;
|
|
this.descriptionError = !this.description;
|
|
this.descriptionError = !this.description;
|
|
|
|
|
|
@@ -120,6 +149,14 @@ export default {
|
|
height: 4rem;
|
|
height: 4rem;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+.features {
|
|
|
|
+ font-size: 80%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.features ul {
|
|
|
|
+ margin-top: 0.4rem;
|
|
|
|
+}
|
|
|
|
+
|
|
.footer {
|
|
.footer {
|
|
flex-grow: 0;
|
|
flex-grow: 0;
|
|
padding: 2rem;
|
|
padding: 2rem;
|