From 69264b6ec613069e8096621774b94174b0557459 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 1 Jun 2026 15:25:29 +0800 Subject: [PATCH] restrict my-today-models and customer-monitor to customer.* role only --- wwwroot/index.ui | 63 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 2a44904..394b69d 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -495,7 +495,68 @@ } ] } - {% if 'owner.*' not in roles %} + {% if 'customer.*' in roles %} + ,{ + "widgettype": "VBox", + "options": { + "css": "card", + "width": "100%", + "borderRadius": "12px", + "padding": "20px", + "marginTop": "20px" + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "width": "100%", + "alignItems": "center", + "marginBottom": "16px" + }, + "subwidgets": [ + { + "widgettype": "Title4", + "options": { + "fontWeight": "600", + "otext": "我的今日模型使用", + "i18n": true + } + }, + { + "widgettype": "Filler" + }, + { + "widgettype": "Button", + "options": { + "label": "刷新", + "border": "none", + "borderRadius": "6px", + "padding": "4px 12px", + "fontSize": "12px" + }, + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "method", + "target": "-@ChartBar", + "method": "render_urldata", + "params": {} + } + ] + } + ] + }, + { + "widgettype": "urlwidget", + "options": { + "url": "{{entire_url('user_today_models_chart.ui')}}" + } + } + ] + } + {% endif %} + {% if 'owner.*' not in roles and 'customer.*' in roles %} ,{ "widgettype": "VBox", "options": {