feat(console): events (#5092)

Shows the list of events on instance level
This commit is contained in:
Max Peintner
2023-02-01 08:54:00 +00:00
committed by GitHub
parent 5ca7e83f0a
commit e9d5d1dcaf
35 changed files with 1790 additions and 13 deletions
@@ -0,0 +1,11 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ToObjectPipe } from './to-object.pipe';
@NgModule({
declarations: [ToObjectPipe],
imports: [CommonModule],
exports: [ToObjectPipe],
})
export class ToObjectPipeModule {}
@@ -0,0 +1,12 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Struct } from 'google-protobuf/google/protobuf/struct_pb';
import { Event } from 'src/app/proto/generated/zitadel/event_pb';
@Pipe({
name: 'toobject',
})
export class ToObjectPipe implements PipeTransform {
public transform(value: Event | Struct): any {
return value.toObject();
}
}
@@ -0,0 +1,11 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { ToPayloadPipe } from './to-payload.pipe';
@NgModule({
declarations: [ToPayloadPipe],
imports: [CommonModule],
exports: [ToPayloadPipe],
})
export class ToPayloadPipeModule {}
@@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
import { JavaScriptValue, Struct } from 'google-protobuf/google/protobuf/struct_pb';
import { Event } from 'src/app/proto/generated/zitadel/event_pb';
@Pipe({
name: 'topayload',
})
export class ToPayloadPipe implements PipeTransform {
public transform(value: Event): JavaScriptValue | string {
const pl = value.getPayload();
if (pl) {
return pl.toJavaScript();
} else {
return '';
}
}
}