forked from sqlpage/SQLPage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path28_tracking_component.sql
128 lines (124 loc) · 3.06 KB
/
28_tracking_component.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
INSERT INTO component (name, description, icon, introduced_in_version)
VALUES (
'tracking',
'Component for visualising activity logs or other monitoring-related data.',
'timeline-event-text',
'0.18.0'
);
INSERT INTO parameter (
component,
name,
description,
type,
top_level,
optional
)
VALUES (
'tracking',
'title',
'Title of the tracking component.',
'TEXT',
TRUE,
FALSE
),
(
'tracking',
'information',
'A short text displayed below the title.',
'TEXT',
TRUE,
TRUE
),
(
'tracking',
'description',
'A short paragraph.',
'TEXT',
TRUE,
TRUE
),
(
'tracking',
'description_md',
'A short paragraph formatted using markdown.',
'TEXT',
TRUE,
TRUE
),
(
'tracking',
'width',
'Width of the component, between 1 and 12.',
'INTEGER',
TRUE,
TRUE
),
(
'tracking',
'placement',
'Position of the tooltip (e.g. top, bottom, right, left)',
'TEXT',
TRUE,
TRUE
),
(
'tracking',
'color',
'Color of the tracked item (e.g. success, warning, danger)',
'TEXT',
FALSE,
TRUE
),
(
'tracking',
'title',
'Description of the state.',
'TEXT',
FALSE,
FALSE
),
(
'tracking',
'center',
'Whether to center the component.',
'BOOLEAN',
TRUE,
TRUE
);
-- Insert example(s) for the component
INSERT INTO example(component, description, properties)
VALUES
(
'tracking',
'A basic example of servers tracking component',
JSON(
'[
{"component":"tracking","title":"Servers status"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"},
{"title":"No data"}
]'
)
),
(
'tracking',
'An example of servers tracking component',
JSON(
'[
{"component":"tracking","title":"Servers status","information":"60% are running","description_md":"Status of all **currently running servers**","placement":"top","width":4},
{"color":"success","title":"operational"},
{"color":"success","title":"operational"},
{"color":"success","title":"operational"},
{"color":"danger","title":"Downtime"},
{"title":"No data"},
{"color":"success","title":"operational"},
{"color":"warning","title":"Big load"},
{"color":"success","title":"operational"}
]'
)
);