Skip to content

Commit

Permalink
Fix bug where signal sheet save button is disabled on entity dialog o…
Browse files Browse the repository at this point in the history
…pen (Netflix#3067) (#45)

Co-authored-by: Will Sheldon <[email protected]>
  • Loading branch information
rutvijmehta-harness and wssheldon authored Mar 17, 2023
1 parent 70f7594 commit 0ac6df9
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,93 +5,93 @@
</template>
<v-card>
<v-card-title>Create Entity Type </v-card-title>
<ValidationObserver v-slot="{ invalid, validated }">
<v-stepper v-model="step">
<v-stepper-header>
<v-stepper-step :complete="step > 1" step="1" editable> Define Filter </v-stepper-step>
<v-divider />
<v-stepper-step step="2" editable> Save </v-stepper-step>
</v-stepper-header>
<v-stepper-items>
<v-stepper-content step="1">
<v-card flat height="100%">
<v-card-text>
Entity types are used to extract useful metadata out of signals. Define either a
RegEx or JSON Path expression to pull entities out of a signals raw json.
<v-radio-group label="Type" v-model="type" row>
<v-radio label="Regular Expression" value="regex"></v-radio>
<v-radio label="JSON Path" value="json"></v-radio>
</v-radio-group>
<v-text-field
v-if="type === 'regex'"
v-model="regular_expression"
label="Regular Expression"
hint="A regular expression pattern for your entity type. The first capture group will be used."
>
<template v-slot:append-outer>
<v-btn
icon
href="https://cheatography.com/davechild/cheat-sheets/regular-expressions/"
target="_blank"
>
<v-icon> mdi-help-circle-outline </v-icon>
</v-btn>
</template>
</v-text-field>
<v-text-field
v-if="type === 'json'"
v-model="jpath"
label="JSON Path"
hint="The field where the entity will be present. Supports JSON Path expressions."
>
<template v-slot:append-outer>
<v-btn
icon
href="https://github.com/json-path/JsonPath#path-examples"
target="_blank"
<v-stepper v-model="step">
<v-stepper-header>
<v-stepper-step :complete="step > 1" step="1" editable> Define Filter </v-stepper-step>
<v-divider />
<v-stepper-step step="2" editable> Save </v-stepper-step>
</v-stepper-header>
<v-stepper-items>
<v-stepper-content step="1">
<v-card flat height="100%">
<v-card-text>
Entity types are used to extract useful metadata out of signals. Define either a
RegEx or JSON Path expression to pull entities out of a signals raw json.
<v-radio-group label="Type" v-model="type" row>
<v-radio label="Regular Expression" value="regex"></v-radio>
<v-radio label="JSON Path" value="json"></v-radio>
</v-radio-group>
<v-text-field
v-if="type === 'regex'"
v-model="regular_expression"
label="Regular Expression"
hint="A regular expression pattern for your entity type. The first capture group will be used."
>
<template v-slot:append-outer>
<v-btn
icon
href="https://cheatography.com/davechild/cheat-sheets/regular-expressions/"
target="_blank"
>
<v-icon> mdi-help-circle-outline </v-icon>
</v-btn>
</template>
</v-text-field>
<v-text-field
v-if="type === 'json'"
v-model="jpath"
label="JSON Path"
hint="The field where the entity will be present. Supports JSON Path expressions."
>
<template v-slot:append-outer>
<v-btn
icon
href="https://github.com/json-path/JsonPath#path-examples"
target="_blank"
>
<v-icon> mdi-help-circle-outline </v-icon>
</v-btn>
</template>
</v-text-field>
Example signals:
<v-row>
<v-col cols="4">
<v-list>
<template
v-for="(instance, index) in signalInstances"
v-if="signalInstances.length"
>
<v-icon> mdi-help-circle-outline </v-icon>
</v-btn>
</template>
</v-text-field>
Example signals:
<v-row>
<v-col cols="4">
<v-list>
<template
v-for="(instance, index) in signalInstances"
v-if="signalInstances.length"
>
<v-list-item>
<v-list-item-content>
<v-list-item-title>{{ instance.id }}</v-list-item-title>
</v-list-item-content>
<v-list-item-action>
<v-btn icon @click="updateEditorValue(instance.raw)">
<v-icon>mdi-arrow-right</v-icon>
</v-btn>
</v-list-item-action>
</v-list-item>
<v-divider v-if="index < signalInstances.length - 1"></v-divider>
</template>
<template v-else>
No signals are currently available for this definition.
</template>
</v-list>
</v-col>
<v-col cols="8">
<playground-text-box :text="editorValue" />
</v-col>
</v-row>
</v-card-text>
</v-card>
<v-list-item>
<v-list-item-content>
<v-list-item-title>{{ instance.id }}</v-list-item-title>
</v-list-item-content>
<v-list-item-action>
<v-btn icon @click="updateEditorValue(instance.raw)">
<v-icon>mdi-arrow-right</v-icon>
</v-btn>
</v-list-item-action>
</v-list-item>
<v-divider v-if="index < signalInstances.length - 1"></v-divider>
</template>
<template v-else>
No signals are currently available for this definition.
</template>
</v-list>
</v-col>
<v-col cols="8">
<playground-text-box :text="editorValue" />
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn @click="closeCreateEditDialog()" text> Cancel </v-btn>
<v-btn color="info" @click="step = 2" :loading="loading"> Continue </v-btn>
</v-card-actions>
</v-stepper-content>
<v-stepper-content step="2">
</v-card>
</v-stepper-content>
<v-stepper-content step="2">
<ValidationObserver disabled v-slot="{ invalid, validated }">
<v-card>
<v-card-text>
<v-card-text>
Expand Down Expand Up @@ -135,10 +135,10 @@
</v-btn>
</v-card-actions>
</v-card>
</v-stepper-content>
</v-stepper-items>
</v-stepper>
</ValidationObserver>
</ValidationObserver>
</v-stepper-content>
</v-stepper-items>
</v-stepper>
</v-card>
</v-dialog>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/dispatch/static/dispatch/src/signal/NewEditDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
<v-card-text>
<entity-type-filter-combobox
v-model="entity_types"
:signalDefinition="selected"
:project="project"
:signalDefinition="selected"
></entity-type-filter-combobox>
</v-card-text>
</v-card>
Expand Down

0 comments on commit 0ac6df9

Please sign in to comment.