Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow no tag property creation #793

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
</v-col>
</v-row>
</v-container>
<v-container
class="elevation-3 mt-4"
v-if="filteringShape !== null && filteringTags.length > 0"
>
<v-container class="elevation-3 mt-4" v-if="filteringShape !== null">
<div class="pb-4 subtitle-1">Measure this property:</div>
<v-row>
<v-col>
Expand Down Expand Up @@ -65,12 +62,17 @@
</v-row>
</template>
</v-container>
<v-checkbox
v-model="computeUponCreation"
label="Compute upon creation"
class="mt-4"
/>
<div class="button-bar">
<v-spacer></v-spacer>
<v-btn class="mr-4" color="primary" @click="createProperty">
SUBMIT
Create Property
</v-btn>
<v-btn class="mr-4" color="warning" @click="reset">CANCEL</v-btn>
<v-btn class="mr-4" color="warning" @click="reset">Cancel</v-btn>
</div>
</v-card-text>
</v-card>
Expand Down Expand Up @@ -142,6 +144,8 @@ export default class PropertyCreation extends Vue {

interfaceValues: IWorkerInterfaceValues = {};

computeUponCreation = true;

get deduplicatedName() {
// Find a name which is not already taken
let count = 0;
Expand All @@ -161,7 +165,11 @@ export default class PropertyCreation extends Vue {
if (this.filteringTags.length) {
nameList.push(this.filteringTags.join(", "));
} else {
nameList.push("No tag");
if (this.areTagsExclusive) {
nameList.push("No tag");
} else {
nameList.push("All");
}
}
if (this.dockerImage) {
const imageInterfaceName =
Expand Down Expand Up @@ -238,11 +246,7 @@ export default class PropertyCreation extends Vue {
}

createProperty() {
if (
!this.dockerImage ||
!this.filteringShape ||
!this.filteringTags.length
) {
if (!this.dockerImage || !this.filteringShape) {
return;
}
this.propertyStore
Expand All @@ -258,6 +262,9 @@ export default class PropertyCreation extends Vue {
})
.then((property) => {
this.propertyStore.togglePropertyPathVisibility([property.id]);
if (this.computeUponCreation) {
this.propertyStore.computeProperty(property);
}
});
this.reset();
}
Expand Down