Răsfoiți Sursa

setting default API path if the placeholder is not overwritten

Signed-off-by: Logan Ballard <loganballard@gmail.com>
Logan Ballard 3 ani în urmă
părinte
comite
9b49b0aede
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      ui/src/services/allocation.js

+ 4 - 0
ui/src/services/allocation.js

@@ -4,6 +4,10 @@ class AllocationService {
   BASE_URL = process.env.BASE_URL || '{PLACEHOLDER_BASE_URL}';
 
   async fetchAllocation(win, aggregate, options) {
+    if (this.BASE_URL === '{PLACEHOLDER_BASE_URL}') {
+      this.BASE_URL = `http://localhost:9090/model`
+    }
+    
     const { accumulate, filters, } = options;
     const params = {
       window: win,