@@ -505,19 +505,31 @@ export default class ApiRequest extends LitElement {
505
505
506
506
apiCallTemplate ( ) {
507
507
// use default server url, if multiple overrides exists show select
508
- let containerServer = this . serverUrl
509
- ? html `${ this . serverUrl } `
510
- : html `< div style ="font-weight:bold;color:var(--red) "> Not Set</ div > ` ;
508
+ let selectedServerHtml = this . serverUrl
509
+ ? html `< div style ="font-weight:bold;padding-right:5px; "> API SERVER: </ div > ${ this . serverUrl } `
510
+ : html `< div style ="font-weight:bold;color:var(--red) "> NO API Server Selected</ div > ` ;
511
+
511
512
if ( this . servers && this . servers . length > 0 ) {
512
- const opts = this . servers . map ( ( value ) => html `< option value ="${ value . url } " selected ="${ value . url === this . serverUrl } " > ${ value . url } </ option > ` ) ;
513
- containerServer = html `< select @change ='${ ( e ) => { this . serverUrl = e . target . value ; } } '> ${ opts } </ select > ` ;
513
+ // this.serverUrl = this.servers[0].url;
514
+ selectedServerHtml = html `
515
+ < div style ="display:flex; flex-direction:column; ">
516
+ < select style ="min-width:100px; " @change ='${ ( e ) => { this . serverUrl = e . target . value ; } } '>
517
+ ${ this . servers . map ( ( v ) => html `< option value ="${ v . url } "> ${ v . url } - ${ v . description } </ option > ` ) }
518
+ </ select >
519
+
520
+ < div style ="display:flex; flex-direction:row; align-items:center; margin-top:10px; ">
521
+ < div style ="font-weight:bold;padding-right:5px; "> API SERVER: </ div >
522
+ < div > ${ this . serverUrl ? this . serverUrl : html `< div style ="font-weight:bold;color:var(--red) "> NO API Server Selected</ div > ` } </ div >
523
+ </ div >
524
+ </ div >
525
+ ` ;
514
526
}
527
+
515
528
return html `
516
529
< div style ="display:flex; align-items: center; margin:16px 0; font-size:var(--font-size-small); ">
517
530
< div style ="display:flex; flex-direction:column; margin:0; width:calc(100% - 60px); ">
518
531
< div style ="display:flex; flex-direction:row; align-items:center; overflow:hidden; ">
519
- < div style ="font-weight:bold;padding-right:5px; "> API SERVER: </ div >
520
- ${ containerServer }
532
+ ${ selectedServerHtml }
521
533
</ div >
522
534
< div style ="display:flex; ">
523
535
< div style ="padding-right:5px; "> Authentication: </ div >
@@ -532,7 +544,7 @@ export default class ApiRequest extends LitElement {
532
544
}
533
545
</ div >
534
546
</ div >
535
- < button class ="m-btn primary try-btn " style ="padding: 6px 0px;width:60px; align-self:flex-end ; " @click ="${ this . onTryClick } "> TRY</ button >
547
+ < button class ="m-btn primary try-btn " style ="padding: 6px 0px;width:60px; align-self:flex-start; margin:1px 0 0 5px ; " @click ="${ this . onTryClick } "> TRY</ button >
536
548
</ div >
537
549
${ this . responseMessage === ''
538
550
? ''
0 commit comments