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

Merge pull request #3567 from Steve-Mcl/notification-buttons

Add "search for" buttons to notifications
This commit is contained in:
Nick O'Leary 2022-05-03 09:23:21 +01:00 committed by GitHub
commit a2f750ed1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 85 additions and 16 deletions

View File

@ -185,7 +185,8 @@
"create-default-package": "Standardpaketdatei erstellen",
"no-thanks": "Nein, Danke",
"create-default-project": "Standardprojektdateien erstellen",
"show-merge-conflicts": "Merge-Konflikte anzeigen"
"show-merge-conflicts": "Merge-Konflikte anzeigen",
"unknownNodesButton": "Finden Sie unbekannte nodes"
}
},
"clipboard": {
@ -269,7 +270,9 @@
"successfulRestart": "Flows erfolgreich neugestartet",
"deployFailed": "Übernahme (deploy) fehlgeschlagen: __message__",
"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": {
"noResponse": "Keine Antwort vom Server"
},

View File

@ -217,7 +217,8 @@
"create-default-package": "Create default package file",
"no-thanks": "No thanks",
"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": {
@ -301,7 +302,9 @@
"successfulRestart": "Successfully restarted flows",
"deployFailed": "Deploy failed: __message__",
"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": {
"noResponse": "no response from server"
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -358,6 +358,14 @@ var RED = (function() {
} else {
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"),
click: function() {
persistentNotifications[notificationId].hideNotification();

View File

@ -383,6 +383,14 @@ RED.deploy = (function() {
"</p>";
notificationButtons = [
{
text: RED._("deploy.unknownNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","type:unknown ");
}
},
{
id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
@ -402,6 +410,14 @@ RED.deploy = (function() {
RED._('deploy.confirm.confirm') +
"</p>";
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",
text: RED._("deploy.confirm.button.confirm"),
@ -462,9 +478,33 @@ RED.deploy = (function() {
RED.nodes.version(data.rev);
RED.nodes.originalFlow(nns);
if (hasUnusedConfig) {
RED.notify(
let notification;
const opts = {
type: "success",
fixed: false,
timeout: 6000,
buttons: [
{
text: RED._("deploy.unusedConfigNodesButton"),
class: "pull-left",
click: function() {
notification.close();
RED.actions.invoke("core:search","is:config is:unused ");
}
},
{
text: RED._("common.label.close"),
class: "primary",
click: function () {
save(true);
notification.close();
}
}
]
}
notification = RED.notify(
'<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 {
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
}