From 47676c3cce7d91f5526c0a00f16e6992af9c6b1b Mon Sep 17 00:00:00 2001 From: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:45:58 +0530 Subject: [PATCH] feat: Allow agent-bots to be created from the UI (#4153) Co-authored-by: Pranav Raj S --- app/controllers/dashboard_controller.rb | 6 +- .../dashboard/components/widgets/ShowMore.vue | 8 +- .../dashboard/i18n/locale/en/agentBots.json | 59 +- .../dashboard/settings/agentBots/Index.vue | 87 +- .../agentBots/components/AgentBotRow.vue | 89 ++ .../agentBots/components/AgentBotType.vue | 41 + .../agentBots/components/CSMLBotEditor.vue | 121 +++ .../agentBots/components/CSMLMonacoEditor.vue | 69 ++ .../settings/agentBots/csml/Edit.vue | 46 +- .../dashboard/settings/agentBots/csml/New.vue | 40 +- .../dashboard/store/modules/accounts.js | 2 +- .../dashboard/store/modules/agentBots.js | 6 +- app/javascript/shared/store/globalConfig.js | 2 + config/installation_config.yml | 2 + public/dashboard/images/agent-bots/csml.png | Bin 0 -> 6376 bytes .../dashboard/images/agent-bots/webhook.svg | 64 ++ yarn.lock | 971 +++++++++++++++++- 17 files changed, 1573 insertions(+), 40 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/settings/agentBots/components/AgentBotRow.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/agentBots/components/AgentBotType.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/agentBots/components/CSMLBotEditor.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/agentBots/components/CSMLMonacoEditor.vue create mode 100644 public/dashboard/images/agent-bots/csml.png create mode 100644 public/dashboard/images/agent-bots/webhook.svg diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 84677c770..420635ec5 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -16,8 +16,7 @@ class DashboardController < ActionController::Base @global_config = GlobalConfig.get( 'LOGO', 'LOGO_THUMBNAIL', 'INSTALLATION_NAME', - 'WIDGET_BRAND_URL', - 'TERMS_URL', + 'WIDGET_BRAND_URL', 'TERMS_URL', 'PRIVACY_URL', 'DISPLAY_MANIFEST', 'CREATE_NEW_ACCOUNT_FROM_DASHBOARD', @@ -30,7 +29,8 @@ class DashboardController < ActionController::Base 'HCAPTCHA_SITE_KEY', 'LOGOUT_REDIRECT_LINK', 'DISABLE_USER_PROFILE_UPDATE', - 'DEPLOYMENT_ENV' + 'DEPLOYMENT_ENV', + 'CSML_EDITOR_HOST' ).merge(app_config) end diff --git a/app/javascript/dashboard/components/widgets/ShowMore.vue b/app/javascript/dashboard/components/widgets/ShowMore.vue index c4755aed9..980889122 100644 --- a/app/javascript/dashboard/components/widgets/ShowMore.vue +++ b/app/javascript/dashboard/components/widgets/ShowMore.vue @@ -1,7 +1,11 @@