mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
migrate napalm/device config to typescript
This commit is contained in:
@ -172,3 +172,17 @@ export function getNetboxData(key: string): string | null {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle visibility of card loader.
|
||||
*/
|
||||
export function toggleLoader(action: 'show' | 'hide') {
|
||||
const spinnerContainer = document.querySelector('div.card-overlay');
|
||||
if (spinnerContainer !== null) {
|
||||
if (action === 'show') {
|
||||
spinnerContainer.classList.remove('d-none');
|
||||
} else {
|
||||
spinnerContainer.classList.add('d-none');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user