File tree 3 files changed +26
-58
lines changed
advanced_examples/parameters_example
widget_examples/metric_widget 3 files changed +26
-58
lines changed Original file line number Diff line number Diff line change 76
76
"params" : [
77
77
{
78
78
"paramName" : " chain" ,
79
- "description" : " Select a chain to get historical TVL " ,
79
+ "description" : " Select a chain to get historical TVL11 " ,
80
80
"value" : " Ethereum" ,
81
81
"label" : " Chain" ,
82
82
"type" : " endpoint" ,
83
- "optionsEndpoint" : " get_chains_list"
83
+ "optionsEndpoint" : " get_chains_list" ,
84
+ "style" : {
85
+ "popupWidth" : 950
86
+ }
84
87
},
85
88
{
86
89
"paramName" : " chain2" ,
87
- "description" : " Select a chain to get historical TVL " ,
90
+ "description" : " Select a chain to get historical TVL22 " ,
88
91
"value" : " Ethereum" ,
89
92
"label" : " Chain" ,
90
93
"type" : " endpoint" ,
91
- "optionsEndpoint" : " get_chains_list_advanced"
94
+ "optionsEndpoint" : " get_chains_list_advanced" ,
95
+ "style" : {
96
+ "popupWidth" : 200
97
+ }
92
98
},
93
99
{
94
100
"paramName" : " tickerPicker" ,
99
105
}
100
106
]
101
107
}
102
- }
108
+ }
Original file line number Diff line number Diff line change @@ -41,19 +41,24 @@ def test_metric():
41
41
data = [{
42
42
"label" : "Example Label" ,
43
43
"value" : "12345" ,
44
- "delta" : "5.67 "
44
+ "delta" : "0.01 "
45
45
},
46
46
{
47
47
"label" : "Example Label 2" ,
48
48
"value" : "12345" ,
49
- "delta" : "5.67 "
49
+ "delta" : "-0.01 "
50
50
},
51
51
{
52
52
"label" : "Example Label 3" ,
53
53
"value" : "12345" ,
54
54
"delta" : "5.67"
55
55
},
56
56
{
57
+ "label" : "Example Label 4" ,
58
+ "value" : "12345" ,
59
+ "delta" : "0.00"
60
+ },
61
+ {
57
62
"label" : "Example Label 4" ,
58
63
"value" : "12345"
59
64
}
Original file line number Diff line number Diff line change 1
1
{
2
- "whitepapers " : {
3
- "name" : " Whitepapers " ,
4
- "description" : " List of available whitepapers " ,
5
- "category" : " Documents " ,
6
- "endpoint" : " /random/whitepapers/view-base64 " ,
2
+ "test_metric " : {
3
+ "name" : " Metric Widget " ,
4
+ "description" : " A metric widget example " ,
5
+ "category" : " Test " ,
6
+ "endpoint" : " test_metric " ,
7
7
"gridData" : {
8
- "w" : 40 ,
9
- "h" : 10
8
+ "w" : 5 ,
9
+ "h" : 5
10
10
},
11
- "type" : " multi_file_viewer" ,
12
- "params" : [
13
- {
14
- "type" : " endpoint" ,
15
- "paramName" : " whitepaper" ,
16
- "value" : " http://localhost:3000/random/whitepapers" ,
17
- "label" : " Whitepaper" ,
18
- "description" : " Whitepaper to display." ,
19
- "optionsEndpoint" : " /random/whitepapers" ,
20
- "show" : false ,
21
- "optionsParams" : {
22
- "type" : " $type"
23
- }
24
- },
25
- {
26
- "type" : " text" ,
27
- "paramName" : " type" ,
28
- "value" : " all" ,
29
- "label" : " Type of whitepaper" ,
30
- "description" : " Type of whitepaper to fetch." ,
31
- "options" : [
32
- {
33
- "label" : " All" ,
34
- "value" : " all"
35
- },
36
- {
37
- "label" : " L1" ,
38
- "value" : " l1"
39
- },
40
- {
41
- "label" : " L2" ,
42
- "value" : " l2"
43
- },
44
- {
45
- "label" : " Oracles" ,
46
- "value" : " oracles"
47
- },
48
- {
49
- "label" : " Defi" ,
50
- "value" : " defi"
51
- }
52
- ]
53
- }
54
- ]
11
+ "type" : " metric"
55
12
}
56
13
}
You can’t perform that action at this time.
0 commit comments