diff --git a/.github/workflows/assets/client/vue.config-builder.js b/.github/workflows/assets/client/vue.config-builder.js index 003589aa5..c354f807a 100644 --- a/.github/workflows/assets/client/vue.config-builder.js +++ b/.github/workflows/assets/client/vue.config-builder.js @@ -123,7 +123,11 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t hot: false, proxy: { - '^/custom.css': { + '^/custom.css': { + target: fetchBaseUrl(), + }, + + '^/code-snippets.js': { target: fetchBaseUrl(), }, }, diff --git a/client/web/admin/public/index.html b/client/web/admin/public/index.html index 30963a7c9..0ec5de43e 100644 --- a/client/web/admin/public/index.html +++ b/client/web/admin/public/index.html @@ -28,5 +28,8 @@
+ + + diff --git a/client/web/admin/src/components/CTheMainNav.vue b/client/web/admin/src/components/CTheMainNav.vue index 63c7e1288..289527186 100644 --- a/client/web/admin/src/components/CTheMainNav.vue +++ b/client/web/admin/src/components/CTheMainNav.vue @@ -120,6 +120,12 @@ export default { icon: 'cloud', can: ['system/', 'dal-connections.search'], }, + { + label: 'system.items.code-snippets', + route: 'system.codesnippets', + icon: 'file-code', + can: ['system/', 'settings.read'], + }, { label: 'system.items.sensitivityLevel', route: 'system.sensitivityLevel', diff --git a/client/web/admin/src/views/System/CodeSnippets/Index.vue b/client/web/admin/src/views/System/CodeSnippets/Index.vue new file mode 100644 index 000000000..c0bf73864 --- /dev/null +++ b/client/web/admin/src/views/System/CodeSnippets/Index.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/client/web/admin/src/views/UI/Index.vue b/client/web/admin/src/views/UI/Index.vue index d101c97c5..6fd045042 100644 --- a/client/web/admin/src/views/UI/Index.vue +++ b/client/web/admin/src/views/UI/Index.vue @@ -68,6 +68,7 @@ export default { processing: false, success: false, }, + } }, diff --git a/client/web/admin/src/views/routes.js b/client/web/admin/src/views/routes.js index f1e94e502..17aaaa5e4 100644 --- a/client/web/admin/src/views/routes.js +++ b/client/web/admin/src/views/routes.js @@ -110,6 +110,8 @@ export default [ r('system.connection.new', 'connection/new', 'System/Connection/Editor'), r('system.connection.edit', 'connection/edit/:connectionID', 'System/Connection/Editor'), + r('system.codesnippets', 'codesnippets', 'System/CodeSnippets/Index'), + combo('system', 'sensitivityLevel'), combo('system', 'queue', { pkey: 'queueID' }), diff --git a/client/web/admin/vue.config-builder.js b/client/web/admin/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/admin/vue.config-builder.js +++ b/client/web/admin/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/compose/public/index.html b/client/web/compose/public/index.html index 0afce7a30..e90d19ae3 100644 --- a/client/web/compose/public/index.html +++ b/client/web/compose/public/index.html @@ -28,5 +28,8 @@
+ + + diff --git a/client/web/compose/vue.config-builder.js b/client/web/compose/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/compose/vue.config-builder.js +++ b/client/web/compose/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/discovery/public/index.html b/client/web/discovery/public/index.html index a339e19a7..da7f8fe02 100644 --- a/client/web/discovery/public/index.html +++ b/client/web/discovery/public/index.html @@ -27,5 +27,8 @@
+ + + \ No newline at end of file diff --git a/client/web/discovery/vue.config-builder.js b/client/web/discovery/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/discovery/vue.config-builder.js +++ b/client/web/discovery/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/one/public/index.html b/client/web/one/public/index.html index 37490f9a2..0406bd65c 100644 --- a/client/web/one/public/index.html +++ b/client/web/one/public/index.html @@ -28,5 +28,8 @@
+ + + diff --git a/client/web/one/vue.config-builder.js b/client/web/one/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/one/vue.config-builder.js +++ b/client/web/one/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/privacy/public/index.html b/client/web/privacy/public/index.html index 11b8b84fe..d1e9dd454 100644 --- a/client/web/privacy/public/index.html +++ b/client/web/privacy/public/index.html @@ -27,5 +27,8 @@
+ + + \ No newline at end of file diff --git a/client/web/privacy/vue.config-builder.js b/client/web/privacy/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/privacy/vue.config-builder.js +++ b/client/web/privacy/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/reporter/public/index.html b/client/web/reporter/public/index.html index fde84567a..0192476e4 100644 --- a/client/web/reporter/public/index.html +++ b/client/web/reporter/public/index.html @@ -27,5 +27,8 @@
+ + + \ No newline at end of file diff --git a/client/web/reporter/vue.config-builder.js b/client/web/reporter/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/reporter/vue.config-builder.js +++ b/client/web/reporter/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/client/web/workflow/public/index.html b/client/web/workflow/public/index.html index 1d4907002..053bf71fe 100644 --- a/client/web/workflow/public/index.html +++ b/client/web/workflow/public/index.html @@ -37,5 +37,8 @@
+ + + diff --git a/client/web/workflow/vue.config-builder.js b/client/web/workflow/vue.config-builder.js index 46ff13123..11a63517d 100644 --- a/client/web/workflow/vue.config-builder.js +++ b/client/web/workflow/vue.config-builder.js @@ -124,6 +124,10 @@ module.exports = ({ appFlavour, appLabel, version = process.env.BUILD_VERSION, t '^/custom.css': { target: fetchBaseUrl(), }, + + '^/code-snippets.js': { + target: fetchBaseUrl(), + }, }, watchOptions: { diff --git a/locale/en/corteza-webapp-admin/navigation.yaml b/locale/en/corteza-webapp-admin/navigation.yaml index 040c96d6b..f806e718d 100644 --- a/locale/en/corteza-webapp-admin/navigation.yaml +++ b/locale/en/corteza-webapp-admin/navigation.yaml @@ -9,6 +9,7 @@ system: applications: Applications authclients: Auth Clients connections: Connections + code-snippets: Code Snippets sensitivityLevel: Sensitivity Levels permissions: Permissions queues: Messaging Queues @@ -43,4 +44,3 @@ ui: group: User interface items: settings: Settings - diff --git a/locale/en/corteza-webapp-admin/notification.yaml b/locale/en/corteza-webapp-admin/notification.yaml index 55fb21ab9..16f870ae4 100644 --- a/locale/en/corteza-webapp-admin/notification.yaml +++ b/locale/en/corteza-webapp-admin/notification.yaml @@ -268,6 +268,16 @@ settings: update: success: UI settings updated error: UI settings update failed + code-snippet: + fetch: + error: Code snippets settings fetch failed + update: + success: Code snippets settings updated + error: Code snippets settings update failed + delete: + success: Code snippet deleted + error: Code snippet delete failed + permissions: fetch: error: Permissions fetch failed @@ -293,4 +303,4 @@ connection: error: Connection delete failed undelete: success: Connection restored - error: Connection restore failed + error: Connection restore failed \ No newline at end of file diff --git a/locale/en/corteza-webapp-admin/system.code-snippets.yaml b/locale/en/corteza-webapp-admin/system.code-snippets.yaml new file mode 100644 index 000000000..458e6260f --- /dev/null +++ b/locale/en/corteza-webapp-admin/system.code-snippets.yaml @@ -0,0 +1,15 @@ +editor: + title: Code snippets + + code-snippets: + add: Add code snippet + empty: No snippets yet + table-headers: + provider: Provider + value: Script value + form: + provider: + label: Provider + value: + label: Script value + description: Ensure that your Code snippets are within