Skip to content

Commit

Permalink
refactor: service api
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Dec 5, 2024
1 parent 3f53b9d commit fbf02a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/ServiceTracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const ServiceTracker: React.FC = () => {
<ServiceTrackerClient
key={name}
days={days}
title={data.service.name}
title={data.service_name}
uptime={uptime}
avgDelay={avgDelay}
/>
Expand Down
18 changes: 1 addition & 17 deletions src/types/nezha-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,8 @@ export interface ServiceResponse {
};
}

export interface Service {
// created_at: string;
// updated_at: string;
name: string;
// type: number;
// target: string;
// duration: number;
// notification_group_id: number;
// cover: number;
// fail_trigger_tasks: null | any[];
// recover_trigger_tasks: null | any[];
// min_latency: number;
// max_latency: number;
// skip_servers: null | any[];
}

export interface ServiceData {
service: Service;
service_name: string;
current_up: number;
current_down: number;
total_up: number;
Expand Down

0 comments on commit fbf02a1

Please sign in to comment.