From 675b1cde81e3729a249ad3bce8a001afd444fef8 Mon Sep 17 00:00:00 2001 From: "Yuan (Bob) Gong" Date: Thu, 28 Nov 2019 14:15:04 +0800 Subject: [PATCH] [UI] Get kubeflow namespace from kfp UI (#2655) * Get kubeflow namespace from kfp UI * Add a react context that makes namespace available anywhere. * Move KFP_FLAGS check to index.tsx * Update index.tsx --- frontend/public/index.html | 1 + frontend/server/server.ts | 16 ++++++--- frontend/src/index.tsx | 26 ++++++++++++--- frontend/src/lib/Flags.ts | 11 +++++++ frontend/src/lib/KubeflowClient.tsx | 50 +++++++++++++++++++++++++++++ frontend/tslint.json | 2 +- 6 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 frontend/src/lib/Flags.ts create mode 100644 frontend/src/lib/KubeflowClient.tsx diff --git a/frontend/public/index.html b/frontend/public/index.html index 36ebdc45695..0ccbe720ba3 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -27,6 +27,7 @@ window.KFP_FLAGS={}; window.KFP_FLAGS.DEPLOYMENT=null; +