@cloudtower/eagle 0.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/components/BaseIcon/index.d.ts +13 -0
- package/dist/components/Button/index.d.ts +16 -0
- package/dist/components/ButtonGroup/index.d.ts +5 -0
- package/dist/components/ErrorBoundary/index.d.ts +7 -0
- package/dist/components/FailedLoad/index.d.ts +9 -0
- package/dist/components/Form/index.d.ts +154 -0
- package/dist/components/FormError/index.d.ts +29 -0
- package/dist/components/HoverableIcon/index.d.ts +10 -0
- package/dist/components/Icon/index.d.ts +39 -0
- package/dist/components/InputInteger/index.d.ts +12 -0
- package/dist/components/KitStoreProvider/index.d.ts +8 -0
- package/dist/components/Loading/index.d.ts +3 -0
- package/dist/components/Metric/MetricActions.d.ts +9 -0
- package/dist/components/Metric/MetricLegend.d.ts +16 -0
- package/dist/components/Metric/Pointer.d.ts +6 -0
- package/dist/components/Metric/RenderChart.d.ts +41 -0
- package/dist/components/Metric/TooltipFormatter.d.ts +10 -0
- package/dist/components/Metric/index.d.ts +29 -0
- package/dist/components/Metric/metric.d.ts +43 -0
- package/dist/components/Metric/styled.d.ts +18 -0
- package/dist/components/Metric/type.d.ts +39 -0
- package/dist/components/Modal/index.d.ts +4 -0
- package/dist/components/Modal2/Error.d.ts +14 -0
- package/dist/components/Modal2/InitializedModal.d.ts +4 -0
- package/dist/components/Modal2/Modal.d.ts +9 -0
- package/dist/components/Modal2/WizardModal.d.ts +4 -0
- package/dist/components/Modal2/index.d.ts +10 -0
- package/dist/components/ModalStack/index.d.ts +3 -0
- package/dist/components/Overflow/index.d.ts +14 -0
- package/dist/components/Pagination/index.d.ts +4 -0
- package/dist/components/Radio/index.d.ts +8 -0
- package/dist/components/Steps/index.d.ts +4 -0
- package/dist/components/Styled/index.d.ts +72 -0
- package/dist/components/Switch/index.d.ts +4 -0
- package/dist/components/Table/CustomizeColumn.d.ts +13 -0
- package/dist/components/Table/HeaderCell.d.ts +25 -0
- package/dist/components/Table/PendingTable.d.ts +3 -0
- package/dist/components/Table/SearchWidget.d.ts +20 -0
- package/dist/components/Table/SidebarTable.d.ts +7 -0
- package/dist/components/Table/TableSelection.d.ts +27 -0
- package/dist/components/Table/TableWidget.d.ts +50 -0
- package/dist/components/Table/common.d.ts +33 -0
- package/dist/components/Table/customize-column.d.ts +3 -0
- package/dist/components/Table/index.d.ts +20 -0
- package/dist/components/Tooltip/index.d.ts +4 -0
- package/dist/components/TowerTable/TableEmpty.d.ts +7 -0
- package/dist/components/TowerTable/TablePagination.d.ts +9 -0
- package/dist/components/TowerTable/WrapperComponent.d.ts +7 -0
- package/dist/components/TowerTable/index.d.ts +42 -0
- package/dist/components/Truncate/index.d.ts +12 -0
- package/dist/components/Typo/index.d.ts +70 -0
- package/dist/components/antd.d.ts +27 -0
- package/dist/components/images/images-type.d.ts +1 -0
- package/dist/components/images/index.d.ts +1123 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/esm/index.js +9347 -0
- package/dist/esm/stats1.html +6177 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/useElementResize.d.ts +2 -0
- package/dist/hooks/useElementsSize.d.ts +8 -0
- package/dist/hooks/useHistory.d.ts +2 -0
- package/dist/hooks/useLocalStorage.d.ts +61 -0
- package/dist/hooks/useMatchMediaQueries.d.ts +10 -0
- package/dist/hooks/useSearch.d.ts +12 -0
- package/dist/hooks/utils.d.ts +3 -0
- package/dist/index.d.ts +9 -0
- package/dist/spec/base.d.ts +478 -0
- package/dist/spec/emptyImpl.d.ts +3 -0
- package/dist/spec/index.d.ts +2 -0
- package/dist/spec/type.d.ts +35 -0
- package/dist/store/chart.d.ts +40 -0
- package/dist/store/index.d.ts +31 -0
- package/dist/store/modal.d.ts +55 -0
- package/dist/store/table.d.ts +54 -0
- package/dist/style.css +4407 -0
- package/dist/umd/index.js +10644 -0
- package/dist/umd/stats1.html +6177 -0
- package/dist/utils/constants.d.ts +15 -0
- package/dist/utils/dom.d.ts +6 -0
- package/dist/utils/formatValue.d.ts +2 -0
- package/dist/utils/history.d.ts +1 -0
- package/dist/utils/icon.d.ts +2 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/router.d.ts +34 -0
- package/dist/utils/types.d.ts +84 -0
- package/package.json +66 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const EMPTY_FUNCTION: () => void;
|
|
2
|
+
export declare const EMPTY_ARRAY: never[];
|
|
3
|
+
export declare const EMPTY_OBJECT: {};
|
|
4
|
+
export declare const EMPTY_COMPONENT: () => null;
|
|
5
|
+
export declare const END_POINT = "/api";
|
|
6
|
+
export declare const WS_URI: string;
|
|
7
|
+
export declare const CUSTOMIZE = "__customize__";
|
|
8
|
+
export declare const MAX_VOL_SIZE: number;
|
|
9
|
+
export declare const AUTO_SCHEDULE = "AUTO_SCHEDULE";
|
|
10
|
+
export declare const DAYJS_I18N_MAP: Record<string, string>;
|
|
11
|
+
export declare const NO_FOLDER = "NO_FOLDER";
|
|
12
|
+
export declare const NO_DATACENTER = "NO_DATACENTER";
|
|
13
|
+
export declare const DEFAULT_STORAGE_POLICY_UUID = "dce52578-3824-4b34-97a2-af09950bb0ac";
|
|
14
|
+
export declare const WINDOWS = "WINDOWS";
|
|
15
|
+
export declare const LINUX = "LINUX";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export declare function getSize(el: HTMLElement | null): {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function handleWhitelistClickEvent(wrapperRef: RefObject<Element>, whitelist: string[], cb: () => void): (e: MouseEvent) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hashHistory: import("history").History<unknown>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare function getOSIcon(os: string | null, vmtoolsReady?: boolean): string;
|
|
2
|
+
export declare function getAlertIcon(type: "success" | "info" | "warning" | "error" | "normal" | undefined): "1-checkmark-done-success-circle-fill-16-green" | "1-info-i-circle-fill-16-blue" | "1-info-i-circle-fill-16-secondary" | "1-notice-attention-16-yellow" | "1-xmark-failed-serious-warning-fill-16-red";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SerializableObject } from "@tower/utils";
|
|
2
|
+
import { History, Location as HistoryLocation } from "history";
|
|
3
|
+
declare type Route = {
|
|
4
|
+
path: string;
|
|
5
|
+
views?: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const routes: Record<string, Route>;
|
|
8
|
+
export declare const routeKeys: string[];
|
|
9
|
+
export declare const getAllSearch: () => Record<string, string>;
|
|
10
|
+
export declare const routeHasView: (route: string, view?: string) => boolean | undefined;
|
|
11
|
+
export declare type State = HistoryLocation["state"];
|
|
12
|
+
export declare type Location = {
|
|
13
|
+
resource: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
search?: {
|
|
16
|
+
[key: string]: string | number | SerializableObject | undefined;
|
|
17
|
+
view?: string;
|
|
18
|
+
} | string;
|
|
19
|
+
state?: State;
|
|
20
|
+
keepView?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare type HistoryType = Omit<History, "push" | "replace" | "location" | "length"> & {
|
|
23
|
+
push: {
|
|
24
|
+
(path: string, state?: State): void;
|
|
25
|
+
(location: Location): void;
|
|
26
|
+
};
|
|
27
|
+
replace: {
|
|
28
|
+
(path: string, state?: State): void;
|
|
29
|
+
(location: Location): void;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const history: HistoryType;
|
|
33
|
+
export declare type RouterHistory = HistoryType;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ExcludeMaybe<T> = Exclude<T extends string | number | boolean ? T : {
|
|
3
|
+
[P in keyof T]-?: T[P] extends (infer U)[] ? ExcludeMaybe<U>[] : T[P] extends Array<infer U> ? ExcludeMaybe<U>[] : ExcludeMaybe<T[P]>;
|
|
4
|
+
}, null | undefined>;
|
|
5
|
+
export declare type SidebarType = "vm" | "disk" | "alert_rules" | "alerts" | "elfImage" | "vds" | "vmPlacementGroup" | "vmTemplate" | "iscsiLun" | "nic" | "systemVlan" | "vmVlan" | "vmVolume" | "reportTemplate" | "nfsInode" | "snapshotPlan" | "label" | "userAuditLog" | "primaryZone" | "secondaryZone" | "zoneAndZone" | "witnessNode" | "primaryZoneAndWitness" | "secondaryZoneAndWitness" | "userRoleNext" | "consistencyGroup" | "nvmfNamespace" | "systemAuditLog" | "contentLibraryImage" | "contentLibraryVmTemplate" | "backupPlan" | "backupStoreRepository" | "securityGroup" | "everouteCluster";
|
|
6
|
+
export declare enum ConnectState {
|
|
7
|
+
Connected = "CONNECTED",
|
|
8
|
+
Disconnected = "DISCONNECTED",
|
|
9
|
+
Initializing = "INITIALIZING",
|
|
10
|
+
Removing = "REMOVING"
|
|
11
|
+
}
|
|
12
|
+
export declare enum MaintenanceModeEnum {
|
|
13
|
+
EnteringMaintenanceMode = "ENTERING_MAINTENANCE_MODE",
|
|
14
|
+
InUse = "IN_USE",
|
|
15
|
+
MaintenanceMode = "MAINTENANCE_MODE",
|
|
16
|
+
Removing = "REMOVING"
|
|
17
|
+
}
|
|
18
|
+
export declare type Sidebar = {
|
|
19
|
+
type: SidebarType;
|
|
20
|
+
view?: string;
|
|
21
|
+
id: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
export declare type MultipleSelectProps<T> = {
|
|
24
|
+
value: string[];
|
|
25
|
+
onChange: (value: string[], object?: T | T[], data?: T[]) => void;
|
|
26
|
+
mode?: "multiple";
|
|
27
|
+
};
|
|
28
|
+
export declare type SingleSelectProps<T> = {
|
|
29
|
+
value: string;
|
|
30
|
+
onChange: (value: string, object?: T, data?: T[]) => void;
|
|
31
|
+
mode?: "default";
|
|
32
|
+
};
|
|
33
|
+
export declare type SelectProps<T> = {
|
|
34
|
+
value: SingleSelectProps<T>["value"] | MultipleSelectProps<T>["value"];
|
|
35
|
+
onChange: SingleSelectProps<T>["onChange"] | MultipleSelectProps<T>["onChange"];
|
|
36
|
+
mode?: "default" | "multiple";
|
|
37
|
+
};
|
|
38
|
+
export declare type CreateVmAction = "create" | "createFromTemplate" | "clone" | "rebuild";
|
|
39
|
+
export declare type Topo = {
|
|
40
|
+
resource: "datacenters" | "clusters" | "hosts" | "vm_folders";
|
|
41
|
+
id: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
export declare type FormatUnit = "GiB" | "KiB";
|
|
44
|
+
export declare type PropsFrom<TComponent> = TComponent extends React.FC<infer Props> ? Props : TComponent extends React.Component<infer Props> ? Props : never;
|
|
45
|
+
export declare type PastTime = {
|
|
46
|
+
unit: "h" | "m" | "d";
|
|
47
|
+
value: number;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
};
|
|
50
|
+
export declare type Data = {
|
|
51
|
+
id: string;
|
|
52
|
+
cluster: {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
connect_state?: ConnectState;
|
|
56
|
+
};
|
|
57
|
+
vm?: {
|
|
58
|
+
id: string;
|
|
59
|
+
};
|
|
60
|
+
entityFilter?: {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
};
|
|
64
|
+
connect_state?: ConnectState;
|
|
65
|
+
clusters?: {
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
connect_state?: ConnectState;
|
|
69
|
+
}[];
|
|
70
|
+
host_state?: {
|
|
71
|
+
state: MaintenanceModeEnum;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
declare type HistoryRecord = {
|
|
75
|
+
data: Data;
|
|
76
|
+
type: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: "search-keyword";
|
|
79
|
+
data: string;
|
|
80
|
+
};
|
|
81
|
+
export declare type GlobalSearchHistory = Partial<Record<string, HistoryRecord[]>> & {
|
|
82
|
+
_head?: HistoryRecord[];
|
|
83
|
+
};
|
|
84
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cloudtower/eagle",
|
|
3
|
+
"version": "0.17.11",
|
|
4
|
+
"main": "dist/umd/index.js",
|
|
5
|
+
"module": "./dist/esm/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rollup --config rollup.config.js --bundleConfigAsCjs",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"coverage": "vitest run --coverage",
|
|
15
|
+
"typings": "yarn typings:main",
|
|
16
|
+
"typings:main": "tsc -v && tsc -p tsconfig.typings.json",
|
|
17
|
+
"generate:images": "node --loader ts-node/esm tools/index.mts"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@cloudtower/parrot": "0.17.11",
|
|
21
|
+
"@linaria/core": "^4.2.2",
|
|
22
|
+
"@linaria/react": "^4.3.0",
|
|
23
|
+
"@smartx/final-form": "^4.19.1-rc2",
|
|
24
|
+
"@smartx/final-form-arrays": "^3.0.2-rc4",
|
|
25
|
+
"@smartx/react-final-form": "^6.4.0-rc4",
|
|
26
|
+
"@smartx/react-final-form-arrays": "^3.1.1-rc5",
|
|
27
|
+
"@tower/utils": "1.10.0",
|
|
28
|
+
"antd": "4.5.0",
|
|
29
|
+
"history": "^4.9",
|
|
30
|
+
"react-redux": "^7.1.3",
|
|
31
|
+
"react-transition-group": "^4.4.5",
|
|
32
|
+
"recharts": "^2.1.16",
|
|
33
|
+
"redux": "^4.2.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@linaria/rollup": "^4.1.5",
|
|
37
|
+
"@linaria/vite": "^4.2.5",
|
|
38
|
+
"@rollup/plugin-image": "^3.0.2",
|
|
39
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
40
|
+
"@testing-library/react": "^12.1.5",
|
|
41
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
42
|
+
"@types/history": "^4.7.11",
|
|
43
|
+
"@types/react": "^17.0.50",
|
|
44
|
+
"@types/react-is": "^17.0.3",
|
|
45
|
+
"@types/react-transition-group": "^4.4.5",
|
|
46
|
+
"@vitejs/plugin-react": "^2.1.0",
|
|
47
|
+
"@vitest/coverage-c8": "^0.24.1",
|
|
48
|
+
"globby": "^13.1.2",
|
|
49
|
+
"jsdom": "^20.0.1",
|
|
50
|
+
"postcss": "^8.4.20",
|
|
51
|
+
"postcss-url": "^10.1.3",
|
|
52
|
+
"react": "17.0.2",
|
|
53
|
+
"react-dom": "17.0.2",
|
|
54
|
+
"react-is": "^18.2.0",
|
|
55
|
+
"rollup": "^3.12.1",
|
|
56
|
+
"rollup-plugin-esbuild": "5.0.0",
|
|
57
|
+
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
58
|
+
"rollup-plugin-scss": "^3.0.0",
|
|
59
|
+
"rollup-plugin-visualizer": "5.9.0",
|
|
60
|
+
"sass": "^1.55.0",
|
|
61
|
+
"ts-node": "^10.9.1",
|
|
62
|
+
"typescript": "^4.8.4",
|
|
63
|
+
"vite": "^3.1.7",
|
|
64
|
+
"vitest": "^0.24.1"
|
|
65
|
+
}
|
|
66
|
+
}
|