From e97e5c663955fa0cfac5dca251fd582555704127 Mon Sep 17 00:00:00 2001 From: Jordi Martin Date: Sat, 7 Sep 2024 01:24:43 +0200 Subject: [PATCH] Added the mapping view (#188) --- UI/src/components/MainMenu.vue | 4 +- UI/src/services/api.js | 6 +- UI/src/views/MappingView.vue | 116 ++++++------------ go.mod | 10 +- go.sum | 12 ++ internal/console/dispatcher.go | 2 + ...View-7cs1UiRO.js => AboutView-8P2Yqvj2.js} | 2 +- .../console/ui/assets/MappingView-D2MGjTJV.js | 26 ++++ .../console/ui/assets/MappingView-RdhlM1JC.js | 26 ---- ...w-Da7IQpsl.js => RequestsView-DPw6OG1g.js} | 2 +- internal/console/ui/assets/index-D0qSQT8L.css | 1 + .../{index-Cnh1JEZy.js => index-IwRc_rfk.js} | 66 +++++----- internal/console/ui/assets/index-hGrPqKGM.css | 1 - internal/console/ui/index.html | 4 +- 14 files changed, 131 insertions(+), 147 deletions(-) rename internal/console/ui/assets/{AboutView-7cs1UiRO.js => AboutView-8P2Yqvj2.js} (99%) create mode 100644 internal/console/ui/assets/MappingView-D2MGjTJV.js delete mode 100644 internal/console/ui/assets/MappingView-RdhlM1JC.js rename internal/console/ui/assets/{RequestsView-Da7IQpsl.js => RequestsView-DPw6OG1g.js} (99%) create mode 100644 internal/console/ui/assets/index-D0qSQT8L.css rename internal/console/ui/assets/{index-Cnh1JEZy.js => index-IwRc_rfk.js} (65%) delete mode 100644 internal/console/ui/assets/index-hGrPqKGM.css diff --git a/UI/src/components/MainMenu.vue b/UI/src/components/MainMenu.vue index 5db955d..acd6d2e 100644 --- a/UI/src/components/MainMenu.vue +++ b/UI/src/components/MainMenu.vue @@ -24,12 +24,12 @@ Request Monitor - +
  • diff --git a/UI/src/services/api.js b/UI/src/services/api.js index 48349fa..3dbd44e 100644 --- a/UI/src/services/api.js +++ b/UI/src/services/api.js @@ -1,6 +1,10 @@ import axios from 'axios'; -const API_URL = window.location.protocol + "//" + location.host + "/api"; +//if it's on devmode +let API_URL = window.location.protocol + "//" + location.host + "/api"; +if (process.env.NODE_ENV === 'development') { + API_URL = "http://localhost:8082/api"; +} export const getMockDefinitions = async () => { try { diff --git a/UI/src/views/MappingView.vue b/UI/src/views/MappingView.vue index a519346..4cd01d4 100644 --- a/UI/src/views/MappingView.vue +++ b/UI/src/views/MappingView.vue @@ -67,79 +67,45 @@

    No Mocks

    Get started by creating a new mock.

    -
    - -
    - -