mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-14 09:55:12 +00:00
feat(console): events (#5092)
Shows the list of events on instance level
This commit is contained in:
@@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user