1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add "search for" buttons to notifications

This commit is contained in:
Steve-Mcl 2022-05-01 16:48:04 +01:00
parent 4fb8292618
commit 8a972ee543
9 changed files with 81 additions and 15 deletions

View File

@ -185,7 +185,8 @@
"create-default-package": "Standardpaketdatei erstellen", "create-default-package": "Standardpaketdatei erstellen",
"no-thanks": "Nein, Danke", "no-thanks": "Nein, Danke",
"create-default-project": "Standardprojektdateien erstellen", "create-default-project": "Standardprojektdateien erstellen",
"show-merge-conflicts": "Merge-Konflikte anzeigen" "show-merge-conflicts": "Merge-Konflikte anzeigen",
"unknownNodesButton": "Search for unknown nodes"
} }
}, },
"clipboard": { "clipboard": {
@ -269,7 +270,9 @@
"successfulRestart": "Flows erfolgreich neugestartet", "successfulRestart": "Flows erfolgreich neugestartet",
"deployFailed": "Übernahme (deploy) fehlgeschlagen: __message__", "deployFailed": "Übernahme (deploy) fehlgeschlagen: __message__",
"unusedConfigNodes": "Einige Konfigurations-Nodes werden nicht verwendet.", "unusedConfigNodes": "Einige Konfigurations-Nodes werden nicht verwendet.",
"unusedConfigNodesLink": "Hier klicken, um sie anzuschauen.", "unusedConfigNodesButton":"Finden Sie ungenutzte konfig nodes",
"unknownNodesButton":"Finden Sie unbekannte nodes",
"invalidNodesButton":"Finden Sie ungültige nodes",
"errors": { "errors": {
"noResponse": "Keine Antwort vom Server" "noResponse": "Keine Antwort vom Server"
}, },

View File

@ -217,7 +217,8 @@
"create-default-package": "Create default package file", "create-default-package": "Create default package file",
"no-thanks": "No thanks", "no-thanks": "No thanks",
"create-default-project": "Create default project files", "create-default-project": "Create default project files",
"show-merge-conflicts": "Show merge conflicts" "show-merge-conflicts": "Show merge conflicts",
"unknownNodesButton": "Search for unknown nodes"
} }
}, },
"clipboard": { "clipboard": {
@ -301,7 +302,9 @@
"successfulRestart": "Successfully restarted flows", "successfulRestart": "Successfully restarted flows",
"deployFailed": "Deploy failed: __message__", "deployFailed": "Deploy failed: __message__",
"unusedConfigNodes":"You have some unused configuration nodes.", "unusedConfigNodes":"You have some unused configuration nodes.",
"unusedConfigNodesLink":"Click here to see them", "unusedConfigNodesButton":"Search unused config nodes",
"unknownNodesButton":"Search for unknown nodes",
"invalidNodesButton":"Search for invalid nodes",
"errors": { "errors": {
"noResponse": "no response from server" "noResponse": "no response from server"
}, },

View File

@ -217,7 +217,8 @@
"create-default-package": "デフォルトパッケージファイルの作成", "create-default-package": "デフォルトパッケージファイルの作成",
"no-thanks": "不要", "no-thanks": "不要",
"create-default-project": "デフォルトプロジェクトファイルの作成", "create-default-project": "デフォルトプロジェクトファイルの作成",
"show-merge-conflicts": "マージ競合を表示" "show-merge-conflicts": "マージ競合を表示",
"unknownNodesButton": "不明なノードを検索する"
} }
}, },
"clipboard": { "clipboard": {
@ -301,7 +302,9 @@
"successfulRestart": "フローの再起動が成功しました", "successfulRestart": "フローの再起動が成功しました",
"deployFailed": "デプロイが失敗しました: __message__", "deployFailed": "デプロイが失敗しました: __message__",
"unusedConfigNodes": "使われていない設定ノードがあります。", "unusedConfigNodes": "使われていない設定ノードがあります。",
"unusedConfigNodesLink": "設定を参照する", "unusedConfigNodesButton":"未使用の構成ノードを検索",
"unknownNodesButton":"不明なノードを検索する",
"invalidNodesButton":"無効なノードを検索する",
"errors": { "errors": {
"noResponse": "サーバの応答がありません" "noResponse": "サーバの応答がありません"
}, },

View File

@ -141,7 +141,8 @@
"create-default-package": "기본 패키지 파일 생성", "create-default-package": "기본 패키지 파일 생성",
"no-thanks": "괜찮습니다", "no-thanks": "괜찮습니다",
"create-default-project": "기본 프로젝트 파일 생성", "create-default-project": "기본 프로젝트 파일 생성",
"show-merge-conflicts": "병합 충돌 보여주기" "show-merge-conflicts": "병합 충돌 보여주기",
"unknownNodesButton": "알 수 없는 노드 검색"
} }
}, },
"clipboard": { "clipboard": {
@ -203,7 +204,9 @@
"successfulRestart": "플로우 재시작을 성공했습니다", "successfulRestart": "플로우 재시작을 성공했습니다",
"deployFailed": "배포 실패 : __message__", "deployFailed": "배포 실패 : __message__",
"unusedConfigNodes": "사용되지 않는 설정노드가 있습니다", "unusedConfigNodes": "사용되지 않는 설정노드가 있습니다",
"unusedConfigNodesLink": "여기를 클릭하면 볼 수 있습니다", "unusedConfigNodesButton":"사용하지 않는 구성 노드 검색",
"unknownNodesButton":"알 수 없는 노드 검색",
"invalidNodesButton":"잘못된 노드 검색",
"errors": { "errors": {
"noResponse": "서버의 응답이 없습니다" "noResponse": "서버의 응답이 없습니다"
}, },

View File

@ -183,7 +183,8 @@
"create-default-package": "Создать файл пакета по умолчанию", "create-default-package": "Создать файл пакета по умолчанию",
"no-thanks": "Нет, спасибо", "no-thanks": "Нет, спасибо",
"create-default-project": "Создать файлы проекта по умолчанию", "create-default-project": "Создать файлы проекта по умолчанию",
"show-merge-conflicts": "Показать конфликты слияния" "show-merge-conflicts": "Показать конфликты слияния",
"unknownNodesButton": "Поиск неизвестных узлов"
} }
}, },
"clipboard": { "clipboard": {
@ -277,7 +278,9 @@
"successfulRestart": "Потоки успешно перезапущены", "successfulRestart": "Потоки успешно перезапущены",
"deployFailed": "Развертывание не удалось: __message__", "deployFailed": "Развертывание не удалось: __message__",
"unusedConfigNodes":"У вас есть неиспользуемых узлы конфигурации.", "unusedConfigNodes":"У вас есть неиспользуемых узлы конфигурации.",
"unusedConfigNodesLink":"Нажмите здесь, чтобы их увидеть", "unusedConfigNodesButton":"Поиск неиспользуемых узлов конфигурации",
"unknownNodesButton":"Поиск неизвестных узлов",
"invalidNodesButton":"Поиск недопустимых узлов",
"errors": { "errors": {
"noResponse": "нет ответа от сервера" "noResponse": "нет ответа от сервера"
}, },

View File

@ -182,7 +182,8 @@
"create-default-package": "创建默认的包文件", "create-default-package": "创建默认的包文件",
"no-thanks": "不了,谢谢", "no-thanks": "不了,谢谢",
"create-default-project": "创建默认项目文件", "create-default-project": "创建默认项目文件",
"show-merge-conflicts": "显示合并冲突" "show-merge-conflicts": "显示合并冲突",
"unknownNodesButton": "搜索未知节点"
} }
}, },
"clipboard": { "clipboard": {
@ -264,7 +265,9 @@
"successfulRestart": "成功重启流程", "successfulRestart": "成功重启流程",
"deployFailed": "部署失败: __message__", "deployFailed": "部署失败: __message__",
"unusedConfigNodes": "您有一些未使用的配置节点", "unusedConfigNodes": "您有一些未使用的配置节点",
"unusedConfigNodesLink": "点击此处查看它们", "unusedConfigNodesButton":"搜索未使用的配置节点",
"unknownNodesButton":"搜索未知节点",
"invalidNodesButton":"搜索无效节点",
"errors": { "errors": {
"noResponse": "服务器没有响应" "noResponse": "服务器没有响应"
}, },

View File

@ -182,7 +182,8 @@
"create-default-package": "創建默認的包文件", "create-default-package": "創建默認的包文件",
"no-thanks": "不了,謝謝", "no-thanks": "不了,謝謝",
"create-default-project": "創建默認項目文件", "create-default-project": "創建默認項目文件",
"show-merge-conflicts": "顯示合併衝突" "show-merge-conflicts": "顯示合併衝突",
"unknownNodesButton": "搜索未知節點"
} }
}, },
"clipboard": { "clipboard": {
@ -264,7 +265,9 @@
"successfulRestart": "成功重啟流程", "successfulRestart": "成功重啟流程",
"deployFailed": "部署失敗: __message__", "deployFailed": "部署失敗: __message__",
"unusedConfigNodes": "您有一些未使用的配置節點", "unusedConfigNodes": "您有一些未使用的配置節點",
"unusedConfigNodesLink": "點擊此處查看它們", "unusedConfigNodesButton":"搜索未使用的配置節點",
"unknownNodesButton":"搜索未知節點",
"invalidNodesButton":"搜索無效節點",
"errors": { "errors": {
"noResponse": "伺服器沒有回應" "noResponse": "伺服器沒有回應"
}, },

View File

@ -358,6 +358,14 @@ var RED = (function() {
} else { } else {
options.buttons = [ options.buttons = [
{ {
text: RED._("notification.label.unknownNodesButton"),
class: "pull-left",
click: function() {
RED.actions.invoke("core:search", "type:unknown");
}
},
{
class: "primary",
text: RED._("common.label.close"), text: RED._("common.label.close"),
click: function() { click: function() {
persistentNotifications[notificationId].hideNotification(); persistentNotifications[notificationId].hideNotification();

View File

@ -383,6 +383,13 @@ RED.deploy = (function() {
"</p>"; "</p>";
notificationButtons = [ notificationButtons = [
{
text: RED._("deploy.unknownNodesButton"),
class: "pull-left",
click: function() {
RED.actions.invoke("core:search","type:unknown");
}
},
{ {
id: "red-ui-deploy-dialog-confirm-deploy-deploy", id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"), text: RED._("deploy.confirm.button.confirm"),
@ -402,6 +409,14 @@ RED.deploy = (function() {
RED._('deploy.confirm.confirm') + RED._('deploy.confirm.confirm') +
"</p>"; "</p>";
notificationButtons = [ notificationButtons = [
{
text: RED._("deploy.invalidNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","is:invalid");
}
},
{ {
id: "red-ui-deploy-dialog-confirm-deploy-deploy", id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"), text: RED._("deploy.confirm.button.confirm"),
@ -462,9 +477,31 @@ RED.deploy = (function() {
RED.nodes.version(data.rev); RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns); RED.nodes.originalFlow(nns);
if (hasUnusedConfig) { if (hasUnusedConfig) {
const opts = {
type: "success",
fixed: false,
timeout: 6000,
buttons: [
{
text: RED._("deploy.unusedConfigNodesButton"),
class: "pull-left",
click: function() {
RED.actions.invoke("core:search","is:config is:unused");
}
},
{
text: RED._("common.label.close"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
]
}
RED.notify( RED.notify(
'<p>' + RED._("deploy.successfulDeploy") + '</p>' + '<p>' + RED._("deploy.successfulDeploy") + '</p>' +
'<p>' + RED._("deploy.unusedConfigNodes") + ' <a href="#" onclick="RED.sidebar.config.show(true); return false;">' + RED._("deploy.unusedConfigNodesLink") + '</a></p>', "success", false, 6000); '<p>' + RED._("deploy.unusedConfigNodes") + '</p>', opts);
} else { } else {
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success"); RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
} }