1
0
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:
checktheroads
2021-04-20 01:43:36 -07:00
parent 98829b209a
commit 0aa8fc2fc2
15 changed files with 234 additions and 64 deletions

View File

@ -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');
}
}
}