mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-21 06:32:18 +00:00
I broke the topflix page lol
This commit is contained in:
parent
d9515e7d5b
commit
9f15be43c0
3 changed files with 6 additions and 6 deletions
|
|
@ -85,7 +85,7 @@ function ConfigValue(props: {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getRecentPlayedItems() {
|
async function getRecentPlayedItems() {
|
||||||
const response = await fetch(BACKEND_URL);
|
const response = await fetch(`${BACKEND_URL}/metrics`);
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
|
|
||||||
const regex =
|
const regex =
|
||||||
|
|
@ -119,7 +119,7 @@ async function getRecentPlayedItems() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTotalViews() {
|
async function getTotalViews() {
|
||||||
const response = await fetch(BACKEND_URL);
|
const response = await fetch(`${BACKEND_URL}/metrics`);
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
|
|
||||||
// Add up all mw_media_watch_count entries
|
// Add up all mw_media_watch_count entries
|
||||||
|
|
@ -139,7 +139,7 @@ async function getTotalViews() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProcessStartTime(): Promise<string> {
|
function getProcessStartTime(): Promise<string> {
|
||||||
return fetch(BACKEND_URL)
|
return fetch(`${BACKEND_URL}/metrics`)
|
||||||
.then((response) => response.text())
|
.then((response) => response.text())
|
||||||
.then((text) => {
|
.then((text) => {
|
||||||
const regex = /process_start_time_seconds (\d+)/;
|
const regex = /process_start_time_seconds (\d+)/;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ function ConfigValue(props: { name: string; children?: ReactNode }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getTopSources() {
|
async function getTopSources() {
|
||||||
const response = await fetch(BACKEND_URL);
|
const response = await fetch(`${BACKEND_URL}/metrics`);
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
|
|
||||||
const regex =
|
const regex =
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { conf } from "@/setup/config";
|
||||||
import { BACKEND_URL } from "@/setup/constants";
|
import { BACKEND_URL } from "@/setup/constants";
|
||||||
|
|
||||||
async function getAccountNumber() {
|
async function getAccountNumber() {
|
||||||
const response = await fetch(BACKEND_URL);
|
const response = await fetch(`${BACKEND_URL}/metrics`);
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
|
|
||||||
// Adjusted regex to match any hostname
|
// Adjusted regex to match any hostname
|
||||||
|
|
@ -27,7 +27,7 @@ async function getAccountNumber() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAllAccounts() {
|
async function getAllAccounts() {
|
||||||
const response = await fetch(BACKEND_URL);
|
const response = await fetch(`${BACKEND_URL}/metrics`);
|
||||||
const text = await response.text();
|
const text = await response.text();
|
||||||
|
|
||||||
const regex = /mw_user_count{namespace="movie-web"} (\d+)/;
|
const regex = /mw_user_count{namespace="movie-web"} (\d+)/;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue