Fix NetBox config: show saved URL/API token when opening Configure
This commit is contained in:
parent
be5fa8f4d7
commit
b8a625005c
1 changed files with 26 additions and 16 deletions
|
|
@ -1101,22 +1101,32 @@
|
|||
Write permission is required if you want to push data to NetBox.
|
||||
</p>
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<.input
|
||||
field={@integration_form[:url]}
|
||||
type="url"
|
||||
label="NetBox URL"
|
||||
placeholder="https://netbox.example.com"
|
||||
autocomplete="off"
|
||||
value={get_credential(@integrations["netbox"], "url")}
|
||||
/>
|
||||
<.input
|
||||
field={@integration_form[:api_token]}
|
||||
type="password"
|
||||
label="API Token"
|
||||
placeholder="Enter your NetBox API token"
|
||||
autocomplete="off"
|
||||
value={get_credential(@integrations["netbox"], "api_token")}
|
||||
/>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-1">
|
||||
NetBox URL
|
||||
</label>
|
||||
<input
|
||||
type="url"
|
||||
name="integration[url]"
|
||||
value={get_credential(@integrations["netbox"], "url")}
|
||||
placeholder="https://netbox.example.com"
|
||||
autocomplete="off"
|
||||
class="block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder-gray-400 focus:border-indigo-500 focus:ring-indigo-500 dark:border-white/10 dark:bg-gray-800 dark:text-white dark:placeholder-gray-500"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-white mb-1">
|
||||
API Token
|
||||
</label>
|
||||
<input
|
||||
type="password"
|
||||
name="integration[api_token]"
|
||||
value={get_credential(@integrations["netbox"], "api_token")}
|
||||
placeholder="Enter your NetBox API token"
|
||||
autocomplete="off"
|
||||
class="block w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder-gray-400 focus:border-indigo-500 focus:ring-indigo-500 dark:border-white/10 dark:bg-gray-800 dark:text-white dark:placeholder-gray-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue