mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Remove hard-coded API URL
This commit is contained in:
parent
96a8c72b05
commit
b8fe27d215
BIN
netbox/project-static/dist/netbox.js
vendored
BIN
netbox/project-static/dist/netbox.js
vendored
Binary file not shown.
@ -22,7 +22,10 @@ export function initDashboard(): void {
|
||||
return;
|
||||
}
|
||||
gridSaveButton.addEventListener('click', () => {
|
||||
const url = '/api/extras/dashboard/';
|
||||
const url = gridSaveButton.getAttribute('data-url');
|
||||
if (url == null) {
|
||||
return;
|
||||
}
|
||||
let gridData = grid.save(false);
|
||||
saveDashboardLayout(url, gridData).then(res => {
|
||||
if (hasError(res)) {
|
||||
|
@ -39,7 +39,7 @@
|
||||
>
|
||||
<i class="mdi mdi-plus"></i> Add Widget
|
||||
</a>
|
||||
<button id="save_dashboard" class="btn btn-primary btn-sm">
|
||||
<button id="save_dashboard" class="btn btn-primary btn-sm" data-url="{% url 'extras-api:dashboard' %}">
|
||||
<i class="mdi mdi-content-save-outline"></i> Save
|
||||
</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user