From 236fc7d7396e68ab4e06146bef680d333222b468 Mon Sep 17 00:00:00 2001 From: Yury Molodov Date: Fri, 6 Aug 2021 12:06:08 +0300 Subject: [PATCH] vmui: fix layout and add server url by default (#1519) * fix: change layout for correctly display big query * fix: set default server from url * fix: change get default server url --- app/vmui/packages/vmui/src/components/Home/HomeLayout.tsx | 5 +++-- app/vmui/packages/vmui/src/state/common/reducer.ts | 4 +++- app/vmui/packages/vmui/src/utils/default-server-url.ts | 6 ++++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 app/vmui/packages/vmui/src/utils/default-server-url.ts diff --git a/app/vmui/packages/vmui/src/components/Home/HomeLayout.tsx b/app/vmui/packages/vmui/src/components/Home/HomeLayout.tsx index 309d764f36..bf523b9a3d 100644 --- a/app/vmui/packages/vmui/src/components/Home/HomeLayout.tsx +++ b/app/vmui/packages/vmui/src/components/Home/HomeLayout.tsx @@ -50,17 +50,18 @@ const HomeLayout: FC = () => { - + - + {isLoading && { + const {href} = window.location; + const regexp = /^http.+\/vmui/; + const [result] = href.match(regexp) || ["https://"]; + return result.replace("vmui", "prometheus"); +}; \ No newline at end of file