|
@@ -7,8 +7,6 @@ class AllocationService {
|
|
|
BASE_URL = process.env.BASE_URL || 'http://localhost:9090/allocation';
|
|
BASE_URL = process.env.BASE_URL || 'http://localhost:9090/allocation';
|
|
|
|
|
|
|
|
async fetchAllocation(win, aggregate, options) {
|
|
async fetchAllocation(win, aggregate, options) {
|
|
|
- const url = process.env.BASE_URL ?? "";
|
|
|
|
|
- const baseUrl = `${url}${this.BASE_PATH}`;
|
|
|
|
|
const { accumulate, filters, } = options;
|
|
const { accumulate, filters, } = options;
|
|
|
const params = {
|
|
const params = {
|
|
|
window: win,
|
|
window: win,
|
|
@@ -18,7 +16,7 @@ class AllocationService {
|
|
|
if (typeof accumulate === 'boolean') {
|
|
if (typeof accumulate === 'boolean') {
|
|
|
params.accumulate = accumulate;
|
|
params.accumulate = accumulate;
|
|
|
}
|
|
}
|
|
|
- const result = await axios.get(`${baseUrl}/compute`, { params });
|
|
|
|
|
|
|
+ const result = await axios.get(`${this.BASE_URL}/compute`, { params });
|
|
|
return result.data;
|
|
return result.data;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|