mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 04:32:32 +00:00
refactor web project structure
This commit is contained in:
@@ -4,33 +4,10 @@ import { createContext, useCallback, useContext, useEffect, useState } from "rea
|
||||
import { useAuth } from "../../contexts/AuthContext";
|
||||
import { api } from "@/lib/api";
|
||||
import { authenticatedFetch, TokenExpiredError } from "@/lib/authenticatedFetch";
|
||||
import type { AdminConfiguration, OpsAlertRule } from "@/types/adminConfig";
|
||||
|
||||
// Re-export for section components
|
||||
export interface AdminConfiguration {
|
||||
partitionKey: string;
|
||||
rowKey: string;
|
||||
lastUpdated: string;
|
||||
updatedBy: string;
|
||||
globalRateLimitRequestsPerMinute: number;
|
||||
platformStatsBlobSasUrl?: string;
|
||||
collectorIdleTimeoutMinutes?: number;
|
||||
maxSessionWindowHours?: number;
|
||||
maintenanceBlockDurationHours?: number;
|
||||
opsEventRetentionDays?: number;
|
||||
diagnosticsGlobalLogPathsJson?: string;
|
||||
customSettings?: string;
|
||||
nvdApiKey?: string;
|
||||
vulnerabilityCorrelationEnabled?: boolean;
|
||||
vulnerabilityDataLastSyncUtc?: string;
|
||||
// Ops Alert settings
|
||||
opsAlertRulesJson?: string;
|
||||
opsAlertTelegramEnabled?: boolean;
|
||||
opsAlertTelegramChatId?: string;
|
||||
opsAlertTeamsEnabled?: boolean;
|
||||
opsAlertTeamsWebhookUrl?: string;
|
||||
opsAlertSlackEnabled?: boolean;
|
||||
opsAlertSlackWebhookUrl?: string;
|
||||
}
|
||||
// Re-export so existing `import { AdminConfiguration } from "../AdminConfigContext"` consumers keep working
|
||||
export type { AdminConfiguration, OpsAlertRule };
|
||||
|
||||
interface AdminConfigContextValue {
|
||||
// Admin config
|
||||
@@ -103,12 +80,6 @@ interface AdminConfigContextValue {
|
||||
import { type DiagnosticsLogPath } from "./components/DiagnosticsLogPathsSection";
|
||||
import { type TenantConfiguration } from "./components/TenantManagementSection";
|
||||
|
||||
export interface OpsAlertRule {
|
||||
eventType: string;
|
||||
minSeverity: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
const AdminConfigContext = createContext<AdminConfigContextValue | null>(null);
|
||||
|
||||
export function useAdminConfig() {
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
"use client";
|
||||
|
||||
interface AdminConfiguration {
|
||||
partitionKey: string;
|
||||
rowKey: string;
|
||||
lastUpdated: string;
|
||||
updatedBy: string;
|
||||
globalRateLimitRequestsPerMinute: number;
|
||||
platformStatsBlobSasUrl?: string;
|
||||
collectorIdleTimeoutMinutes?: number;
|
||||
maxSessionWindowHours?: number;
|
||||
maintenanceBlockDurationHours?: number;
|
||||
opsEventRetentionDays?: number;
|
||||
diagnosticsGlobalLogPathsJson?: string;
|
||||
customSettings?: string;
|
||||
}
|
||||
import type { AdminConfiguration } from "@/types/adminConfig";
|
||||
|
||||
interface AdminConfigSettingsSectionProps {
|
||||
loadingConfig: boolean;
|
||||
|
||||
@@ -4,23 +4,7 @@ import { useCallback, useState } from "react";
|
||||
import { api } from "@/lib/api";
|
||||
import { authenticatedFetch, TokenExpiredError } from "@/lib/authenticatedFetch";
|
||||
import SaveResetBar from "../../settings/components/SaveResetBar";
|
||||
|
||||
interface AdminConfiguration {
|
||||
partitionKey: string;
|
||||
rowKey: string;
|
||||
lastUpdated: string;
|
||||
updatedBy: string;
|
||||
globalRateLimitRequestsPerMinute: number;
|
||||
platformStatsBlobSasUrl?: string;
|
||||
collectorIdleTimeoutMinutes?: number;
|
||||
maxSessionWindowHours?: number;
|
||||
maintenanceBlockDurationHours?: number;
|
||||
diagnosticsGlobalLogPathsJson?: string;
|
||||
customSettings?: string;
|
||||
nvdApiKey?: string;
|
||||
vulnerabilityCorrelationEnabled?: boolean;
|
||||
vulnerabilityDataLastSyncUtc?: string;
|
||||
}
|
||||
import type { AdminConfiguration } from "@/types/adminConfig";
|
||||
|
||||
interface VulnerabilityDataSectionProps {
|
||||
adminConfig: AdminConfiguration | null;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
export interface AdminConfiguration {
|
||||
partitionKey: string;
|
||||
rowKey: string;
|
||||
lastUpdated: string;
|
||||
updatedBy: string;
|
||||
globalRateLimitRequestsPerMinute: number;
|
||||
platformStatsBlobSasUrl?: string;
|
||||
collectorIdleTimeoutMinutes?: number;
|
||||
maxSessionWindowHours?: number;
|
||||
maintenanceBlockDurationHours?: number;
|
||||
opsEventRetentionDays?: number;
|
||||
diagnosticsGlobalLogPathsJson?: string;
|
||||
customSettings?: string;
|
||||
nvdApiKey?: string;
|
||||
vulnerabilityCorrelationEnabled?: boolean;
|
||||
vulnerabilityDataLastSyncUtc?: string;
|
||||
opsAlertRulesJson?: string;
|
||||
opsAlertTelegramEnabled?: boolean;
|
||||
opsAlertTelegramChatId?: string;
|
||||
opsAlertTeamsEnabled?: boolean;
|
||||
opsAlertTeamsWebhookUrl?: string;
|
||||
opsAlertSlackEnabled?: boolean;
|
||||
opsAlertSlackWebhookUrl?: string;
|
||||
}
|
||||
|
||||
export interface OpsAlertRule {
|
||||
eventType: string;
|
||||
minSeverity: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
export type { Session } from "./session";
|
||||
export type { EnrollmentEvent, RuleResult } from "./enrollment";
|
||||
export type { AdminConfiguration, OpsAlertRule } from "./adminConfig";
|
||||
|
||||
Reference in New Issue
Block a user