feat(webhook): add webhook endpoint and client push notifications, auto-refresh UI, and gitea id mapping fixes
This commit is contained in:
@@ -38,6 +38,8 @@ export class GitopsViewBuildlog extends DeesElement {
|
||||
@state()
|
||||
accessor selectedJobId: string = '';
|
||||
|
||||
private _autoRefreshHandler: () => void;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const connSub = appstate.connectionsStatePart
|
||||
@@ -49,6 +51,18 @@ export class GitopsViewBuildlog extends DeesElement {
|
||||
.select((s) => s)
|
||||
.subscribe((s) => { this.dataState = s; });
|
||||
this.rxSubscriptions.push(dataSub);
|
||||
|
||||
this._autoRefreshHandler = () => this.handleAutoRefresh();
|
||||
document.addEventListener('gitops-auto-refresh', this._autoRefreshHandler);
|
||||
}
|
||||
|
||||
public override disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
document.removeEventListener('gitops-auto-refresh', this._autoRefreshHandler);
|
||||
}
|
||||
|
||||
private handleAutoRefresh(): void {
|
||||
this.fetchLog();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
|
||||
Reference in New Issue
Block a user