notification channel fix
This commit is contained in:
1 parent
b4d127c6ce
commit
a236bec6c1
8 files changed
+16
-17
No files matched your search
@@ -3,14 +3,14 @@ import DockerForm from "@/pages/docker/DockerForm";
|
|||||||
|
|
||||||
import { useParams, useNavigate } from "react-router";
|
import { useParams, useNavigate } from "react-router";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { IMonitor } from "@/types/monitor";
|
import type { IMonitor } from "@/types/monitor";
|
||||||
import type { SubmitValues } from "@/pages/docker/DockerForm";
|
import type { SubmitValues } from "@/pages/docker/DockerForm";
|
||||||
|
|
||||||
const DockerConfigurePage = () => {
|
const DockerConfigurePage = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { response: monitorResponse } = useGet<ApiResponse<IMonitor>>(
|
const { response: monitorResponse } = useGet<ApiResponse<IMonitor>>(
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import DockerForm, { type SubmitValues } from "@/pages/docker/DockerForm";
|
|||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import { useGet, usePost } from "@/hooks/UseApi";
|
import { useGet, usePost } from "@/hooks/UseApi";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
|
|
||||||
const DockerCreatePage = () => {
|
const DockerCreatePage = () => {
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { post, loading, error } = usePost<SubmitValues, any>();
|
const { post, loading, error } = usePost<SubmitValues, any>();
|
||||||
@@ -31,4 +31,3 @@ const DockerCreatePage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default DockerCreatePage;
|
export default DockerCreatePage;
|
||||||
|
|
||||||
@@ -4,14 +4,14 @@ import { InfraForm } from "@/pages/infrastructure/InfraForm";
|
|||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { IMonitor } from "@/types/monitor";
|
import type { IMonitor } from "@/types/monitor";
|
||||||
import type { SubmitValues } from "@/pages/infrastructure/InfraForm";
|
import type { SubmitValues } from "@/pages/infrastructure/InfraForm";
|
||||||
|
|
||||||
const InfraConfigurePage = () => {
|
const InfraConfigurePage = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { response: monitorResponse } = useGet<ApiResponse<any>>(
|
const { response: monitorResponse } = useGet<ApiResponse<any>>(
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import { InfraForm } from "@/pages/infrastructure/InfraForm";
|
|||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import { useGet, usePost } from "@/hooks/UseApi";
|
import { useGet, usePost } from "@/hooks/UseApi";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { SubmitValues } from "@/pages/infrastructure/InfraForm";
|
import type { SubmitValues } from "@/pages/infrastructure/InfraForm";
|
||||||
|
|
||||||
const InfraCreatePage = () => {
|
const InfraCreatePage = () => {
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { post, loading, error } = usePost<SubmitValues, any>();
|
const { post, loading, error } = usePost<SubmitValues, any>();
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import { PageSpeedForm } from "@/pages/pagespeed/PageSpeedForm";
|
|||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { IMonitor } from "@/types/monitor";
|
import type { IMonitor } from "@/types/monitor";
|
||||||
import type { SubmitValues } from "@/pages/pagespeed/PageSpeedForm";
|
import type { SubmitValues } from "@/pages/pagespeed/PageSpeedForm";
|
||||||
|
|
||||||
const PageSpeedConfigurePage = () => {
|
const PageSpeedConfigurePage = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { response: monitorResponse } = useGet<ApiResponse<any>>(
|
const { response: monitorResponse } = useGet<ApiResponse<any>>(
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { PageSpeedForm } from "@/pages/pagespeed/PageSpeedForm";
|
|||||||
import { useGet, usePost } from "@/hooks/UseApi";
|
import { useGet, usePost } from "@/hooks/UseApi";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { SubmitValues } from "@/pages/pagespeed/PageSpeedForm";
|
import type { SubmitValues } from "@/pages/pagespeed/PageSpeedForm";
|
||||||
const UptimeCreatePage = () => {
|
const UptimeCreatePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { post, loading, error } = usePost<SubmitValues>();
|
const { post, loading, error } = usePost<SubmitValues>();
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import { UptimeForm } from "@/pages/uptime/UptimeForm";
|
|||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { IMonitor } from "@/types/monitor";
|
import type { IMonitor } from "@/types/monitor";
|
||||||
import type { SubmitValues } from "@/pages/uptime/UptimeForm";
|
import type { SubmitValues } from "@/pages/uptime/UptimeForm";
|
||||||
|
|
||||||
const UptimeConfigurePage = () => {
|
const UptimeConfigurePage = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { response: monitorResponse } = useGet<ApiResponse<IMonitor>>(
|
const { response: monitorResponse } = useGet<ApiResponse<IMonitor>>(
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { UptimeForm } from "./UptimeForm";
|
|||||||
import { useGet, usePost } from "@/hooks/UseApi";
|
import { useGet, usePost } from "@/hooks/UseApi";
|
||||||
import type { ApiResponse } from "@/types/api";
|
import type { ApiResponse } from "@/types/api";
|
||||||
import { useNavigate } from "react-router";
|
import { useNavigate } from "react-router";
|
||||||
import type { INotificationChannel } from "@/types/notification-channel";
|
import type { NotificationChannel } from "@/types/notification-channel";
|
||||||
import type { SubmitValues } from "@/pages/uptime/UptimeForm";
|
import type { SubmitValues } from "@/pages/uptime/UptimeForm";
|
||||||
const UptimeCreatePage = () => {
|
const UptimeCreatePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { response } = useGet<ApiResponse<INotificationChannel[]>>(
|
const { response } = useGet<ApiResponse<NotificationChannel[]>>(
|
||||||
"/notification-channels"
|
"/notification-channels"
|
||||||
);
|
);
|
||||||
const { post, loading, error } = usePost<SubmitValues>();
|
const { post, loading, error } = usePost<SubmitValues>();
|
||||||
|
|||||||
Reference in new issue
Block a user