diff --git a/springwolf-ui/src/app/components/header/header.component.html b/springwolf-ui/src/app/components/header/header.component.html index d1d8d058a..4d9f8eec0 100644 --- a/springwolf-ui/src/app/components/header/header.component.html +++ b/springwolf-ui/src/app/components/header/header.component.html @@ -29,6 +29,12 @@

{{ title }}

}} Show bindings + (this.isShowBindings = value) ); + this.uiService.isShowHeaders$.subscribe( + (value) => (this.isShowHeaders = value) + ); this.asyncApiService.getAsyncApi().subscribe((asyncapi) => { this.title = asyncapi.info.title; @@ -40,4 +44,8 @@ export class HeaderComponent implements OnInit { toggleIsShowBindings() { this.uiService.toggleIsShowBindings(!this.isShowBindings); } + + toggleIsShowHeaders() { + this.uiService.toggleIsShowHeaders(!this.isShowHeaders); + } } diff --git a/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.html b/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.html index a71a303ec..24c921c53 100644 --- a/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.html +++ b/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.html @@ -59,7 +59,6 @@ -
Operation Binding
@@ -76,7 +75,6 @@
Operation Binding
-
Message Binding
@@ -94,8 +92,7 @@
Message Binding
- -
+
Headers
@@ -112,7 +109,6 @@
Headers
-
Payload
diff --git a/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.ts b/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.ts index ecac952cb..544bec0f5 100644 --- a/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.ts +++ b/springwolf-ui/src/app/components/new/channels/channel-main/channel-operation.component.ts @@ -37,6 +37,7 @@ export class ChannelOperationComponent implements OnInit { messageBindingExampleString?: string; isShowBindings: boolean = UiService.DEFAULT_SHOW_BINDINGS; + isShowHeaders: boolean = UiService.DEFAULT_SHOW_HEADERS; canPublish: boolean = false; constructor( @@ -83,6 +84,9 @@ export class ChannelOperationComponent implements OnInit { this.uiService.isShowBindings$.subscribe( (value) => (this.isShowBindings = value) ); + this.uiService.isShowHeaders$.subscribe( + (value) => (this.isShowHeaders = value) + ); } createBindingExample(binding?: Binding): Example | undefined { diff --git a/springwolf-ui/src/app/components/new/schema/schema.component.html b/springwolf-ui/src/app/components/new/schema/schema.component.html index 340a48f00..714705dfd 100644 --- a/springwolf-ui/src/app/components/new/schema/schema.component.html +++ b/springwolf-ui/src/app/components/new/schema/schema.component.html @@ -147,6 +147,4 @@ {{ value.multipleOf }} - - diff --git a/springwolf-ui/src/app/service/ui.service.ts b/springwolf-ui/src/app/service/ui.service.ts index f382c9c62..aee036dcd 100644 --- a/springwolf-ui/src/app/service/ui.service.ts +++ b/springwolf-ui/src/app/service/ui.service.ts @@ -8,6 +8,7 @@ import { BehaviorSubject } from "rxjs"; export class UiService { public static readonly DEFAULT_NEW_UI = true; public static readonly DEFAULT_SHOW_BINDINGS = true; + public static readonly DEFAULT_SHOW_HEADERS = true; private _isNewUi = new BehaviorSubject(UiService.DEFAULT_NEW_UI); isNewUi$ = this._isNewUi.asObservable(); @@ -17,6 +18,11 @@ export class UiService { ); isShowBindings$ = this._isShowBindings.asObservable(); + private _isShowHeaders = new BehaviorSubject( + UiService.DEFAULT_SHOW_HEADERS + ); + isShowHeaders$ = this._isShowHeaders.asObservable(); + toggleIsNewUi(value: boolean) { this._isNewUi.next(value); } @@ -24,4 +30,8 @@ export class UiService { toggleIsShowBindings(value: boolean) { this._isShowBindings.next(value); } + + toggleIsShowHeaders(value: boolean) { + this._isShowHeaders.next(value); + } }