mirror of
https://github.com/jlengrand/signoz.git
synced 2026-03-10 08:41:20 +00:00
Refactor API endpoint
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -20,6 +20,8 @@ frontend/npm-debug.log*
|
||||
frontend/yarn-debug.log*
|
||||
frontend/yarn-error.log*
|
||||
|
||||
.idea
|
||||
|
||||
**/.vscode
|
||||
*.tgz
|
||||
**/build
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from "axios";
|
||||
import { ENVIRONMENT } from "../constants/env";
|
||||
|
||||
// No auth for the API
|
||||
export default axios.create({
|
||||
baseURL: "https://api.signoz.io/api/prom/api/v1",
|
||||
baseURL: `${ENVIRONMENT.baseURL}/api/prom/api/v1`,
|
||||
});
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import axios from "axios";
|
||||
import { ENVIRONMENT } from "../constants/env";
|
||||
|
||||
export default axios.create({
|
||||
// baseURL: 'http://104.211.113.204:8080/api/v1/',
|
||||
// baseURL: process.env.REACT_APP_QUERY_SERVICE_URL,
|
||||
// console.log('in metrics API', process.env.QUERY_SERVICE_URL)
|
||||
baseURL: "/api/v1/",
|
||||
baseURL: `${ENVIRONMENT.baseURL}/api/v1/`,
|
||||
});
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import axios from "axios";
|
||||
import { ENVIRONMENT } from "../constants/env";
|
||||
|
||||
export default axios.create({
|
||||
// baseURL: 'https://api.telegram.org/bot1518273960:AAHcgVvym9a0Qkl-PKiCI84X1VZaVbkTud0/',
|
||||
// baseURL: 'http://104.211.113.204:8080/api/v1/',
|
||||
baseURL: "/api/v1/",
|
||||
// baseURL: "/api/v1/",
|
||||
baseURL: `${ENVIRONMENT.baseURL}/api/v1/`,
|
||||
});
|
||||
|
||||
//https://api.telegram.org/bot1518273960:AAHcgVvym9a0Qkl-PKiCI84X1VZaVbkTud0/sendMessage?chat_id=351813222&text=Hello%20there
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import axios from "axios";
|
||||
import { ENVIRONMENT } from "../constants/env";
|
||||
//import { format } from 'path';
|
||||
|
||||
export default axios.create({
|
||||
// baseURL: 'http://104.211.113.204:8080/api/v1/' //comment this line and remove this comment before pushing
|
||||
// baseURL: process.env.QUERY_SERVICE_URL,
|
||||
// console.log('in traces API', process.env.QUERY_SERVICE_URL)
|
||||
baseURL: "/api/v1/",
|
||||
// baseURL: "/api/v1/",
|
||||
baseURL: `${ENVIRONMENT.baseURL}/api/v1/`,
|
||||
});
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
export enum MetricQueryParama {
|
||||
time = "time",
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
export enum LocalStorage {
|
||||
export enum LOCAL_STORAGE {
|
||||
metricsTimeDuration = "metricsTimeDuration",
|
||||
}
|
||||
3
frontend/src/constants/env.ts
Normal file
3
frontend/src/constants/env.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const ENVIRONMENT = {
|
||||
baseURL: "http://104.211.113.204:8080"
|
||||
}
|
||||
3
frontend/src/constants/query.ts
Normal file
3
frontend/src/constants/query.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export enum METRICS_PAGE_QUERY_PARAM {
|
||||
time = "time",
|
||||
}
|
||||
Reference in New Issue
Block a user