()
| 1096 | } |
| 1097 | |
| 1098 | apiCallTemplate() { |
| 1099 | const selectedServerHtml = html` |
| 1100 | <div style="display:flex; flex-direction:column;"> |
| 1101 | ${this.serverUrl |
| 1102 | ? html` |
| 1103 | <div style="display:flex; align-items:baseline;"> |
| 1104 | <div style="font-weight:bold; padding-right:5px;">API Server</div> |
| 1105 | <span class = "gray-text"> ${this.serverUrl} </span> |
| 1106 | </div> |
| 1107 | ` |
| 1108 | : '' |
| 1109 | } |
| 1110 | </div> |
| 1111 | `; |
| 1112 | |
| 1113 | return html` |
| 1114 | <div style="display:flex; align-items:flex-end; margin:16px 0; font-size:var(--font-size-small);" part="wrap-request-btn"> |
| 1115 | <div class="hide-in-small-screen" style="flex-direction:column; margin:0; width:calc(100% - 60px);"> |
| 1116 | <div style="display:flex; flex-direction:row; align-items:center; overflow:hidden;"> |
| 1117 | ${selectedServerHtml} |
| 1118 | </div> |
| 1119 | <div style="display:flex;"> |
| 1120 | <div style="font-weight:bold; padding-right:5px;">Authentication</div> |
| 1121 | ${this.security?.length > 0 |
| 1122 | ? html` |
| 1123 | ${this.api_keys.length > 0 |
| 1124 | ? html`<div style="color:var(--blue); overflow:hidden;"> |
| 1125 | ${this.api_keys.length === 1 |
| 1126 | ? `${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}` |
| 1127 | : `${this.api_keys.length} API keys applied` |
| 1128 | } |
| 1129 | </div>` |
| 1130 | : html`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span> </div>` |
| 1131 | }` |
| 1132 | : html`<span class="gray-text"> Not Required </span>` |
| 1133 | } |
| 1134 | </div> |
| 1135 | </div> |
| 1136 | ${ |
| 1137 | this.parameters.length > 0 || this.request_body |
| 1138 | ? html` |
| 1139 | <button class="m-btn thin-border" part="btn btn-outline btn-fill" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)"> |
| 1140 | FILL EXAMPLE |
| 1141 | </button> |
| 1142 | <button class="m-btn thin-border" part="btn btn-outline btn-clear" style="margin-right:5px;" @click="${this.onClearRequestData}"> |
| 1143 | CLEAR |
| 1144 | </button>` |
| 1145 | : '' |
| 1146 | } |
| 1147 | <button class="m-btn primary thin-border" part="btn btn-try" @click="${this.onTryClick}">TRY</button> |
| 1148 | </div> |
| 1149 | <div class="row" style="font-size:var(--font-size-small); margin:5px 0"> |
| 1150 | ${this.showCurlBeforeTry === 'true' ? this.curlSyntaxTemplate() : ''} |
| 1151 | </div> |
| 1152 | ${this.responseMessage === '' ? '' : this.apiResponseTabTemplate()} |
| 1153 | `; |
| 1154 | } |
| 1155 | /* eslint-enable indent */ |
no test coverage detected