{{#if updating}} {{loading-spinner size="small"}} {{else}} {{#if responseIcon}} {{d-icon responseIcon}} {{/if}} {{/if}} {{d-button label="admin.wizard.api.save" action=(action "save") class="btn-primary" disabled=saveDisabled}} {{#if showRemove}} {{d-button action=(action "remove") label="admin.wizard.api.remove"}} {{/if}} {{#if error}}
{{error}}
{{/if}}
{{#if api.isNew}} {{i18n 'admin.wizard.api.new'}} {{else}} {{api.title}} {{/if}}
{{input value=api.title placeholder=(i18n 'admin.wizard.api.title_placeholder')}}
{{#if api.isNew}} {{input value=api.name placeholder=(i18n 'admin.wizard.api.name_placeholder')}} {{else}} {{api.name}} {{/if}}
{{#if isOauth}} {{#if authorizing}} {{loading-spinner size="small"}} {{else}} {{#if authErrorMessage}} {{authErrorMessage}} {{/if}} {{/if}} {{d-button label="admin.wizard.api.auth.btn" action=(action "authorize") disabled=authDisabled class="btn-primary"}} {{/if}}
{{i18n 'admin.wizard.api.auth.label'}}
{{i18n 'admin.wizard.api.auth.settings'}}
{{#if showRedirectUri}}
{{api.redirectUri}}
{{/if}}
{{combo-box value=api.authType content=authorizationTypes onChange=(action (mut authorizationTypes)) options=(hash none='admin.wizard.api.auth.type_none' )}}
{{#if isOauth}} {{#if threeLeggedOauth}}
{{input value=api.authUrl}}
{{/if}}
{{input value=api.tokenUrl}}
{{input value=api.clientId}}
{{input value=api.clientSecret}}
{{#each api.authParams as |param|}}
{{input value=param.key placeholder=(i18n 'admin.wizard.key')}} {{input value=param.value placeholder=(i18n 'admin.wizard.value')}} {{d-button action=(action "removeParam") actionParam=param icon='times'}}
{{/each}} {{d-button label='admin.wizard.api.auth.params.new' icon='plus' action=(action "addParam")}}
{{/if}} {{#if isBasicAuth}}
{{input value=api.username}}
{{input value=api.password}}
{{/if}}
{{#if isOauth}}
{{#if api.authorized}} {{i18n "admin.wizard.api.status.authorized"}} {{else}} {{i18n "admin.wizard.api.status.not_authorized"}} {{/if}}
{{i18n 'admin.wizard.api.status.label'}}
{{#if threeLeggedOauth}}
{{api.code}}
{{/if}}
{{api.accessToken}}
{{#if threeLeggedOauth}}
{{api.refreshToken}}
{{/if}}
{{api.tokenExpiresAt}}
{{api.tokenRefreshAt}}
{{/if}}
{{i18n 'admin.wizard.api.endpoint.label'}}
{{d-button action=(action "addEndpoint") label='admin.wizard.api.endpoint.add' icon='plus'}} {{#if api.endpoints}}
{{/if}}
{{i18n 'admin.wizard.api.log.label'}} {{d-button action=(action "clearLogs") icon='trash-alt' class='clear-logs'}}
{{#each api.log as |logentry|}} {{/each}}
Datetime User Status URL Error
{{logentry.time}} {{logentry.status}} {{logentry.url}} {{logentry.error}}