Replace polling with websocket live sync
This commit is contained in:
@@ -81,6 +81,29 @@ export interface DashboardSnapshot {
|
||||
};
|
||||
}
|
||||
|
||||
export interface DashboardSnapshotPatch {
|
||||
service?: DashboardSnapshot['service'];
|
||||
traffic?: DashboardSnapshot['traffic'];
|
||||
users?: DashboardSnapshot['users'];
|
||||
attention?: DashboardSnapshot['attention'];
|
||||
userRecords?: DashboardSnapshot['userRecords'];
|
||||
system?: DashboardSnapshot['system'];
|
||||
}
|
||||
|
||||
export type DashboardSyncMessage =
|
||||
| {
|
||||
type: 'snapshot.init';
|
||||
snapshot: DashboardSnapshot;
|
||||
}
|
||||
| {
|
||||
type: 'snapshot.patch';
|
||||
patch: DashboardSnapshotPatch;
|
||||
}
|
||||
| {
|
||||
type: 'session.expired';
|
||||
error: string;
|
||||
};
|
||||
|
||||
export interface CreateUserInput {
|
||||
username: string;
|
||||
password: string;
|
||||
|
||||
Reference in New Issue
Block a user