Browse Source

fix(gui): Webhook headers/auth section

fixed bug in headers and added auth section for basic authentication.

re #314

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 4 years ago
parent
commit
1666691655
  1. 7
      packages/nc-gui/components/apiClient/headers.vue
  2. 12
      packages/nc-gui/components/project/tableTabs/webhook/httpWebhook.vue

7
packages/nc-gui/components/apiClient/headers.vue

@ -27,7 +27,7 @@
<v-combobox <v-combobox
v-ge="['api-client-headers','enable']" v-ge="['api-client-headers','enable']"
class="body-2 caption" class="body-2 caption"
:items="headerListAutoWithEnv" :items="headerListAuto"
v-model="item.name" v-model="item.name"
:disabled="!item.enabled" :disabled="!item.enabled"
hide-details hide-details
@ -90,11 +90,6 @@
this.$emit('input', value) this.$emit('input', value)
} }
}, },
// populating autocomplete list along with env variables
headerListAutoWithEnv() {
const envObj = this.isDashboard ? this.$store.getters['project/GtrApiEnvironment'] : this.$store.getters['project/GtrDefaultApiEnvironment'];
return [...this.headerListAuto, ...(envObj ? Object.keys(envObj[this.env]).map(e => `{{${e}}}`) : [])];
}
}, },
beforeCreated() { beforeCreated() {

12
packages/nc-gui/components/project/tableTabs/webhook/httpWebhook.vue

@ -57,9 +57,15 @@
</v-tab-item> </v-tab-item>
<v-tab-item> <v-tab-item>
<!-- <monaco-editor--> <monaco-json-editor
<!-- :code.sync="api.auth"--> style="height: 250px"
<!-- cssStyle="height:250px"></monaco-editor>--> class="editor card text-left"
theme="vs-dark"
v-model="api.auth"
language="json"
:options="{validate:true,documentFormattingEdits:true,foldingRanges:true}"
>
</monaco-json-editor>
</v-tab-item> </v-tab-item>

Loading…
Cancel
Save