diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue index d67b8596f..966cba396 100644 --- a/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Config.vue @@ -18,17 +18,23 @@ export default { components: { CopyButton, }, + props: { extension: { type: Object, required: true, }, + + configFile: { + type: String, + }, }, computed: { highlightedConfigSnippet() { return hljs.highlight( 'yaml', + `# Add this configuration template to ${this.configFile}\n` + this.extension.config_snippet, ).value.trim() }, diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue index 2e7e1e5ac..49c960e91 100644 --- a/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Extension.vue @@ -26,7 +26,9 @@
- +
@@ -54,6 +56,10 @@ export default { type: Object, required: true, }, + + configFile: { + type: String, + }, }, data() { diff --git a/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue b/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue index 4567601d6..3a311f4a7 100644 --- a/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Extensions/Index.vue @@ -24,7 +24,8 @@
- +
@@ -32,7 +33,8 @@
- +
@@ -59,6 +61,7 @@ export default { backends: {}, filter: '', selectedExtension: null, + configFile: null, } }, @@ -127,9 +130,14 @@ export default { this.loading = false } }, + + async loadConfigFile() { + this.configFile = await this.request('config.get_config_file') + }, }, mounted() { + this.loadConfigFile() this.loadExtensions() bus.on('update:extension', (ext) => this.onInput(ext, false)) this.$nextTick(() => this.$refs.filter.focus())