mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
update widget name
This commit is contained in:
parent
ae294d48e8
commit
7330443f64
@ -146,6 +146,7 @@ const msg = {
|
||||
widget: "Widget",
|
||||
nameTip:
|
||||
"The name only supports Chinese and English, horizontal lines and underscores",
|
||||
duplicateName: "Duplicate name",
|
||||
seconds: "Seconds",
|
||||
hourTip: "Select Hour",
|
||||
minuteTip: "Select Minute",
|
||||
|
@ -144,6 +144,7 @@ const msg = {
|
||||
begin: "Inicio",
|
||||
associateOptions: "Opciones de asociación",
|
||||
widget: "Dispositivo pequeño",
|
||||
duplicateName: "Nombre duplicado",
|
||||
nameTip:
|
||||
"Este nombre sólo admite chino e inglés, líneas cruzadas y subrayado",
|
||||
seconds: "Segundos",
|
||||
|
@ -143,6 +143,7 @@ const msg = {
|
||||
associateOptions: "关联选项",
|
||||
widget: "部件",
|
||||
nameTip: "该名称仅支持中文和英文、横线和下划线",
|
||||
duplicateName: "重复的名称",
|
||||
seconds: "秒",
|
||||
hourTip: "选择小时",
|
||||
minuteTip: "选择分钟",
|
||||
|
@ -76,7 +76,7 @@ function updateWidgetName(param: { [key: string]: string }) {
|
||||
const n = decodeURIComponent(param[key]);
|
||||
const pattern = /^[A-Za-z0-9-_\u4e00-\u9fa5]{1,30}$/;
|
||||
if (!pattern.test(n)) {
|
||||
ElMessage.warning(t("nameTip"));
|
||||
ElMessage.error(t("nameTip"));
|
||||
return;
|
||||
}
|
||||
const { widgets } = getDashboard(dashboardStore.currentDashboard);
|
||||
@ -84,7 +84,7 @@ function updateWidgetName(param: { [key: string]: string }) {
|
||||
(d: LayoutConfig) => d.widget && d.widget.name === n
|
||||
);
|
||||
if (item) {
|
||||
ElMessage.warning("Duplicate name");
|
||||
ElMessage.error("Duplicate name");
|
||||
return;
|
||||
}
|
||||
updateWidgetConfig(param);
|
||||
|
Loading…
Reference in New Issue
Block a user