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

Merge pull request #3395 from Steve-Mcl/search-options

Add info-tab search options dropdown to the regular search
This commit is contained in:
Nick O'Leary 2022-03-03 21:53:21 +00:00 committed by GitHub
commit 3e102ef760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 73 additions and 70 deletions

View File

@ -634,14 +634,7 @@
"empty": "leer", "empty": "leer",
"globalConfig": "Globale Konfigurations-Nodes", "globalConfig": "Globale Konfigurations-Nodes",
"triggerAction": "Auslösen", "triggerAction": "Auslösen",
"find": "Suche im Arbeitsbereich", "find": "Suche im Arbeitsbereich"
"search": {
"configNodes": "Konfigurations-Nodes",
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
"invalidNodes": "Ungültige Nodes",
"uknownNodes": "Unbekannte Nodes",
"unusedSubflows": "Unbenutzte Subflows"
}
}, },
"help": { "help": {
"name": "Hilfe", "name": "Hilfe",
@ -863,7 +856,14 @@
}, },
"search": { "search": {
"empty": "Keine Übereinstimmungen gefunden", "empty": "Keine Übereinstimmungen gefunden",
"addNode": "Node hinzufügen ..." "addNode": "Node hinzufügen ...",
"options": {
"configNodes": "Konfigurations-Nodes",
"unusedConfigNodes": "Unbenutzte Konfigurations-Nodes",
"invalidNodes": "Ungültige Nodes",
"uknownNodes": "Unbekannte Nodes",
"unusedSubflows": "Unbenutzte Subflows"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "Funktionen", "functions": "Funktionen",

View File

@ -667,16 +667,7 @@
"empty": "empty", "empty": "empty",
"globalConfig": "Global Configuration Nodes", "globalConfig": "Global Configuration Nodes",
"triggerAction": "Trigger action", "triggerAction": "Trigger action",
"find": "Find in workspace", "find": "Find in workspace"
"search": {
"configNodes": "Configuration nodes",
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows",
"modifiedNodes": "Modified nodes and flows"
}
}, },
"help": { "help": {
"name": "Help", "name": "Help",
@ -900,7 +891,16 @@
"history": "Search history", "history": "Search history",
"clear": "clear all", "clear": "clear all",
"empty": "No matches found", "empty": "No matches found",
"addNode": "add a node..." "addNode": "add a node...",
"options": {
"configNodes": "Configuration nodes",
"unusedConfigNodes": "Unused configuration nodes",
"invalidNodes": "Invalid nodes",
"uknownNodes": "Unknown nodes",
"unusedSubflows": "Unused subflows",
"hiddenFlows": "Hidden flows",
"modifiedNodes": "Modified nodes and flows"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "Functions", "functions": "Functions",

View File

@ -667,15 +667,7 @@
"empty": "空", "empty": "空",
"globalConfig": "グローバル設定ノード", "globalConfig": "グローバル設定ノード",
"triggerAction": "アクションを実行", "triggerAction": "アクションを実行",
"find": "ワークスペース内を検索", "find": "ワークスペース内を検索"
"search": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
}
}, },
"help": { "help": {
"name": "ヘルプ", "name": "ヘルプ",
@ -899,7 +891,15 @@
"history": "検索履歴", "history": "検索履歴",
"clear": "全て削除", "clear": "全て削除",
"empty": "一致したものが見つかりませんでした", "empty": "一致したものが見つかりませんでした",
"addNode": "ノードを追加..." "addNode": "ノードを追加...",
"options": {
"configNodes": "設定ノード",
"unusedConfigNodes": "未使用の設定ノード",
"invalidNodes": "不正なノード",
"uknownNodes": "未知のノード",
"unusedSubflows": "未使用のサブフロー",
"hiddenFlows": "非表示のフロー"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "関数", "functions": "関数",

View File

@ -650,14 +650,7 @@
"empty": "пусто", "empty": "пусто",
"globalConfig": "Глобальные конфиг узлы", "globalConfig": "Глобальные конфиг узлы",
"triggerAction": "Вызвать действие", "triggerAction": "Вызвать действие",
"find": "Найти в рабочей области", "find": "Найти в рабочей области"
"search": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
}, },
"help": { "help": {
"name": "Справка", "name": "Справка",
@ -888,7 +881,14 @@
}, },
"search": { "search": {
"empty": "Ничего не найдено", "empty": "Ничего не найдено",
"addNode": "добавить узел..." "addNode": "добавить узел...",
"options": {
"configNodes": "Узлы конфигурации",
"unusedConfigNodes": "Неиспользуемые узлы конфигурации",
"invalidNodes": "Недействительные узлы",
"uknownNodes": "Неизвестные узлы",
"unusedSubflows": "Неиспользуемые подпотоки"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "Функции", "functions": "Функции",

View File

@ -614,14 +614,7 @@
"empty": "空的", "empty": "空的",
"globalConfig": "全局配置节点", "globalConfig": "全局配置节点",
"triggerAction": "触发动作", "triggerAction": "触发动作",
"find": "在工作区中查找", "find": "在工作区中查找"
"search": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
}, },
"help": { "help": {
"name": "帮助", "name": "帮助",
@ -842,7 +835,14 @@
}, },
"search": { "search": {
"empty": "找不到匹配", "empty": "找不到匹配",
"addNode": "添加一个节点..." "addNode": "添加一个节点...",
"options": {
"configNodes": "配置节点",
"unusedConfigNodes": "未使用的配置节点",
"invalidNodes": "无效的节点",
"uknownNodes": "未知的节点",
"unusedSubflows": "未使用的子流程"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "功能", "functions": "功能",

View File

@ -614,14 +614,7 @@
"empty": "空的", "empty": "空的",
"globalConfig": "全局配置節點", "globalConfig": "全局配置節點",
"triggerAction": "觸發動作", "triggerAction": "觸發動作",
"find": "在工作區中查找", "find": "在工作區中查找"
"search": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
}, },
"help": { "help": {
"name": "幫助", "name": "幫助",
@ -842,7 +835,14 @@
}, },
"search": { "search": {
"empty": "找不到匹配", "empty": "找不到匹配",
"addNode": "添加一個節點..." "addNode": "添加一個節點...",
"options": {
"configNodes": "配置節點",
"unusedConfigNodes": "未使用的配置節點",
"invalidNodes": "無效的節點",
"uknownNodes": "未知的節點",
"unusedSubflows": "未使用的子流程"
}
}, },
"expressionEditor": { "expressionEditor": {
"functions": "功能", "functions": "功能",

View File

@ -267,9 +267,8 @@ RED.search = (function() {
} else { } else {
searchResults.editableList('addItem',{}); searchResults.editableList('addItem',{});
} }
},
options: getSearchOptions()
}
}); });
var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) { var copySearchContainer = $('<button type="button" class="red-ui-button red-ui-button-small"><i class="fa fa-caret-right"></button>').appendTo(searchDiv).on('click', function(evt) {
evt.preventDefault(); evt.preventDefault();
@ -504,6 +503,17 @@ RED.search = (function() {
addItemToIndex(item); addItemToIndex(item);
} }
function getSearchOptions() {
return [
{label:RED._("search.options.configNodes"), value:"is:config"},
{label:RED._("search.options.unusedConfigNodes"), value:"is:config is:unused"},
{label:RED._("search.options.modifiedNodes"), value:"is:modified"},
{label:RED._("search.options.invalidNodes"), value: "is:invalid"},
{label:RED._("search.options.uknownNodes"), value: "type:unknown"},
{label:RED._("search.options.unusedSubflows"), value:"is:subflow is:unused"},
{label:RED._("search.options.hiddenFlows"), value:"is:hidden"},
]
}
function init() { function init() {
RED.actions.add("core:search",show); RED.actions.add("core:search",show);
@ -547,7 +557,8 @@ RED.search = (function() {
init: init, init: init,
show: show, show: show,
hide: hide, hide: hide,
search: search search: search,
getSearchOptions: getSearchOptions
}; };
})(); })();

View File

@ -268,15 +268,7 @@ RED.sidebar.info.outliner = (function() {
} }
}, },
options: [ options: RED.search.getSearchOptions()
{label:RED._("sidebar.info.search.configNodes"), value:"is:config"},
{label:RED._("sidebar.info.search.unusedConfigNodes"), value:"is:config is:unused"},
{label:RED._("sidebar.info.search.modifiedNodes"), value:"is:modified"},
{label:RED._("sidebar.info.search.invalidNodes"), value: "is:invalid"},
{label:RED._("sidebar.info.search.uknownNodes"), value: "type:unknown"},
{label:RED._("sidebar.info.search.unusedSubflows"), value:"is:subflow is:unused"},
{label:RED._("sidebar.info.search.hiddenFlows"), value:"is:hidden"},
]
}); });
projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container) projectInfo = $('<div class="red-ui-treeList-label red-ui-info-outline-project"><span class="red-ui-treeList-icon"><i class="fa fa-archive"></i></span></div>').hide().appendTo(container)