Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ export const InfraMonitorsTable = ({
navigate(`/infrastructure/configure/${monitor.id}`);
},
},
{
id: 5,
label: t("pages.common.monitors.actions.checkNow"),
action: async () => {
await post(`/monitors/check/${monitor.id}`, {});
refetch();
},
closeMenu: true,
},
{
id: 6,
label:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useTranslation } from "react-i18next";
import useMediaQuery from "@mui/material/useMediaQuery";
import { useTheme } from "@mui/material/styles";
import { useNavigate } from "react-router-dom";
import { usePatch } from "@/Hooks/UseApi";
import { usePatch, usePost } from "@/Hooks/UseApi";

import type { Monitor, MonitorWithChecks } from "@/Types/Monitor";
import type { Tag } from "@/Types/Tag";
Expand Down Expand Up @@ -62,6 +62,7 @@ export const PageSpeedMonitorsTable = ({
// loading: isPatching,
// error: postError,
} = usePatch<any, Monitor>();
const { post } = usePost<Record<string, never>, Monitor>();

const handlePageChange = (
_e: React.MouseEvent<HTMLButtonElement> | null,
Expand Down Expand Up @@ -122,13 +123,15 @@ export const PageSpeedMonitorsTable = ({
navigate(`/pagespeed/configure/${monitor.id}`);
},
},
// {
// id: 5,
// label: "Clone",
// action: () => {

// },
// },
{
id: 5,
label: t("pages.common.monitors.actions.checkNow"),
action: async () => {
await post(`/monitors/check/${monitor.id}`, {});
refetch();
},
closeMenu: true,
},
{
id: 6,
label:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ export const MonitorTable = ({
navigate(`/uptime/configure/${monitor.id}`);
},
},
{
id: 5,
label: t("pages.common.monitors.actions.checkNow"),
action: async () => {
await post(`/monitors/check/${monitor.id}`, {});
refetch();
},
closeMenu: true,
},
{
id: 6,
label:
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "تحديد جميع الشاشات",
"selectMonitor": "تحديد {{name}}",
"bulkSelected_one": "{{count}} شاشة محددة",
"bulkSelected_other": "{{count}} شاشات محددة"
"bulkSelected_other": "{{count}} شاشات محددة",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "نشط منذ",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"bulkSelected_one": "{{count}} monitor seleccionat",
"bulkSelected_other": "{{count}} monitors seleccionats",
"selectAll": "Selecciona tots els monitors",
"selectMonitor": "Selecciona {{name}}"
"selectMonitor": "Selecciona {{name}}",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Actiu des de",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Vybrat všechny monitory",
"selectMonitor": "Vybrat {{name}}",
"bulkSelected_one": "Vybrán {{count}} monitor",
"bulkSelected_other": "Vybráno {{count}} monitorů"
"bulkSelected_other": "Vybráno {{count}} monitorů",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Aktivní po dobu",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Alle Monitore auswählen",
"selectMonitor": "{{name}} auswählen",
"bulkSelected_one": "{{count}} Monitor ausgewählt",
"bulkSelected_other": "{{count}} Monitore ausgewählt"
"bulkSelected_other": "{{count}} Monitore ausgewählt",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Aktiv seit",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@
"bulkSelected_one": "{{count}} monitor selected",
"bulkSelected_other": "{{count}} monitors selected",
"selectAll": "Select all monitors",
"selectMonitor": "Select {{name}}"
"selectMonitor": "Select {{name}}",
"checkNow": "Check now"
},
"bulkPause": {
"alreadyPaused_one": "The selected monitor is already paused",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Seleccionar todos los monitores",
"selectMonitor": "Seleccionar {{name}}",
"bulkSelected_one": "{{count}} monitor seleccionado",
"bulkSelected_other": "{{count}} monitores seleccionados"
"bulkSelected_other": "{{count}} monitores seleccionados",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Activo desde hace",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Valitse kaikki näytöt",
"selectMonitor": "Valitse {{name}}",
"bulkSelected_one": "{{count}} näyttö valittu",
"bulkSelected_other": "{{count}} näyttöä valittu"
"bulkSelected_other": "{{count}} näyttöä valittu",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Aktiivinen",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Sélectionner tous les moniteurs",
"selectMonitor": "Sélectionner {{name}}",
"bulkSelected_one": "{{count}} moniteur sélectionné",
"bulkSelected_other": "{{count}} moniteurs sélectionnés"
"bulkSelected_other": "{{count}} moniteurs sélectionnés",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Actif depuis",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "すべてのモニターを選択",
"selectMonitor": "{{name}} を選択",
"bulkSelected_one": "{{count}} 個のモニターが選択されました",
"bulkSelected_other": "{{count}} 個のモニターが選択されました"
"bulkSelected_other": "{{count}} 個のモニターが選択されました",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "稼働期間",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Selecionar todos os monitores",
"selectMonitor": "Selecionar {{name}}",
"bulkSelected_one": "{{count}} monitor selecionado",
"bulkSelected_other": "{{count}} monitores selecionados"
"bulkSelected_other": "{{count}} monitores selecionados",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Ativo há",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Выбрать все мониторы",
"selectMonitor": "Выбрать {{name}}",
"bulkSelected_one": "Выбран {{count}} монитор",
"bulkSelected_other": "Выбрано {{count}} мониторов"
"bulkSelected_other": "Выбрано {{count}} мониторов",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Активен",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "เลือกจอภาพทั้งหมด",
"selectMonitor": "เลือก {{name}}",
"bulkSelected_one": "เลือกแล้ว {{count}} จอภาพ",
"bulkSelected_other": "เลือกแล้ว {{count}} จอภาพ"
"bulkSelected_other": "เลือกแล้ว {{count}} จอภาพ",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "ทำงานมาแล้ว",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Tüm monitörleri seç",
"selectMonitor": "{{name}}'i seç",
"bulkSelected_one": "{{count}} monitör seçildi",
"bulkSelected_other": "{{count}} monitör seçildi"
"bulkSelected_other": "{{count}} monitör seçildi",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Aktif süresi",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Вибрати всі монітори",
"selectMonitor": "Вибрати {{name}}",
"bulkSelected_one": "Вибрано {{count}} монітор",
"bulkSelected_other": "Вибрано {{count}} моніторів"
"bulkSelected_other": "Вибрано {{count}} моніторів",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Активний протягом",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "Chọn tất cả màn hình",
"selectMonitor": "Chọn {{name}}",
"bulkSelected_one": "Đã chọn {{count}} màn hình",
"bulkSelected_other": "Đã chọn {{count}} màn hình"
"bulkSelected_other": "Đã chọn {{count}} màn hình",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "Hoạt động từ",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "选择所有监视器",
"selectMonitor": "选择 {{name}}",
"bulkSelected_one": "已选择 {{count}} 个监视器",
"bulkSelected_other": "已选择 {{count}} 个监视器"
"bulkSelected_other": "已选择 {{count}} 个监视器",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "已活跃",
Expand Down
3 changes: 2 additions & 1 deletion client/src/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"selectAll": "選擇所有監視器",
"selectMonitor": "選擇 {{name}}",
"bulkSelected_one": "已選擇 {{count}} 個監視器",
"bulkSelected_other": "已選擇 {{count}} 個監視器"
"bulkSelected_other": "已選擇 {{count}} 個監視器",
"checkNow": "Check now"
},
"statBoxes": {
"activeFor": "已啟用",
Expand Down
Loading
Loading