refactor: arrange model/user/provider charts in single row
This commit is contained in:
parent
80785e7ace
commit
c89c0d89de
@ -1,7 +1,7 @@
|
||||
{
|
||||
"widgettype": "ChartBar",
|
||||
"options": {
|
||||
"height": "280px",
|
||||
"height": "250px",
|
||||
"width": "100%",
|
||||
"data_url": "{{entire_url('api/top_models.dspy')}}",
|
||||
"nameField": "model_name",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"widgettype": "ChartBar",
|
||||
"options": {
|
||||
"height": "300px",
|
||||
"height": "250px",
|
||||
"data_url": "{{entire_url('api/top_providers.dspy')}}",
|
||||
"nameField": "provider_name",
|
||||
"valueFields": ["total_amount", "cnt"]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"widgettype": "ChartBar",
|
||||
"options": {
|
||||
"height": "300px",
|
||||
"height": "250px",
|
||||
"data_url": "{{entire_url('api/top_users.dspy')}}",
|
||||
"nameField": "user_name",
|
||||
"valueFields": ["total_amount", "cnt"]
|
||||
|
||||
124
wwwroot/index.ui
124
wwwroot/index.ui
@ -150,7 +150,7 @@
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"gap": "20px",
|
||||
"gap": "16px",
|
||||
"height": "auto"
|
||||
},
|
||||
"subwidgets": [
|
||||
@ -158,9 +158,9 @@
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "100%",
|
||||
"width": "33%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px"
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -168,7 +168,7 @@
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"alignItems": "center",
|
||||
"marginBottom": "16px"
|
||||
"marginBottom": "12px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -213,6 +213,62 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "33%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "12px",
|
||||
"otext": "用户排行",
|
||||
"i18n": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "chart_top_users",
|
||||
"options": {
|
||||
"period_seconds": 60,
|
||||
"url": "{{entire_url('chart_top_users.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "33%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "12px",
|
||||
"otext": "供应商排行",
|
||||
"i18n": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "chart_top_providers",
|
||||
"options": {
|
||||
"period_seconds": 60,
|
||||
"url": "{{entire_url('chart_top_providers.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -355,66 +411,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endif %}
|
||||
{% if 'owner.*' in roles or 'reseller.*' in roles %}
|
||||
,{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "100%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"marginTop": "20px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "16px",
|
||||
"otext": "用户排行",
|
||||
"i18n": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "chart_top_users",
|
||||
"options": {
|
||||
"period_seconds": 60,
|
||||
"url": "{{entire_url('chart_top_users.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"css": "card",
|
||||
"width": "100%",
|
||||
"borderRadius": "12px",
|
||||
"padding": "20px",
|
||||
"marginTop": "20px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Title4",
|
||||
"options": {
|
||||
"fontWeight": "600",
|
||||
"marginBottom": "16px",
|
||||
"otext": "供应商排行",
|
||||
"i18n": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "RefreshWidget",
|
||||
"id": "chart_top_providers",
|
||||
"options": {
|
||||
"period_seconds": 60,
|
||||
"url": "{{entire_url('chart_top_providers.ui')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endif %}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user