diff --git a/DSL/DMapper/hbs/array-to-object.handlebars b/DSL/DMapper/analytics/hbs/array-to-object.handlebars similarity index 100% rename from DSL/DMapper/hbs/array-to-object.handlebars rename to DSL/DMapper/analytics/hbs/array-to-object.handlebars diff --git a/DSL/DMapper/hbs/get-csv.handlebars b/DSL/DMapper/analytics/hbs/get-csv.handlebars similarity index 100% rename from DSL/DMapper/hbs/get-csv.handlebars rename to DSL/DMapper/analytics/hbs/get-csv.handlebars diff --git a/DSL/DMapper/hbs/get-metric-rows.handlebars b/DSL/DMapper/analytics/hbs/get-metric-rows.handlebars similarity index 100% rename from DSL/DMapper/hbs/get-metric-rows.handlebars rename to DSL/DMapper/analytics/hbs/get-metric-rows.handlebars diff --git a/DSL/DMapper/hbs/merge-arrays.handlebars b/DSL/DMapper/analytics/hbs/merge-arrays.handlebars similarity index 100% rename from DSL/DMapper/hbs/merge-arrays.handlebars rename to DSL/DMapper/analytics/hbs/merge-arrays.handlebars diff --git a/DSL/DMapper/js/get-csv.js b/DSL/DMapper/analytics/js/get-csv.js similarity index 100% rename from DSL/DMapper/js/get-csv.js rename to DSL/DMapper/analytics/js/get-csv.js diff --git a/DSL/Resql/analytics/GET/readme.md b/DSL/Resql/analytics/GET/readme.md new file mode 100644 index 00000000..e69de29b diff --git a/DSL/Resql/add-scheduled-report.sql b/DSL/Resql/analytics/POST/add-scheduled-report.sql similarity index 100% rename from DSL/Resql/add-scheduled-report.sql rename to DSL/Resql/analytics/POST/add-scheduled-report.sql diff --git a/DSL/Resql/byk-avg-intents.sql b/DSL/Resql/analytics/POST/byk-avg-intents.sql similarity index 100% rename from DSL/Resql/byk-avg-intents.sql rename to DSL/Resql/analytics/POST/byk-avg-intents.sql diff --git a/DSL/Resql/byk-avg-response-speed.sql b/DSL/Resql/analytics/POST/byk-avg-response-speed.sql similarity index 100% rename from DSL/Resql/byk-avg-response-speed.sql rename to DSL/Resql/analytics/POST/byk-avg-response-speed.sql diff --git a/DSL/Resql/byk-avg-sessions-time-chatbot.sql b/DSL/Resql/analytics/POST/byk-avg-sessions-time-chatbot.sql similarity index 100% rename from DSL/Resql/byk-avg-sessions-time-chatbot.sql rename to DSL/Resql/analytics/POST/byk-avg-sessions-time-chatbot.sql diff --git a/DSL/Resql/byk-avg-sessions-time-csa.sql b/DSL/Resql/analytics/POST/byk-avg-sessions-time-csa.sql similarity index 100% rename from DSL/Resql/byk-avg-sessions-time-csa.sql rename to DSL/Resql/analytics/POST/byk-avg-sessions-time-csa.sql diff --git a/DSL/Resql/byk-avg-sessions-time-customer.sql b/DSL/Resql/analytics/POST/byk-avg-sessions-time-customer.sql similarity index 100% rename from DSL/Resql/byk-avg-sessions-time-customer.sql rename to DSL/Resql/analytics/POST/byk-avg-sessions-time-customer.sql diff --git a/DSL/Resql/byk-intents-count.sql b/DSL/Resql/analytics/POST/byk-intents-count.sql similarity index 100% rename from DSL/Resql/byk-intents-count.sql rename to DSL/Resql/analytics/POST/byk-intents-count.sql diff --git a/DSL/Resql/byk-modified-intents.sql b/DSL/Resql/analytics/POST/byk-modified-intents.sql similarity index 100% rename from DSL/Resql/byk-modified-intents.sql rename to DSL/Resql/analytics/POST/byk-modified-intents.sql diff --git a/DSL/Resql/byk-new-intents.sql b/DSL/Resql/analytics/POST/byk-new-intents.sql similarity index 100% rename from DSL/Resql/byk-new-intents.sql rename to DSL/Resql/analytics/POST/byk-new-intents.sql diff --git a/DSL/Resql/byk-pct-correctly-understood.sql b/DSL/Resql/analytics/POST/byk-pct-correctly-understood.sql similarity index 100% rename from DSL/Resql/byk-pct-correctly-understood.sql rename to DSL/Resql/analytics/POST/byk-pct-correctly-understood.sql diff --git a/DSL/Resql/chat-avg-duration.sql b/DSL/Resql/analytics/POST/chat-avg-duration.sql similarity index 100% rename from DSL/Resql/chat-avg-duration.sql rename to DSL/Resql/analytics/POST/chat-avg-duration.sql diff --git a/DSL/Resql/chat-avg-num-of-messages.sql b/DSL/Resql/analytics/POST/chat-avg-num-of-messages.sql similarity index 100% rename from DSL/Resql/chat-avg-num-of-messages.sql rename to DSL/Resql/analytics/POST/chat-avg-num-of-messages.sql diff --git a/DSL/Resql/chat-avg-waiting-time.sql b/DSL/Resql/analytics/POST/chat-avg-waiting-time.sql similarity index 100% rename from DSL/Resql/chat-avg-waiting-time.sql rename to DSL/Resql/analytics/POST/chat-avg-waiting-time.sql diff --git a/DSL/Resql/chat-cif-all-csas-away.sql b/DSL/Resql/analytics/POST/chat-cif-all-csas-away.sql similarity index 100% rename from DSL/Resql/chat-cif-all-csas-away.sql rename to DSL/Resql/analytics/POST/chat-cif-all-csas-away.sql diff --git a/DSL/Resql/chat-cif-long-waiting-time.sql b/DSL/Resql/analytics/POST/chat-cif-long-waiting-time.sql similarity index 100% rename from DSL/Resql/chat-cif-long-waiting-time.sql rename to DSL/Resql/analytics/POST/chat-cif-long-waiting-time.sql diff --git a/DSL/Resql/chat-cif-outside-working-hours.sql b/DSL/Resql/analytics/POST/chat-cif-outside-working-hours.sql similarity index 100% rename from DSL/Resql/chat-cif-outside-working-hours.sql rename to DSL/Resql/analytics/POST/chat-cif-outside-working-hours.sql diff --git a/DSL/Resql/chat-count-only-chatbot.sql b/DSL/Resql/analytics/POST/chat-count-only-chatbot.sql similarity index 100% rename from DSL/Resql/chat-count-only-chatbot.sql rename to DSL/Resql/analytics/POST/chat-count-only-chatbot.sql diff --git a/DSL/Resql/chat-count-with-csa-and-chatbot.sql b/DSL/Resql/analytics/POST/chat-count-with-csa-and-chatbot.sql similarity index 100% rename from DSL/Resql/chat-count-with-csa-and-chatbot.sql rename to DSL/Resql/analytics/POST/chat-count-with-csa-and-chatbot.sql diff --git a/DSL/Resql/chat-count-with-csa.sql b/DSL/Resql/analytics/POST/chat-count-with-csa.sql similarity index 100% rename from DSL/Resql/chat-count-with-csa.sql rename to DSL/Resql/analytics/POST/chat-count-with-csa.sql diff --git a/DSL/Resql/chat-idle-count.sql b/DSL/Resql/analytics/POST/chat-idle-count.sql similarity index 100% rename from DSL/Resql/chat-idle-count.sql rename to DSL/Resql/analytics/POST/chat-idle-count.sql diff --git a/DSL/Resql/chat-median-waiting-time.sql b/DSL/Resql/analytics/POST/chat-median-waiting-time.sql similarity index 100% rename from DSL/Resql/chat-median-waiting-time.sql rename to DSL/Resql/analytics/POST/chat-median-waiting-time.sql diff --git a/DSL/Resql/csa-avg-chat-time.sql b/DSL/Resql/analytics/POST/csa-avg-chat-time.sql similarity index 100% rename from DSL/Resql/csa-avg-chat-time.sql rename to DSL/Resql/analytics/POST/csa-avg-chat-time.sql diff --git a/DSL/Resql/csa-avg-present-number.sql b/DSL/Resql/analytics/POST/csa-avg-present-number.sql similarity index 100% rename from DSL/Resql/csa-avg-present-number.sql rename to DSL/Resql/analytics/POST/csa-avg-present-number.sql diff --git a/DSL/Resql/csa-avg-time-picking-up-chats.sql b/DSL/Resql/analytics/POST/csa-avg-time-picking-up-chats.sql similarity index 100% rename from DSL/Resql/csa-avg-time-picking-up-chats.sql rename to DSL/Resql/analytics/POST/csa-avg-time-picking-up-chats.sql diff --git a/DSL/Resql/csa-chat-forwards.sql b/DSL/Resql/analytics/POST/csa-chat-forwards.sql similarity index 100% rename from DSL/Resql/csa-chat-forwards.sql rename to DSL/Resql/analytics/POST/csa-chat-forwards.sql diff --git a/DSL/Resql/csa-chats-count.sql b/DSL/Resql/analytics/POST/csa-chats-count.sql similarity index 100% rename from DSL/Resql/csa-chats-count.sql rename to DSL/Resql/analytics/POST/csa-chats-count.sql diff --git a/DSL/Resql/delete-odp-settings.sql b/DSL/Resql/analytics/POST/delete-odp-settings.sql similarity index 100% rename from DSL/Resql/delete-odp-settings.sql rename to DSL/Resql/analytics/POST/delete-odp-settings.sql diff --git a/DSL/Resql/delete-scheduled-report.sql b/DSL/Resql/analytics/POST/delete-scheduled-report.sql similarity index 100% rename from DSL/Resql/delete-scheduled-report.sql rename to DSL/Resql/analytics/POST/delete-scheduled-report.sql diff --git a/DSL/Resql/feedback-avg-feedback-to-buerokratt-chats.sql b/DSL/Resql/analytics/POST/feedback-avg-feedback-to-buerokratt-chats.sql similarity index 100% rename from DSL/Resql/feedback-avg-feedback-to-buerokratt-chats.sql rename to DSL/Resql/analytics/POST/feedback-avg-feedback-to-buerokratt-chats.sql diff --git a/DSL/Resql/feedback-chats-with-negative-feedback.sql b/DSL/Resql/analytics/POST/feedback-chats-with-negative-feedback.sql similarity index 100% rename from DSL/Resql/feedback-chats-with-negative-feedback.sql rename to DSL/Resql/analytics/POST/feedback-chats-with-negative-feedback.sql diff --git a/DSL/Resql/feedback-csa-chats-feedback-nps.sql b/DSL/Resql/analytics/POST/feedback-csa-chats-feedback-nps.sql similarity index 100% rename from DSL/Resql/feedback-csa-chats-feedback-nps.sql rename to DSL/Resql/analytics/POST/feedback-csa-chats-feedback-nps.sql diff --git a/DSL/Resql/feedback-selected-csa-feedback-nps.sql b/DSL/Resql/analytics/POST/feedback-selected-csa-feedback-nps.sql similarity index 100% rename from DSL/Resql/feedback-selected-csa-feedback-nps.sql rename to DSL/Resql/analytics/POST/feedback-selected-csa-feedback-nps.sql diff --git a/DSL/Resql/get-avg-messages.sql b/DSL/Resql/analytics/POST/get-avg-messages.sql similarity index 100% rename from DSL/Resql/get-avg-messages.sql rename to DSL/Resql/analytics/POST/get-avg-messages.sql diff --git a/DSL/Resql/get-avg-response-time.sql b/DSL/Resql/analytics/POST/get-avg-response-time.sql similarity index 100% rename from DSL/Resql/get-avg-response-time.sql rename to DSL/Resql/analytics/POST/get-avg-response-time.sql diff --git a/DSL/Resql/get-avg-session-length-client-left.sql b/DSL/Resql/analytics/POST/get-avg-session-length-client-left.sql similarity index 100% rename from DSL/Resql/get-avg-session-length-client-left.sql rename to DSL/Resql/analytics/POST/get-avg-session-length-client-left.sql diff --git a/DSL/Resql/get-avg-session-length-csa.sql b/DSL/Resql/analytics/POST/get-avg-session-length-csa.sql similarity index 100% rename from DSL/Resql/get-avg-session-length-csa.sql rename to DSL/Resql/analytics/POST/get-avg-session-length-csa.sql diff --git a/DSL/Resql/get-avg-session-length-no-csa.sql b/DSL/Resql/analytics/POST/get-avg-session-length-no-csa.sql similarity index 100% rename from DSL/Resql/get-avg-session-length-no-csa.sql rename to DSL/Resql/analytics/POST/get-avg-session-length-no-csa.sql diff --git a/DSL/Resql/get-avg-time-csa.sql b/DSL/Resql/analytics/POST/get-avg-time-csa.sql similarity index 100% rename from DSL/Resql/get-avg-time-csa.sql rename to DSL/Resql/analytics/POST/get-avg-time-csa.sql diff --git a/DSL/Resql/get-avg-time-no-csa.sql b/DSL/Resql/analytics/POST/get-avg-time-no-csa.sql similarity index 100% rename from DSL/Resql/get-avg-time-no-csa.sql rename to DSL/Resql/analytics/POST/get-avg-time-no-csa.sql diff --git a/DSL/Resql/get-avg-time.sql b/DSL/Resql/analytics/POST/get-avg-time.sql similarity index 100% rename from DSL/Resql/get-avg-time.sql rename to DSL/Resql/analytics/POST/get-avg-time.sql diff --git a/DSL/Resql/get-avg-waiting-time.sql b/DSL/Resql/analytics/POST/get-avg-waiting-time.sql similarity index 100% rename from DSL/Resql/get-avg-waiting-time.sql rename to DSL/Resql/analytics/POST/get-avg-waiting-time.sql diff --git a/DSL/Resql/get-chat-by-id.sql b/DSL/Resql/analytics/POST/get-chat-by-id.sql similarity index 100% rename from DSL/Resql/get-chat-by-id.sql rename to DSL/Resql/analytics/POST/get-chat-by-id.sql diff --git a/DSL/Resql/get-chat-count-csa.sql b/DSL/Resql/analytics/POST/get-chat-count-csa.sql similarity index 100% rename from DSL/Resql/get-chat-count-csa.sql rename to DSL/Resql/analytics/POST/get-chat-count-csa.sql diff --git a/DSL/Resql/get-chat-count-no-csa.sql b/DSL/Resql/analytics/POST/get-chat-count-no-csa.sql similarity index 100% rename from DSL/Resql/get-chat-count-no-csa.sql rename to DSL/Resql/analytics/POST/get-chat-count-no-csa.sql diff --git a/DSL/Resql/get-chat-count-total.sql b/DSL/Resql/analytics/POST/get-chat-count-total.sql similarity index 100% rename from DSL/Resql/get-chat-count-total.sql rename to DSL/Resql/analytics/POST/get-chat-count-total.sql diff --git a/DSL/Resql/get-chat-messages.sql b/DSL/Resql/analytics/POST/get-chat-messages.sql similarity index 100% rename from DSL/Resql/get-chat-messages.sql rename to DSL/Resql/analytics/POST/get-chat-messages.sql diff --git a/DSL/Resql/get-configuration.sql b/DSL/Resql/analytics/POST/get-configuration.sql similarity index 100% rename from DSL/Resql/get-configuration.sql rename to DSL/Resql/analytics/POST/get-configuration.sql diff --git a/DSL/Resql/get-intent.sql b/DSL/Resql/analytics/POST/get-intent.sql similarity index 100% rename from DSL/Resql/get-intent.sql rename to DSL/Resql/analytics/POST/get-intent.sql diff --git a/DSL/Resql/get-intents.sql b/DSL/Resql/analytics/POST/get-intents.sql similarity index 100% rename from DSL/Resql/get-intents.sql rename to DSL/Resql/analytics/POST/get-intents.sql diff --git a/DSL/Resql/analytics/POST/get-new-nonce.sql b/DSL/Resql/analytics/POST/get-new-nonce.sql new file mode 100644 index 00000000..c5643a86 --- /dev/null +++ b/DSL/Resql/analytics/POST/get-new-nonce.sql @@ -0,0 +1 @@ +INSERT INTO request_nonces (valid_until) VALUES ( now() + interval '1 day') RETURNING nonce; diff --git a/DSL/Resql/get-odp-settings.sql b/DSL/Resql/analytics/POST/get-odp-settings.sql similarity index 100% rename from DSL/Resql/get-odp-settings.sql rename to DSL/Resql/analytics/POST/get-odp-settings.sql diff --git a/DSL/Resql/get-pct-correctly-understood.sql b/DSL/Resql/analytics/POST/get-pct-correctly-understood.sql similarity index 100% rename from DSL/Resql/get-pct-correctly-understood.sql rename to DSL/Resql/analytics/POST/get-pct-correctly-understood.sql diff --git a/DSL/Resql/get-period-times.sql b/DSL/Resql/analytics/POST/get-period-times.sql similarity index 100% rename from DSL/Resql/get-period-times.sql rename to DSL/Resql/analytics/POST/get-period-times.sql diff --git a/DSL/Resql/get-scheduled-report.sql b/DSL/Resql/analytics/POST/get-scheduled-report.sql similarity index 100% rename from DSL/Resql/get-scheduled-report.sql rename to DSL/Resql/analytics/POST/get-scheduled-report.sql diff --git a/DSL/Resql/get-scheduled-reports.sql b/DSL/Resql/analytics/POST/get-scheduled-reports.sql similarity index 100% rename from DSL/Resql/get-scheduled-reports.sql rename to DSL/Resql/analytics/POST/get-scheduled-reports.sql diff --git a/DSL/Resql/get-user-by-login.sql b/DSL/Resql/analytics/POST/get-user-by-login.sql similarity index 100% rename from DSL/Resql/get-user-by-login.sql rename to DSL/Resql/analytics/POST/get-user-by-login.sql diff --git a/DSL/Resql/get-user-page-preferences.sql b/DSL/Resql/analytics/POST/get-user-page-preferences.sql similarity index 100% rename from DSL/Resql/get-user-page-preferences.sql rename to DSL/Resql/analytics/POST/get-user-page-preferences.sql diff --git a/DSL/Resql/overview-avg-chats-no-csa.sql b/DSL/Resql/analytics/POST/overview-avg-chats-no-csa.sql similarity index 100% rename from DSL/Resql/overview-avg-chats-no-csa.sql rename to DSL/Resql/analytics/POST/overview-avg-chats-no-csa.sql diff --git a/DSL/Resql/overview-avg-chats.sql b/DSL/Resql/analytics/POST/overview-avg-chats.sql similarity index 100% rename from DSL/Resql/overview-avg-chats.sql rename to DSL/Resql/analytics/POST/overview-avg-chats.sql diff --git a/DSL/Resql/overview-avg-waiting-time.sql b/DSL/Resql/analytics/POST/overview-avg-waiting-time.sql similarity index 100% rename from DSL/Resql/overview-avg-waiting-time.sql rename to DSL/Resql/analytics/POST/overview-avg-waiting-time.sql diff --git a/DSL/Resql/overview-chat-activity-chart.sql b/DSL/Resql/analytics/POST/overview-chat-activity-chart.sql similarity index 100% rename from DSL/Resql/overview-chat-activity-chart.sql rename to DSL/Resql/analytics/POST/overview-chat-activity-chart.sql diff --git a/DSL/Resql/overview-metric-preferences.sql b/DSL/Resql/analytics/POST/overview-metric-preferences.sql similarity index 100% rename from DSL/Resql/overview-metric-preferences.sql rename to DSL/Resql/analytics/POST/overview-metric-preferences.sql diff --git a/DSL/Resql/overview-total-chats-no-csa.sql b/DSL/Resql/analytics/POST/overview-total-chats-no-csa.sql similarity index 100% rename from DSL/Resql/overview-total-chats-no-csa.sql rename to DSL/Resql/analytics/POST/overview-total-chats-no-csa.sql diff --git a/DSL/Resql/overview-total-chats.sql b/DSL/Resql/analytics/POST/overview-total-chats.sql similarity index 100% rename from DSL/Resql/overview-total-chats.sql rename to DSL/Resql/analytics/POST/overview-total-chats.sql diff --git a/DSL/Resql/overview-total-forwarded-chats.sql b/DSL/Resql/analytics/POST/overview-total-forwarded-chats.sql similarity index 100% rename from DSL/Resql/overview-total-forwarded-chats.sql rename to DSL/Resql/analytics/POST/overview-total-forwarded-chats.sql diff --git a/DSL/Resql/set-odp-settings.sql b/DSL/Resql/analytics/POST/set-odp-settings.sql similarity index 100% rename from DSL/Resql/set-odp-settings.sql rename to DSL/Resql/analytics/POST/set-odp-settings.sql diff --git a/DSL/Resql/status-all-chats.sql b/DSL/Resql/analytics/POST/status-all-chats.sql similarity index 100% rename from DSL/Resql/status-all-chats.sql rename to DSL/Resql/analytics/POST/status-all-chats.sql diff --git a/DSL/Resql/status-csa-chats.sql b/DSL/Resql/analytics/POST/status-csa-chats.sql similarity index 100% rename from DSL/Resql/status-csa-chats.sql rename to DSL/Resql/analytics/POST/status-csa-chats.sql diff --git a/DSL/Resql/testing.sql b/DSL/Resql/analytics/POST/testing.sql similarity index 100% rename from DSL/Resql/testing.sql rename to DSL/Resql/analytics/POST/testing.sql diff --git a/DSL/Resql/update-overview-metric-preferences.sql b/DSL/Resql/analytics/POST/update-overview-metric-preferences.sql similarity index 100% rename from DSL/Resql/update-overview-metric-preferences.sql rename to DSL/Resql/analytics/POST/update-overview-metric-preferences.sql diff --git a/DSL/Resql/update-user-page-preferences.sql b/DSL/Resql/analytics/POST/update-user-page-preferences.sql similarity index 89% rename from DSL/Resql/update-user-page-preferences.sql rename to DSL/Resql/analytics/POST/update-user-page-preferences.sql index 9fe775f5..95f1c95c 100644 --- a/DSL/Resql/update-user-page-preferences.sql +++ b/DSL/Resql/analytics/POST/update-user-page-preferences.sql @@ -1,2 +1,2 @@ INSERT INTO user_page_preferences (user_id, page_name, page_results,created) -VALUES (:user_id, :page_name, :page_results,:created::timestamp with time zone); \ No newline at end of file +VALUES (:user_id, :page_name, :page_results,:created::timestamp with time zone); diff --git a/DSL/Resql/analytics/POST/use-nonce.sql b/DSL/Resql/analytics/POST/use-nonce.sql new file mode 100644 index 00000000..52fd662e --- /dev/null +++ b/DSL/Resql/analytics/POST/use-nonce.sql @@ -0,0 +1 @@ +update request_nonces set used_at = now() where nonce = :updated_nonce and used_at is null returning nonce; diff --git a/DSL/Ruuter/GET/.guard b/DSL/Ruuter/GET/.guard deleted file mode 100644 index faac86f6..00000000 --- a/DSL/Ruuter/GET/.guard +++ /dev/null @@ -1,28 +0,0 @@ -check_for_cookie: - switch: - - condition: ${incoming.headers == null || incoming.headers.cookie == null} - next: guard_fail - next: authenticate - -authenticate: - template: check-user-authority - requestType: templates - headers: - cookie: ${incoming.headers.cookie} - result: authority_result - -check_authority_result: - switch: - - condition: ${authority_result !== "false"} - next: guard_success - next: guard_fail - -guard_success: - return: "success" - status: 200 - next: end - -guard_fail: - return: "unauthorized" - status: 200 - next: end diff --git a/DSL/Ruuter/POST/.guard b/DSL/Ruuter/POST/.guard deleted file mode 100644 index faac86f6..00000000 --- a/DSL/Ruuter/POST/.guard +++ /dev/null @@ -1,28 +0,0 @@ -check_for_cookie: - switch: - - condition: ${incoming.headers == null || incoming.headers.cookie == null} - next: guard_fail - next: authenticate - -authenticate: - template: check-user-authority - requestType: templates - headers: - cookie: ${incoming.headers.cookie} - result: authority_result - -check_authority_result: - switch: - - condition: ${authority_result !== "false"} - next: guard_success - next: guard_fail - -guard_success: - return: "success" - status: 200 - next: end - -guard_fail: - return: "unauthorized" - status: 200 - next: end diff --git a/DSL/Ruuter/analytics/GET/.guard b/DSL/Ruuter/analytics/GET/.guard new file mode 100644 index 00000000..a42339c0 --- /dev/null +++ b/DSL/Ruuter/analytics/GET/.guard @@ -0,0 +1,61 @@ +process_request: + switch: + - condition: ${ incoming.headers['x-ruuter-nonce'] != null } + next: verify_header_nonce + - condition: ${ incoming.params['ruuter-nonce'] != null } + next: verify_param_nonce + - condition: ${incoming.headers == null || incoming.headers.cookie == null} + next: guard_fail + next: authenticate + +verify_header_nonce: + call: http.post + args: + url: "[#ANALYTICS_RESQL]/use-nonce" + body: + updated_nonce: ${incoming.headers['x-ruuter-nonce']} + result: nonce_response + next: check_inline + +verify_param_nonce: + call: http.post + args: + url: "[#ANALYTICS_RESQL]/use-nonce" + body: + updated_nonce: ${incoming.params['ruuter-nonce']} + result: nonce_response + next: check_inline + +check_inline: + inline: extAuth + result: extauth + +check_nonce: + switch: + - condition: ${ !extauth || (nonce_response.response.body[0] == null) } + next: guard_fail + next: guard_success + +authenticate: + template: "[#ANALYTICS_PROJECT_LAYER]/check-user-authority" + requestType: templates + headers: + cookie: ${incoming.headers.cookie} + result: authority_result + next: check_authority_result + +check_authority_result: + switch: + - condition: ${authority_result !== "false"} + next: guard_success + next: guard_fail + +guard_success: + return: "success" + status: 200 + next: end + +guard_fail: + return: "unauthorized" + status: 403 + next: end diff --git a/DSL/Ruuter/GET/accounts/get-page-preference.yml b/DSL/Ruuter/analytics/GET/accounts/get-page-preference.yml similarity index 100% rename from DSL/Ruuter/GET/accounts/get-page-preference.yml rename to DSL/Ruuter/analytics/GET/accounts/get-page-preference.yml diff --git a/DSL/Ruuter/GET/generic/accounts/customer-support-activity.yml b/DSL/Ruuter/analytics/GET/generic/accounts/customer-support-activity.yml similarity index 100% rename from DSL/Ruuter/GET/generic/accounts/customer-support-activity.yml rename to DSL/Ruuter/analytics/GET/generic/accounts/customer-support-activity.yml diff --git a/DSL/Ruuter/GET/generic/accounts/user-profile-settings.yml b/DSL/Ruuter/analytics/GET/generic/accounts/user-profile-settings.yml similarity index 100% rename from DSL/Ruuter/GET/generic/accounts/user-profile-settings.yml rename to DSL/Ruuter/analytics/GET/generic/accounts/user-profile-settings.yml diff --git a/DSL/Ruuter/GET/generic/accounts/user-role.yml b/DSL/Ruuter/analytics/GET/generic/accounts/user-role.yml similarity index 100% rename from DSL/Ruuter/GET/generic/accounts/user-role.yml rename to DSL/Ruuter/analytics/GET/generic/accounts/user-role.yml diff --git a/DSL/Ruuter/GET/generic/csa/active-chats.yml b/DSL/Ruuter/analytics/GET/generic/csa/active-chats.yml similarity index 100% rename from DSL/Ruuter/GET/generic/csa/active-chats.yml rename to DSL/Ruuter/analytics/GET/generic/csa/active-chats.yml diff --git a/DSL/Ruuter/GET/generic/userinfo.yml b/DSL/Ruuter/analytics/GET/generic/userinfo.yml similarity index 100% rename from DSL/Ruuter/GET/generic/userinfo.yml rename to DSL/Ruuter/analytics/GET/generic/userinfo.yml diff --git a/DSL/Ruuter/GET/metrics/intents.yml b/DSL/Ruuter/analytics/GET/metrics/intents.yml similarity index 100% rename from DSL/Ruuter/GET/metrics/intents.yml rename to DSL/Ruuter/analytics/GET/metrics/intents.yml diff --git a/DSL/Ruuter/GET/negative-feedback.yml b/DSL/Ruuter/analytics/GET/negative-feedback.yml similarity index 100% rename from DSL/Ruuter/GET/negative-feedback.yml rename to DSL/Ruuter/analytics/GET/negative-feedback.yml diff --git a/DSL/Ruuter/GET/odp/dataset.yml b/DSL/Ruuter/analytics/GET/odp/dataset.yml similarity index 100% rename from DSL/Ruuter/GET/odp/dataset.yml rename to DSL/Ruuter/analytics/GET/odp/dataset.yml diff --git a/DSL/Ruuter/GET/odp/scheduled-reports.yml b/DSL/Ruuter/analytics/GET/odp/scheduled-reports.yml similarity index 100% rename from DSL/Ruuter/GET/odp/scheduled-reports.yml rename to DSL/Ruuter/analytics/GET/odp/scheduled-reports.yml diff --git a/DSL/Ruuter/GET/odp/settings.yml b/DSL/Ruuter/analytics/GET/odp/settings.yml similarity index 100% rename from DSL/Ruuter/GET/odp/settings.yml rename to DSL/Ruuter/analytics/GET/odp/settings.yml diff --git a/DSL/Ruuter/GET/odp/values.yml b/DSL/Ruuter/analytics/GET/odp/values.yml similarity index 100% rename from DSL/Ruuter/GET/odp/values.yml rename to DSL/Ruuter/analytics/GET/odp/values.yml diff --git a/DSL/Ruuter/GET/overview/metrics.yml b/DSL/Ruuter/analytics/GET/overview/metrics.yml similarity index 100% rename from DSL/Ruuter/GET/overview/metrics.yml rename to DSL/Ruuter/analytics/GET/overview/metrics.yml diff --git a/DSL/Ruuter/GET/overview/preferences.yml b/DSL/Ruuter/analytics/GET/overview/preferences.yml similarity index 100% rename from DSL/Ruuter/GET/overview/preferences.yml rename to DSL/Ruuter/analytics/GET/overview/preferences.yml diff --git a/DSL/Ruuter/GET/testing.yml b/DSL/Ruuter/analytics/GET/testing.yml similarity index 100% rename from DSL/Ruuter/GET/testing.yml rename to DSL/Ruuter/analytics/GET/testing.yml diff --git a/DSL/Ruuter/analytics/POST/.guard b/DSL/Ruuter/analytics/POST/.guard new file mode 100644 index 00000000..a42339c0 --- /dev/null +++ b/DSL/Ruuter/analytics/POST/.guard @@ -0,0 +1,61 @@ +process_request: + switch: + - condition: ${ incoming.headers['x-ruuter-nonce'] != null } + next: verify_header_nonce + - condition: ${ incoming.params['ruuter-nonce'] != null } + next: verify_param_nonce + - condition: ${incoming.headers == null || incoming.headers.cookie == null} + next: guard_fail + next: authenticate + +verify_header_nonce: + call: http.post + args: + url: "[#ANALYTICS_RESQL]/use-nonce" + body: + updated_nonce: ${incoming.headers['x-ruuter-nonce']} + result: nonce_response + next: check_inline + +verify_param_nonce: + call: http.post + args: + url: "[#ANALYTICS_RESQL]/use-nonce" + body: + updated_nonce: ${incoming.params['ruuter-nonce']} + result: nonce_response + next: check_inline + +check_inline: + inline: extAuth + result: extauth + +check_nonce: + switch: + - condition: ${ !extauth || (nonce_response.response.body[0] == null) } + next: guard_fail + next: guard_success + +authenticate: + template: "[#ANALYTICS_PROJECT_LAYER]/check-user-authority" + requestType: templates + headers: + cookie: ${incoming.headers.cookie} + result: authority_result + next: check_authority_result + +check_authority_result: + switch: + - condition: ${authority_result !== "false"} + next: guard_success + next: guard_fail + +guard_success: + return: "success" + status: 200 + next: end + +guard_fail: + return: "unauthorized" + status: 403 + next: end diff --git a/DSL/Ruuter/POST/accounts/update-page-preference.yml b/DSL/Ruuter/analytics/POST/accounts/update-page-preference.yml similarity index 100% rename from DSL/Ruuter/POST/accounts/update-page-preference.yml rename to DSL/Ruuter/analytics/POST/accounts/update-page-preference.yml diff --git a/DSL/Ruuter/POST/agents/avg-active.yml b/DSL/Ruuter/analytics/POST/agents/avg-active.yml similarity index 100% rename from DSL/Ruuter/POST/agents/avg-active.yml rename to DSL/Ruuter/analytics/POST/agents/avg-active.yml diff --git a/DSL/Ruuter/POST/agents/chats/avg-time-picking-up.yml b/DSL/Ruuter/analytics/POST/agents/chats/avg-time-picking-up.yml similarity index 100% rename from DSL/Ruuter/POST/agents/chats/avg-time-picking-up.yml rename to DSL/Ruuter/analytics/POST/agents/chats/avg-time-picking-up.yml diff --git a/DSL/Ruuter/POST/agents/chats/avg-time.yml b/DSL/Ruuter/analytics/POST/agents/chats/avg-time.yml similarity index 100% rename from DSL/Ruuter/POST/agents/chats/avg-time.yml rename to DSL/Ruuter/analytics/POST/agents/chats/avg-time.yml diff --git a/DSL/Ruuter/POST/agents/chats/forwards.yml b/DSL/Ruuter/analytics/POST/agents/chats/forwards.yml similarity index 100% rename from DSL/Ruuter/POST/agents/chats/forwards.yml rename to DSL/Ruuter/analytics/POST/agents/chats/forwards.yml diff --git a/DSL/Ruuter/POST/agents/chats/messages/all.yml b/DSL/Ruuter/analytics/POST/agents/chats/messages/all.yml similarity index 100% rename from DSL/Ruuter/POST/agents/chats/messages/all.yml rename to DSL/Ruuter/analytics/POST/agents/chats/messages/all.yml diff --git a/DSL/Ruuter/POST/agents/chats/total.yml b/DSL/Ruuter/analytics/POST/agents/chats/total.yml similarity index 100% rename from DSL/Ruuter/POST/agents/chats/total.yml rename to DSL/Ruuter/analytics/POST/agents/chats/total.yml diff --git a/DSL/Ruuter/POST/auth/.guard b/DSL/Ruuter/analytics/POST/auth/.guard similarity index 100% rename from DSL/Ruuter/POST/auth/.guard rename to DSL/Ruuter/analytics/POST/auth/.guard diff --git a/DSL/Ruuter/POST/auth/login.yml b/DSL/Ruuter/analytics/POST/auth/login.yml similarity index 100% rename from DSL/Ruuter/POST/auth/login.yml rename to DSL/Ruuter/analytics/POST/auth/login.yml diff --git a/DSL/Ruuter/POST/bots/avg-response-speed.yml b/DSL/Ruuter/analytics/POST/bots/avg-response-speed.yml similarity index 100% rename from DSL/Ruuter/POST/bots/avg-response-speed.yml rename to DSL/Ruuter/analytics/POST/bots/avg-response-speed.yml diff --git a/DSL/Ruuter/POST/bots/avg-sessions-time.yml b/DSL/Ruuter/analytics/POST/bots/avg-sessions-time.yml similarity index 100% rename from DSL/Ruuter/POST/bots/avg-sessions-time.yml rename to DSL/Ruuter/analytics/POST/bots/avg-sessions-time.yml diff --git a/DSL/Ruuter/POST/bots/intents.yml b/DSL/Ruuter/analytics/POST/bots/intents.yml similarity index 100% rename from DSL/Ruuter/POST/bots/intents.yml rename to DSL/Ruuter/analytics/POST/bots/intents.yml diff --git a/DSL/Ruuter/POST/bots/pct-correctly-understood.yml b/DSL/Ruuter/analytics/POST/bots/pct-correctly-understood.yml similarity index 100% rename from DSL/Ruuter/POST/bots/pct-correctly-understood.yml rename to DSL/Ruuter/analytics/POST/bots/pct-correctly-understood.yml diff --git a/DSL/Ruuter/POST/chats/avg-duration.yml b/DSL/Ruuter/analytics/POST/chats/avg-duration.yml similarity index 100% rename from DSL/Ruuter/POST/chats/avg-duration.yml rename to DSL/Ruuter/analytics/POST/chats/avg-duration.yml diff --git a/DSL/Ruuter/POST/chats/avg-median-waiting-time.yml b/DSL/Ruuter/analytics/POST/chats/avg-median-waiting-time.yml similarity index 100% rename from DSL/Ruuter/POST/chats/avg-median-waiting-time.yml rename to DSL/Ruuter/analytics/POST/chats/avg-median-waiting-time.yml diff --git a/DSL/Ruuter/POST/chats/avg-num-of-messages.yml b/DSL/Ruuter/analytics/POST/chats/avg-num-of-messages.yml similarity index 100% rename from DSL/Ruuter/POST/chats/avg-num-of-messages.yml rename to DSL/Ruuter/analytics/POST/chats/avg-num-of-messages.yml diff --git a/DSL/Ruuter/POST/chats/contact-information-fulfilled.yml b/DSL/Ruuter/analytics/POST/chats/contact-information-fulfilled.yml similarity index 98% rename from DSL/Ruuter/POST/chats/contact-information-fulfilled.yml rename to DSL/Ruuter/analytics/POST/chats/contact-information-fulfilled.yml index 3147512a..8878fca4 100644 --- a/DSL/Ruuter/POST/chats/contact-information-fulfilled.yml +++ b/DSL/Ruuter/analytics/POST/chats/contact-information-fulfilled.yml @@ -161,7 +161,7 @@ all_csas_away_for_total: get_total: call: http.post args: - url: "[#ANALYTICS_DMAPPER]/hbs/analytics/merge-arrays" + url: "[#ANALYTICS_DMAPPER_HBS]/merge-arrays" headers: type: 'json' body: diff --git a/DSL/Ruuter/POST/chats/get.yml b/DSL/Ruuter/analytics/POST/chats/get.yml similarity index 100% rename from DSL/Ruuter/POST/chats/get.yml rename to DSL/Ruuter/analytics/POST/chats/get.yml diff --git a/DSL/Ruuter/POST/chats/idle-count.yml b/DSL/Ruuter/analytics/POST/chats/idle-count.yml similarity index 100% rename from DSL/Ruuter/POST/chats/idle-count.yml rename to DSL/Ruuter/analytics/POST/chats/idle-count.yml diff --git a/DSL/Ruuter/POST/chats/status.yml b/DSL/Ruuter/analytics/POST/chats/status.yml similarity index 100% rename from DSL/Ruuter/POST/chats/status.yml rename to DSL/Ruuter/analytics/POST/chats/status.yml diff --git a/DSL/Ruuter/POST/chats/total-count.yml b/DSL/Ruuter/analytics/POST/chats/total-count.yml similarity index 100% rename from DSL/Ruuter/POST/chats/total-count.yml rename to DSL/Ruuter/analytics/POST/chats/total-count.yml diff --git a/DSL/Ruuter/POST/csv.yml b/DSL/Ruuter/analytics/POST/csv.yml similarity index 94% rename from DSL/Ruuter/POST/csv.yml rename to DSL/Ruuter/analytics/POST/csv.yml index f7a931cc..370d1fd7 100644 --- a/DSL/Ruuter/POST/csv.yml +++ b/DSL/Ruuter/analytics/POST/csv.yml @@ -27,7 +27,7 @@ check_for_required_parameters: get_csv: call: http.post args: - url: "[#ANALYTICS_DMAPPER]/hbs/analytics/get-csv" + url: "[#ANALYTICS_DMAPPER_HBS]/get-csv" headers: type: 'csv' body: diff --git a/DSL/Ruuter/POST/feedbacks/agents/nps.yml b/DSL/Ruuter/analytics/POST/feedbacks/agents/nps.yml similarity index 100% rename from DSL/Ruuter/POST/feedbacks/agents/nps.yml rename to DSL/Ruuter/analytics/POST/feedbacks/agents/nps.yml diff --git a/DSL/Ruuter/POST/feedbacks/avg.yml b/DSL/Ruuter/analytics/POST/feedbacks/avg.yml similarity index 100% rename from DSL/Ruuter/POST/feedbacks/avg.yml rename to DSL/Ruuter/analytics/POST/feedbacks/avg.yml diff --git a/DSL/Ruuter/POST/feedbacks/negative.yml b/DSL/Ruuter/analytics/POST/feedbacks/negative.yml similarity index 100% rename from DSL/Ruuter/POST/feedbacks/negative.yml rename to DSL/Ruuter/analytics/POST/feedbacks/negative.yml diff --git a/DSL/Ruuter/POST/feedbacks/nps.yml b/DSL/Ruuter/analytics/POST/feedbacks/nps.yml similarity index 100% rename from DSL/Ruuter/POST/feedbacks/nps.yml rename to DSL/Ruuter/analytics/POST/feedbacks/nps.yml diff --git a/DSL/Ruuter/POST/generic/login-user.yml b/DSL/Ruuter/analytics/POST/generic/login-user.yml similarity index 100% rename from DSL/Ruuter/POST/generic/login-user.yml rename to DSL/Ruuter/analytics/POST/generic/login-user.yml diff --git a/DSL/Ruuter/POST/odp/dataset.yml b/DSL/Ruuter/analytics/POST/odp/dataset.yml similarity index 100% rename from DSL/Ruuter/POST/odp/dataset.yml rename to DSL/Ruuter/analytics/POST/odp/dataset.yml diff --git a/DSL/Ruuter/POST/odp/delete-cron-job-task.yml b/DSL/Ruuter/analytics/POST/odp/delete-cron-job-task.yml similarity index 100% rename from DSL/Ruuter/POST/odp/delete-cron-job-task.yml rename to DSL/Ruuter/analytics/POST/odp/delete-cron-job-task.yml diff --git a/DSL/Ruuter/POST/odp/delete-scheduled-report.yml b/DSL/Ruuter/analytics/POST/odp/delete-scheduled-report.yml similarity index 100% rename from DSL/Ruuter/POST/odp/delete-scheduled-report.yml rename to DSL/Ruuter/analytics/POST/odp/delete-scheduled-report.yml diff --git a/DSL/Ruuter/POST/odp/delete-settings.yml b/DSL/Ruuter/analytics/POST/odp/delete-settings.yml similarity index 100% rename from DSL/Ruuter/POST/odp/delete-settings.yml rename to DSL/Ruuter/analytics/POST/odp/delete-settings.yml diff --git a/DSL/Ruuter/POST/odp/download.yml b/DSL/Ruuter/analytics/POST/odp/download.yml similarity index 96% rename from DSL/Ruuter/POST/odp/download.yml rename to DSL/Ruuter/analytics/POST/odp/download.yml index 6e6bd69b..7033e50f 100644 --- a/DSL/Ruuter/POST/odp/download.yml +++ b/DSL/Ruuter/analytics/POST/odp/download.yml @@ -37,7 +37,7 @@ get_metrics: convert_data: call: http.post args: - url: "[#ANALYTICS_DMAPPER]/hbs/analytics/get-metric-rows" + url: "[#ANALYTICS_DMAPPER_HBS]/get-metric-rows" headers: type: "json" body: diff --git a/DSL/Ruuter/POST/odp/metrics.yml b/DSL/Ruuter/analytics/POST/odp/metrics.yml similarity index 100% rename from DSL/Ruuter/POST/odp/metrics.yml rename to DSL/Ruuter/analytics/POST/odp/metrics.yml diff --git a/DSL/Ruuter/POST/odp/settings.yml b/DSL/Ruuter/analytics/POST/odp/settings.yml similarity index 100% rename from DSL/Ruuter/POST/odp/settings.yml rename to DSL/Ruuter/analytics/POST/odp/settings.yml diff --git a/DSL/Ruuter/POST/odp/update-scheduled-report.yml b/DSL/Ruuter/analytics/POST/odp/update-scheduled-report.yml similarity index 100% rename from DSL/Ruuter/POST/odp/update-scheduled-report.yml rename to DSL/Ruuter/analytics/POST/odp/update-scheduled-report.yml diff --git a/DSL/Ruuter/POST/odp/upload-scheduled-report.yml b/DSL/Ruuter/analytics/POST/odp/upload-scheduled-report.yml similarity index 100% rename from DSL/Ruuter/POST/odp/upload-scheduled-report.yml rename to DSL/Ruuter/analytics/POST/odp/upload-scheduled-report.yml diff --git a/DSL/Ruuter/POST/odp/upload.yml b/DSL/Ruuter/analytics/POST/odp/upload.yml similarity index 98% rename from DSL/Ruuter/POST/odp/upload.yml rename to DSL/Ruuter/analytics/POST/odp/upload.yml index 0b4ae9ac..27596ef6 100644 --- a/DSL/Ruuter/POST/odp/upload.yml +++ b/DSL/Ruuter/analytics/POST/odp/upload.yml @@ -57,7 +57,7 @@ get_metrics: convert_data: call: http.post args: - url: "[#ANALYTICS_DMAPPER]/hbs/analytics/array-to-object" + url: "[#ANALYTICS_DMAPPER_HBS]/array-to-object" headers: type: "json" body: diff --git a/DSL/Ruuter/POST/overview/preferences.yml b/DSL/Ruuter/analytics/POST/overview/preferences.yml similarity index 100% rename from DSL/Ruuter/POST/overview/preferences.yml rename to DSL/Ruuter/analytics/POST/overview/preferences.yml diff --git a/DSL/Ruuter/POST/reload.yml b/DSL/Ruuter/analytics/POST/reload.yml similarity index 100% rename from DSL/Ruuter/POST/reload.yml rename to DSL/Ruuter/analytics/POST/reload.yml diff --git a/DSL/Ruuter/POST/saveJsonToYml.yml b/DSL/Ruuter/analytics/POST/saveJsonToYml.yml similarity index 100% rename from DSL/Ruuter/POST/saveJsonToYml.yml rename to DSL/Ruuter/analytics/POST/saveJsonToYml.yml diff --git a/DSL/Ruuter/POST/xlsx.yml b/DSL/Ruuter/analytics/POST/xlsx.yml similarity index 100% rename from DSL/Ruuter/POST/xlsx.yml rename to DSL/Ruuter/analytics/POST/xlsx.yml diff --git a/DSL/Ruuter/TEMPLATES/check-user-authority.yml b/DSL/Ruuter/analytics/TEMPLATES/check-user-authority.yml similarity index 100% rename from DSL/Ruuter/TEMPLATES/check-user-authority.yml rename to DSL/Ruuter/analytics/TEMPLATES/check-user-authority.yml diff --git a/GUI/.env.development b/GUI/.env.development index 449b95e2..4d3da02e 100644 --- a/GUI/.env.development +++ b/GUI/.env.development @@ -1,6 +1,6 @@ -REACT_APP_API_URL=http://localhost:8080 -REACT_APP_RUUTER_API_URL=http://localhost:8080 -REACT_APP_RUUTER_V2_ANALYTICS_API_URL=http://localhost:8080 +REACT_APP_API_URL=http://localhost:8080/analytics +REACT_APP_RUUTER_API_URL=http://localhost:8080/analytics +REACT_APP_RUUTER_V2_ANALYTICS_API_URL=http://localhost:8080/analytics REACT_APP_OPENSEARCH_DASHBOARD_URL=https://opensearch.org/ REACT_APP_OPENDATAPORT_URL=https://avaandmed.eesti.ee REACT_APP_MENU_URL=https://admin.dev.buerokratt.ee @@ -9,8 +9,8 @@ REACT_APP_APP_PORT=3001 REACT_APP_NOTIFICATION_NODE_URL=http://localhost:4040 REACT_APP_LOCAL=true REACT_APP_BASE_API_PATH=/al -REACT_APP_AUTH_BASE_URL=http://localhost:8080 -REACT_APP_DOCKER_RUUTER=http://ruuter:8080 +REACT_APP_AUTH_BASE_URL=http://localhost:8080/analytics +REACT_APP_DOCKER_RUUTER=http://ruuter:8080/analytics REACT_APP_CUSTOMER_SERVICE_LOGIN=http://localhost:3004/et/dev-auth REACT_APP_CONVERSATIONS_BASE_URL=http://localhost:8080/chat REACT_APP_TRAINING_BASE_URL=http://localhost:8080/training @@ -19,7 +19,7 @@ REACT_APP_SERVICES_BASE_URL=http://localhost:8080/services REACT_APP_SETTINGS_BASE_URL=http://localhost:8080/settings REACT_APP_MONITORING_BASE_URL=http://localhost:8080/monitoring REACT_APP_SERVICE_ID=analytics -REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8080 +REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8080/analytics REACT_APP_CSP="upgrade-insecure-requests; default-src 'self'; font-src 'self' data:; img-src 'self' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self' http://localhost:8080 http://localhost:8085 https://admin.dev.buerokratt.ee/chat/menu.json;" REACT_APP_ENABLE_HIDDEN_FEATURES=TRUE REACT_APP_MENU_JSON=[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ootel","en":"Pending"},"path":"/pending"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Reeglid","en":"Rules"},"path":"/training/rules"},{"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Nõustajad","en":"Advisors"},"path":"/advisors"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Automatic Teenused","en":"Automatic Services"},"path":"/auto-services"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"}]},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"}]},{"id":"monitoring","label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}] diff --git a/constants.ini b/constants.ini index 804869a7..9bd47d69 100644 --- a/constants.ini +++ b/constants.ini @@ -1,11 +1,15 @@ [DSL] -ANALYTICS_RESQL=http://resql:8082 +ANALYTICS_RESQL=http://resql:8082/analytics -ANALYTICS_RUUTER=http://ruuter:8080 +ANALYTICS_RUUTER=http://ruuter:8080/analytics ANALYTICS_DMAPPER=http://dmapper:3000 +ANALYTICS_DMAPPER_HBS=http://dmapper:3000/hbs/analytics + +ANALYTICS_PROJECT_LAYER=analytics + ANALYTICS_OPEN_DATA_SERVICE=https://avaandmed.eesti.ee ANALYTICS_TIM=http://tim:8085 diff --git a/docker-compose.yml b/docker-compose.yml index 4b245bac..fb028dfd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: - application.logging.displayRequestContent=true - application.logging.displayResponseContent=true - application.logging.printStackTrace=true + - application.internalRequests.disabled=true volumes: - ./DSL/Ruuter:/DSL - ./constants.ini:/app/constants.ini @@ -34,7 +35,7 @@ services: ports: - 8082:8082 volumes: - - ./DSL/Resql:/workspace/app/templates/byk + - ./DSL/Resql:/DSL networks: - bykstack @@ -57,20 +58,20 @@ services: environment: - NODE_ENV=development - CHOKIDAR_USEPOLLING=true - - REACT_APP_API_URL=http://localhost:8080 + - REACT_APP_API_URL=http://localhost:8080/analytics - REACT_APP_OPENSEARCH_DASHBOARD_URL=https://opensearch.org/ - REACT_APP_OPENDATAPORT_URL=https://avaandmed.eesti.ee - - REACT_APP_RUUTER_API_URL=http://localhost:8080 - - REACT_APP_RUUTER_V2_ANALYTICS_API_URL=http://localhost:8080 + - REACT_APP_RUUTER_API_URL=http://localhost:8080/analytics + - REACT_APP_RUUTER_V2_ANALYTICS_API_URL=http://localhost:8080/analytics - REACT_APP_MENU_URL=https://admin.dev.buerokratt.ee - REACT_APP_MENU_PATH=/chat/menu.json - - REACT_APP_AUTH_BASE_URL=http://localhost:8080 + - REACT_APP_AUTH_BASE_URL=http://localhost:8080/analytics - REACT_APP_APP_PORT=3001 - REACT_APP_LOCAL=true - REACT_APP_BASE_API_PATH=/ - PORT=3001 - - REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8080 - - REACT_APP_DOCKER_RUUTER=http://ruuter:8080 + - REACT_APP_RUUTER_PRIVATE_API_URL=http://localhost:8080/analytics + - REACT_APP_DOCKER_RUUTER=http://ruuter:8080/analytics - REACT_APP_CUSTOMER_SERVICE_LOGIN=http://localhost:3004/et/dev-auth - REACT_APP_CONVERSATIONS_BASE_URL=http://localhost:8080/chat - REACT_APP_TRAINING_BASE_URL=http://localhost:8080/training @@ -102,8 +103,8 @@ services: image: data-mapper volumes: - ./DSL:/data - - ./DSL/DMapper/hbs:/workspace/app/views/analytics - - ./DSL/DMapper/js:/workspace/app/js/analytics + - ./DSL/DMapper/analytics/hbs:/workspace/app/views/analytics + - ./DSL/DMapper/analytics/js:/workspace/app/js/analytics environment: - PORT=3000 - CONTENT_FOLDER=/data