forked from springwolf/springwolf-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchannel-operation.component.html
152 lines (144 loc) · 4.43 KB
/
channel-operation.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!-- SPDX-License-Identifier: Apache-2.0 -->
<div class="row">
<div class="width-12/12 width-12/12-s">
<div class="table margin-vertical-1em">
<div class="table-row">
<span>Channel</span>
<span>{{ operation().channelName }}</span>
</div>
<div *ngIf="operation().description" class="table-row">
<span>Operation description</span>
<markdown [data]="operation().description"></markdown>
</div>
<div *ngIf="operation().message.description" class="table-row">
<span>Message description</span>
<markdown [data]="operation().message.description"></markdown>
</div>
<div *ngIf="operation().message.contentType" class="table-row">
<span>Content-Type</span>
<span class="text-console">{{ operation().message.contentType }}</span>
</div>
<div *ngIf="operation().reply" class="table-row">
<span>Reply to</span>
<span
><mat-chip-set>
<a href="{{ operation().reply!.channelAnchorUrl }}">
<mat-chip>
<mat-icon matChipAvatar fontIcon="swap_vert" />
{{ operation().reply!.channelName }}
</mat-chip>
</a>
</mat-chip-set>
with
<mat-chip-set>
<a href="{{ operation().reply!.messageAnchorUrl }}">
<mat-chip>
<mat-icon matChipAvatar fontIcon="schema" />
{{ operation().reply!.messageName }}
</mat-chip>
</a>
</mat-chip-set></span
>
</div>
<div class="table-row">
<span>Servers</span>
<span>
<mat-chip-set>
@for (server of operation().servers; track server) {
<a href="{{ server.anchorUrl }}">
<mat-chip>
<mat-icon matChipAvatar fontIcon="dns" />
{{ server.name }}
</mat-chip>
</a>
}
</mat-chip-set>
</span>
</div>
</div>
</div>
</div>
<div class="row" *ngIf="isShowBindings">
<div class="width-6/12 width-12/12-s">
<h6>Operation Binding</h6>
</div>
<div class="width-6/12 width-12/12-s">
<div *ngIf="operation().protocol">
<app-prism-editor
*ngIf="operationBindingExampleString"
[(code)]="operationBindingExampleString"
language="json"
readonly="true"
/>
</div>
</div>
</div>
<div class="row" *ngIf="isShowBindings">
<div class="width-6/12 width-12/12-s">
<h6>Message Binding</h6>
</div>
<div class="width-6/12 width-12/12-s">
<div>
<app-prism-editor
*ngIf="messageBindingExampleString"
[(code)]="messageBindingExampleString"
language="json"
readonly="true"
/>
<span *ngIf="!messageBindingExampleString"><i>none</i></span>
</div>
</div>
</div>
<div class="row" *ngIf="isShowHeaders">
<div class="width-6/12 width-12/12-s">
<h6>Headers</h6>
<mat-chip-set>
<a [href]="headers.anchorUrl">
<mat-chip>
<mat-icon matChipAvatar fontIcon="schema" />
{{ headers.title }}
</mat-chip></a
>
</mat-chip-set>
<app-schema *ngIf="headers" [schema]="headers"></app-schema>
</div>
<div class="width-6/12 width-12/12-s">
<app-prism-editor [(code)]="headersExample.value" language="json" />
</div>
</div>
<div class="row">
<div class="width-6/12 width-12/12-s">
<h6>Payload</h6>
<mat-chip-set>
<a [href]="operation().message.payload.anchorUrl">
<mat-chip>
<mat-icon matChipAvatar fontIcon="schema" />
{{ operation().message.payload.title }}
</mat-chip></a
>
</mat-chip-set>
<app-schema *ngIf="defaultSchema" [schema]="defaultSchema"></app-schema>
</div>
<div class="width-6/12 width-12/12-s">
<app-prism-editor
[(code)]="defaultExample.value"
[language]="exampleContentType()"
/>
<div class="flex space-between">
<div class="flex gap-8">
<button mat-raised-button [cdkCopyToClipboard]="defaultExample.value">
<mat-icon fontIcon="content_copy" />
Copy
</button>
<button mat-raised-button (click)="reset()">
<mat-icon fontIcon="restart_alt" />
Reset
</button>
</div>
<button mat-raised-button [disabled]="!canPublish" (click)="publish()">
<mat-icon fontIcon="send" />
Publish
</button>
</div>
</div>
</div>