events: include full group in event notification
This commit is contained in:
		
							
								
								
									
										25
									
								
								web/src/api/EventNotification.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								web/src/api/EventNotification.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| import { DefaultClient, QueryArguments, PBResponse } from "./Client"; | ||||
|  | ||||
| export class Notification { | ||||
|     pk: string; | ||||
|     name: string; | ||||
|     mode: string; | ||||
|     mode_verbose: string; | ||||
|     webhook_url: string; | ||||
|  | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
|  | ||||
|     static get(pk: string): Promise<Transport> { | ||||
|         return DefaultClient.fetch<Transport>(["events", "transports", pk]); | ||||
|     } | ||||
|  | ||||
|     static list(filter?: QueryArguments): Promise<PBResponse<Transport>> { | ||||
|         return DefaultClient.fetch<PBResponse<Transport>>(["events", "transports"], filter); | ||||
|     } | ||||
|  | ||||
|     static adminUrl(rest: string): string { | ||||
|         return `/administration/events/transports/${rest}`; | ||||
|     } | ||||
| } | ||||
| @ -1,11 +1,12 @@ | ||||
| import { DefaultClient, QueryArguments, PBResponse } from "./Client"; | ||||
| import { Group } from "./Groups"; | ||||
|  | ||||
| export class Trigger { | ||||
|     pk: string; | ||||
|     name: string; | ||||
|     transports: string[]; | ||||
|     severity: string; | ||||
|     group?: string; | ||||
|     group?: Group; | ||||
|  | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|  | ||||
							
								
								
									
										13
									
								
								web/src/api/Groups.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								web/src/api/Groups.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| export class Group { | ||||
|  | ||||
|     group_uuid: string; | ||||
|     name: string; | ||||
|     is_superuser: boolean; | ||||
|     attributes: object; | ||||
|     parent?: Group; | ||||
|  | ||||
|     constructor() { | ||||
|         throw Error(); | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer