Alexey Velikiy
3 years ago
4 changed files with 19 additions and 14 deletions
@ -0,0 +1,8 @@
|
||||
import { ChartwerkLineChart, LineOptions, LineTimeSerie } from "@chartwerk/line-pod"; |
||||
|
||||
export class HasticPod extends ChartwerkLineChart { |
||||
constructor(el: HTMLElement, series?: LineTimeSerie[], options?: LineOptions) { |
||||
super(el, series, options) |
||||
} |
||||
|
||||
} |
@ -1,10 +0,0 @@
|
||||
export default function authHeader() { |
||||
let user = JSON.parse(localStorage.getItem('user')!); |
||||
|
||||
if (user && user.accessToken) { |
||||
return { Authorization: 'Bearer ' + user.accessToken }; |
||||
} else { |
||||
return {}; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,9 @@
|
||||
import { API_URL } from "@/config"; |
||||
import axios from 'axios'; |
||||
|
||||
const METRICS_API_URL = API_URL + "metrics"; |
||||
|
||||
export default async function getMetrics(from: number, to: number, step: number) { |
||||
let uri = METRICS_API_URL + `?from=${from}`; |
||||
let res = axios.get(METRICS_API_URL); |
||||
} |
Loading…
Reference in new issue