1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

add javascript

This commit is contained in:
checktheroads
2021-03-13 02:31:57 -07:00
parent 3b120c0372
commit 912cd220cc
16 changed files with 1069 additions and 0 deletions

38
netbox/project-static/src/global.d.ts vendored Normal file
View File

@@ -0,0 +1,38 @@
type Nullable<T> = T | null;
type APIAnswer<T> = {
count: number;
next: Nullable<string>;
previous: Nullable<string>;
results: T[];
};
type APIError = {
error: string;
exception: string;
netbox_version: string;
python_version: string;
};
type APIObjectBase = {
id: number;
name: string;
url: string;
[k: string]: unknown;
};
interface APIReference {
id: number;
name: string;
slug: string;
url: string;
_depth: number;
}
interface ObjectWithGroup extends APIObjectBase {
group: Nullable<APIReference>;
}
declare const messages: string[];
type FormControls = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;