mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 11:21:29 +00:00
fix: update widget name rules and the association selector options (#119)
This commit is contained in:
@@ -51,9 +51,15 @@ const widgets = computed(() => {
|
||||
const items = widgets.filter(
|
||||
(d: { value: string; label: string } & LayoutConfig) => {
|
||||
if (dashboardStore.selectedGrid.id !== d.id) {
|
||||
if (isLinear && d.type === "Widget" && d.widget && d.id) {
|
||||
if (
|
||||
isLinear &&
|
||||
d.type === "Widget" &&
|
||||
d.widget &&
|
||||
d.widget.name &&
|
||||
d.id
|
||||
) {
|
||||
d.value = d.id;
|
||||
d.label = d.widget.name || d.id;
|
||||
d.label = d.widget.name;
|
||||
return d;
|
||||
}
|
||||
// if (isRank && d.type !== "Widget" && d.widget && d.id) {
|
||||
|
@@ -74,7 +74,7 @@ function updateWidgetConfig(param: { [key: string]: string }) {
|
||||
function updateWidgetName(param: { [key: string]: string }) {
|
||||
const key = Object.keys(param)[0];
|
||||
const n = decodeURIComponent(param[key]);
|
||||
const pattern = /^[A-Za-z0-9-_\u4e00-\u9fa5]{1,30}$/;
|
||||
const pattern = /^[A-Za-z0-9-_\u4e00-\u9fa5]{1,300}$/;
|
||||
if (!pattern.test(n)) {
|
||||
ElMessage.error(t("nameTip"));
|
||||
return;
|
||||
|
Reference in New Issue
Block a user