@flowfuse/node-red-dashboard 1.1.0 → 1.1.1-443cd97-202402211638.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/config/locales/en-US/ui_base.html +20 -0
- package/nodes/config/locales/en-US/ui_base.json +17 -2
- package/nodes/config/locales/en-US/ui_group.json +1 -1
- package/nodes/config/locales/en-US/ui_page.html +2 -9
- package/nodes/config/locales/en-US/ui_page.json +1 -1
- package/nodes/config/locales/en-US/ui_theme.json +20 -0
- package/nodes/config/locales/ja/ui_base.json +9 -0
- package/nodes/config/locales/ja/ui_group.json +1 -1
- package/nodes/config/locales/ja/ui_page.html +7 -14
- package/nodes/config/locales/ja/ui_page.json +3 -3
- package/nodes/config/locales/ja/ui_theme.json +20 -0
- package/nodes/config/ui_base.html +27 -12
- package/nodes/config/ui_base.js +24 -6
- package/nodes/config/ui_group.html +3 -3
- package/nodes/config/ui_page.html +3 -4
- package/nodes/config/ui_theme.html +17 -17
- package/nodes/widgets/locales/en-US/ui_button.json +4 -3
- package/nodes/widgets/locales/en-US/ui_form.html +1 -1
- package/nodes/widgets/locales/en-US/ui_form.json +7 -5
- package/nodes/widgets/locales/en-US/ui_gauge.json +4 -2
- package/nodes/widgets/locales/en-US/ui_table.json +14 -0
- package/nodes/widgets/locales/en-US/ui_template.json +4 -1
- package/nodes/widgets/locales/en-US/ui_text.html +2 -2
- package/nodes/widgets/locales/en-US/ui_text.json +20 -0
- package/nodes/widgets/locales/ja/ui_button.html +12 -0
- package/nodes/widgets/locales/ja/ui_button.json +25 -0
- package/nodes/widgets/locales/ja/ui_form.html +22 -0
- package/nodes/widgets/locales/ja/ui_form.json +38 -0
- package/nodes/widgets/locales/ja/ui_table.json +14 -0
- package/nodes/widgets/locales/ja/ui_template.json +23 -0
- package/nodes/widgets/locales/ja/ui_text.html +19 -0
- package/nodes/widgets/locales/ja/ui_text.json +20 -0
- package/nodes/widgets/ui_button.html +5 -5
- package/nodes/widgets/ui_event.js +0 -1
- package/nodes/widgets/ui_form.html +8 -8
- package/nodes/widgets/ui_gauge.html +6 -1
- package/nodes/widgets/ui_table.html +10 -10
- package/nodes/widgets/ui_template.html +7 -7
- package/nodes/widgets/ui_text.html +24 -24
- package/package.json +6 -2
- package/dist/assets/array-Nw74a44z.js +0 -1
- package/dist/assets/c4Diagram-c0b17d02-nPeewnzy.js +0 -10
- package/dist/assets/classDiagram-a8cc8886-_g3mOFQf.js +0 -1
- package/dist/assets/classDiagram-v2-802a48d3-RMKbbXCG.js +0 -2
- package/dist/assets/createText-3b1f58a4-xktEn8Ka.js +0 -7
- package/dist/assets/edges-0005682e-PPCHAP84.js +0 -4
- package/dist/assets/erDiagram-dedf2781-jEaeCbvl.js +0 -51
- package/dist/assets/flowDb-ff651a22-bIPiAZg4.js +0 -6
- package/dist/assets/flowDiagram-d6f8fe3a-VkF7W9ok.js +0 -4
- package/dist/assets/flowDiagram-v2-58f49b84-GhxQOkLF.js +0 -1
- package/dist/assets/flowchart-elk-definition-56584a6c-aOhiWs9F.js +0 -139
- package/dist/assets/ganttDiagram-088dbd90-zfsU3Utb.js +0 -266
- package/dist/assets/gitGraphDiagram-e0ffc2d1-mO6fny1-.js +0 -70
- package/dist/assets/index-_ysOxDkR.css +0 -13
- package/dist/assets/index-f58d48f9-ZajbLoZ5.js +0 -1
- package/dist/assets/index-j47xBCGS.js +0 -252
- package/dist/assets/infoDiagram-64895a6e-EE2sSVdD.js +0 -7
- package/dist/assets/init-Hi12RPRh.js +0 -1
- package/dist/assets/journeyDiagram-adaa34f8-3Aeepbti.js +0 -139
- package/dist/assets/layout-HNfNNVGB.js +0 -1
- package/dist/assets/line-Dzs3dzjS.js +0 -1
- package/dist/assets/linear-l6T1P7PI.js +0 -1
- package/dist/assets/logo-yAM2wbsA.png +0 -0
- package/dist/assets/materialdesignicons-webfont-AeJCkVfO.woff2 +0 -0
- package/dist/assets/materialdesignicons-webfont-GtBnFie6.woff +0 -0
- package/dist/assets/materialdesignicons-webfont-IwmCr2II.ttf +0 -0
- package/dist/assets/materialdesignicons-webfont-JbV82i5g.eot +0 -0
- package/dist/assets/mindmap-definition-57868176-OcB3YfV1.js +0 -109
- package/dist/assets/ordinal-OOfG4Z7H.js +0 -1
- package/dist/assets/pieDiagram-3fca7ce7-vedjpC2S.js +0 -35
- package/dist/assets/quadrantDiagram-0ca4be02-IaDh8ki8.js +0 -7
- package/dist/assets/requirementDiagram-e13af0f0-SyEU7jKd.js +0 -52
- package/dist/assets/sankeyDiagram-a7f8e230-YfqBgIdu.js +0 -8
- package/dist/assets/sequenceDiagram-84aa38e3-Us4xkowz.js +0 -122
- package/dist/assets/stateDiagram-9a586ac6-9Eghu-AF.js +0 -1
- package/dist/assets/stateDiagram-v2-96f2b9df-H-sPLuEa.js +0 -1
- package/dist/assets/styles-1b0c237a-xxU00Zub.js +0 -110
- package/dist/assets/styles-622362e4-Dlv6Q_Cf.js +0 -160
- package/dist/assets/styles-a1a6e33f-YZqpuiCa.js +0 -207
- package/dist/assets/svgDraw-70101091-fhVjFkgL.js +0 -2
- package/dist/assets/svgDrawCommon-42e92da3-EVySoq53.js +0 -1
- package/dist/assets/timeline-definition-1a90b03d-KLirQp1D.js +0 -61
- package/dist/favicon.ico +0 -0
- package/dist/index.html +0 -20
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="ui-base">
|
|
2
|
+
<p>UI Base</p>
|
|
3
|
+
<p>This is the foundational element for a Dashboard in Node-RED Dashboard 2.0</p>
|
|
4
|
+
<p>A Dashboard is driven by a baseline layout which can be modified with some of the following settings</p>
|
|
5
|
+
<dl class="message-properties">
|
|
6
|
+
<dt>
|
|
7
|
+
Sidebar Style
|
|
8
|
+
<span class="property-type">option</span>
|
|
9
|
+
</dt>
|
|
10
|
+
<dd>
|
|
11
|
+
<ul>
|
|
12
|
+
<li><b>Collapsing: </b>(default) This open will shift the entire content of the Dashboard when opened, and not be visisble at all when closed.</li>
|
|
13
|
+
<li><b>Fixed: </b>Will always remain open. At our mobile breakdpoint (768px), this value is overriden, and an "Appear Over" option is used.</li>
|
|
14
|
+
<li><b>Collapse to icons: </b>Similar to "Collapsing" when opened, but when closed, the icons for each page still show.</li>
|
|
15
|
+
<li><b>Appear over content: </b>Not visible when closed, and when open, will appear over the Dashboard content, without shifting it.</li>
|
|
16
|
+
<li><b>Always hide: </b>The sidebar will not be visible under any circumstances. All pages are still accesible via their direct links or a <code>ui-control</code> node.</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</dd>
|
|
19
|
+
</dl>
|
|
20
|
+
</script>
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ui-base"
|
|
2
|
+
"ui-base": {
|
|
3
3
|
"auto": "auto",
|
|
4
4
|
"label": {
|
|
5
|
+
"uiName": "UI Name",
|
|
6
|
+
"path": "Path",
|
|
5
7
|
"category": "dashboard 2",
|
|
8
|
+
"dashboard2": "Dashboard 2.0",
|
|
9
|
+
"editSettings": "Edit Settings",
|
|
10
|
+
"openDashboard": "Open Dashboard",
|
|
6
11
|
"layout": "Layout",
|
|
12
|
+
"layoutMessage": "Here you can re-order and move your widgets, groups and pages.",
|
|
7
13
|
"theming": "Theming",
|
|
14
|
+
"themingMessage": "Here you can can get quick access to your UI Themes, defined on your Dashboard.",
|
|
15
|
+
"page": "Page",
|
|
16
|
+
"pages": "Pages",
|
|
8
17
|
"settings": "Settings",
|
|
9
18
|
"sidebar": "Sidebar Options",
|
|
10
|
-
"showPath": "Include Page Path in Label"
|
|
19
|
+
"showPath": "Include Page Path in Label",
|
|
20
|
+
"navigationStyle": "Style",
|
|
21
|
+
"navigationStyleDefault": "Collapsing (default)",
|
|
22
|
+
"navigationStyleFixed": "Fixed",
|
|
23
|
+
"navigationStyleIcon": "Collapse to icons",
|
|
24
|
+
"navigationStyleTemporary": "Appear over content",
|
|
25
|
+
"navigationStyleNone": "Always hide"
|
|
11
26
|
},
|
|
12
27
|
"layout": {
|
|
13
28
|
"pages": "Pages",
|
|
@@ -3,26 +3,19 @@
|
|
|
3
3
|
<p>A single screen of content within your Dashboard.</p>
|
|
4
4
|
<h3>Properties</h3>
|
|
5
5
|
<dl class="message-properties">
|
|
6
|
-
<dt>
|
|
7
|
-
Name
|
|
8
|
-
<span class="property-type">string</span>
|
|
9
|
-
</dt>
|
|
10
|
-
<dd>
|
|
11
|
-
Description of "Name"
|
|
12
|
-
</dd>
|
|
13
6
|
<dt>
|
|
14
7
|
UI
|
|
15
8
|
<span class="property-type">ui-base</span>
|
|
16
9
|
</dt>
|
|
17
10
|
<dd>
|
|
18
|
-
|
|
11
|
+
The UI (ui-base) that this page will be added to.
|
|
19
12
|
</dd>
|
|
20
13
|
<dt>
|
|
21
14
|
Path
|
|
22
15
|
<span class="property-type">string</span>
|
|
23
16
|
</dt>
|
|
24
17
|
<dd>
|
|
25
|
-
|
|
18
|
+
Extending the parent UI path, defines where this page renders
|
|
26
19
|
</dd>
|
|
27
20
|
<dt>
|
|
28
21
|
Icon
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ui-theme": {
|
|
3
|
+
"label": {
|
|
4
|
+
"themeName": "Theme Name",
|
|
5
|
+
"colors": "Colors",
|
|
6
|
+
"dashboard": "Dashboard",
|
|
7
|
+
"navigation": "Navigation",
|
|
8
|
+
"primary": "Primary",
|
|
9
|
+
"pages": "Pages",
|
|
10
|
+
"background": "Background",
|
|
11
|
+
"groups": "Groups",
|
|
12
|
+
"outline": "Outline",
|
|
13
|
+
"sizings": "Sizings",
|
|
14
|
+
"pagePadding": "Page Padding",
|
|
15
|
+
"groupGap": "Group Gap",
|
|
16
|
+
"groupBorderRadius": "Group Border Radius",
|
|
17
|
+
"widgetGap": "Widget Gap"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
"ui-base": {
|
|
3
3
|
"auto": "自動",
|
|
4
4
|
"label": {
|
|
5
|
+
"uiName": "画面名",
|
|
6
|
+
"path": "パス",
|
|
5
7
|
"category": "ダッシュボード2",
|
|
8
|
+
"dashboard2": "ダッシュボード2.0",
|
|
9
|
+
"editSettings": "設定を編集",
|
|
10
|
+
"openDashboard": "ダッシュボードを開く",
|
|
6
11
|
"layout": "配置",
|
|
12
|
+
"layoutMessage": "部品やグループ、ページの並び替えや移動が可能です。",
|
|
7
13
|
"theming": "テーマ",
|
|
14
|
+
"themingMessage": "ダッシュボードで定義した画面テーマを参照できます。",
|
|
15
|
+
"page": "ページ",
|
|
16
|
+
"pages": "ページ",
|
|
8
17
|
"settings": "設定",
|
|
9
18
|
"sidebar": "サイドバーの設定",
|
|
10
19
|
"showPath": "ラベルにページのパスを含める"
|
|
@@ -4,29 +4,22 @@
|
|
|
4
4
|
<h3>プロパティ</h3>
|
|
5
5
|
<dl class="message-properties">
|
|
6
6
|
<dt>
|
|
7
|
-
|
|
8
|
-
<span class="property-type">string</span>
|
|
9
|
-
</dt>
|
|
10
|
-
<dd>
|
|
11
|
-
Description of "Name"
|
|
12
|
-
</dd>
|
|
13
|
-
<dt>
|
|
14
|
-
UI
|
|
7
|
+
画面
|
|
15
8
|
<span class="property-type">ui-base</span>
|
|
16
9
|
</dt>
|
|
17
10
|
<dd>
|
|
18
|
-
|
|
11
|
+
本ページを追加する画面 (ui-base)
|
|
19
12
|
</dd>
|
|
20
13
|
<dt>
|
|
21
14
|
パス
|
|
22
|
-
<span class="property-type"
|
|
15
|
+
<span class="property-type">文字列</span>
|
|
23
16
|
</dt>
|
|
24
17
|
<dd>
|
|
25
|
-
|
|
18
|
+
親画面のパスに追加してページを表示する場所を定義します。
|
|
26
19
|
</dd>
|
|
27
20
|
<dt>
|
|
28
21
|
アイコン
|
|
29
|
-
<span class="property-type"
|
|
22
|
+
<span class="property-type">文字列</span>
|
|
30
23
|
</dt>
|
|
31
24
|
<dd>
|
|
32
25
|
サイドバーUIのページ名の横に表示されるアイコン。
|
|
@@ -42,14 +35,14 @@
|
|
|
42
35
|
</dd>
|
|
43
36
|
<dt>
|
|
44
37
|
配置
|
|
45
|
-
<span class="property-type"
|
|
38
|
+
<span class="property-type">格子 | 固定 | ノートブック</span>
|
|
46
39
|
</dt>
|
|
47
40
|
<dd>
|
|
48
41
|
利用可能なダッシュボード様式から1つを選択します。様式の詳細については、<a href="https://dashboard.flowfuse.com/layouts/grid.html">ここ</a> を参照してください。
|
|
49
42
|
</dd>
|
|
50
43
|
<dt>
|
|
51
44
|
クラス
|
|
52
|
-
<span class="property-type"
|
|
45
|
+
<span class="property-type">文字列</span>
|
|
53
46
|
</dt>
|
|
54
47
|
<dd>
|
|
55
48
|
レンダグリング時にページの様式に追加するカスタムCSSクラス
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"ui-page": {
|
|
3
3
|
"label": {
|
|
4
|
-
"
|
|
5
|
-
"ui": "
|
|
4
|
+
"pageName": "ページ名",
|
|
5
|
+
"ui": "画面",
|
|
6
6
|
"path": "パス",
|
|
7
7
|
"icon": "アイコン",
|
|
8
8
|
"theme": "テーマ",
|
|
9
9
|
"layout": "配置",
|
|
10
|
-
"grid": "
|
|
10
|
+
"grid": "格子",
|
|
11
11
|
"fixed": "固定",
|
|
12
12
|
"notebook": "ノートブック",
|
|
13
13
|
"class": "クラス",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ui-theme": {
|
|
3
|
+
"label": {
|
|
4
|
+
"themeName": "テーマ名",
|
|
5
|
+
"colors": "配色",
|
|
6
|
+
"dashboard": "ダッシュボード",
|
|
7
|
+
"navigation": "案内",
|
|
8
|
+
"primary": "基本",
|
|
9
|
+
"pages": "ページ",
|
|
10
|
+
"background": "背景",
|
|
11
|
+
"groups": "グループ",
|
|
12
|
+
"outline": "輪郭",
|
|
13
|
+
"sizings": "サイズ",
|
|
14
|
+
"pagePadding": "ページの余白",
|
|
15
|
+
"groupGap": "グループ間の幅",
|
|
16
|
+
"groupBorderRadius": "グループの角丸",
|
|
17
|
+
"widgetGap": "部品間の幅"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
category: 'config',
|
|
188
188
|
defaults: {
|
|
189
189
|
name: {
|
|
190
|
-
value: '
|
|
190
|
+
value: c_('label.uiName'),
|
|
191
191
|
required: true
|
|
192
192
|
},
|
|
193
193
|
path: {
|
|
@@ -202,6 +202,9 @@
|
|
|
202
202
|
},
|
|
203
203
|
showPathInSidebar: {
|
|
204
204
|
value: false
|
|
205
|
+
},
|
|
206
|
+
navigationStyle: {
|
|
207
|
+
value: 'default'
|
|
205
208
|
}
|
|
206
209
|
},
|
|
207
210
|
label: function () {
|
|
@@ -228,13 +231,15 @@
|
|
|
228
231
|
|
|
229
232
|
const actions = $('<div class="red-ui-sidebar-header-actions"></div>')
|
|
230
233
|
|
|
231
|
-
const editSettingsButton = $('<a id="edit-ui-base" class="editor-button editor-button-small nr-db-sb-list-header-button">
|
|
234
|
+
const editSettingsButton = $('<a id="edit-ui-base" class="editor-button editor-button-small nr-db-sb-list-header-button">'
|
|
235
|
+
+ c_('label.editSettings') + ' <i style="margin-left: 3px;" class="fa fa-cog"></i></a>')
|
|
232
236
|
|
|
233
237
|
editSettingsButton.on('click', function () {
|
|
234
238
|
RED.editor.editConfig('', 'ui-base', id)
|
|
235
239
|
})
|
|
236
240
|
|
|
237
|
-
const openDashboardButton = $(`<a id="open-dashboard" href="${fullPath}" target="nr-dashboard" class="editor-button editor-button-small nr-db-sb-list-header-button"
|
|
241
|
+
const openDashboardButton = $(`<a id="open-dashboard" href="${fullPath}" target="nr-dashboard" class="editor-button editor-button-small nr-db-sb-list-header-button">`
|
|
242
|
+
+ c_('label.openDashboard') +` <i style="margin-left: 3px;" class="fa fa-external-link"></i></a>`)
|
|
238
243
|
|
|
239
244
|
label.appendTo(header)
|
|
240
245
|
editSettingsButton.appendTo(actions)
|
|
@@ -650,7 +655,7 @@
|
|
|
650
655
|
.appendTo(buttonGroup)
|
|
651
656
|
RED.popover.tooltip(buttonExpand, c_('layout.expand'))
|
|
652
657
|
|
|
653
|
-
divTabs.append('<div class="nrdb2-layout-helptext">
|
|
658
|
+
divTabs.append('<div class="nrdb2-layout-helptext">' + c_('label.layoutMessage') + '</div>')
|
|
654
659
|
|
|
655
660
|
const pages = {}
|
|
656
661
|
const groupsByPage = {}
|
|
@@ -741,7 +746,7 @@
|
|
|
741
746
|
const themeHeader = $('<div>', { class: 'nrdb2-sidebar-header' }).appendTo(divTabs)
|
|
742
747
|
$('<b>').html(c_('themes.header')).appendTo(themeHeader)
|
|
743
748
|
|
|
744
|
-
divTabs.append('<div class="nrdb2-layout-helptext">
|
|
749
|
+
divTabs.append('<div class="nrdb2-layout-helptext">' + c_('label.themingMessage') + '</div>')
|
|
745
750
|
|
|
746
751
|
const themes = {}
|
|
747
752
|
|
|
@@ -762,7 +767,7 @@
|
|
|
762
767
|
const tabicon = 'fa-paint-brush'
|
|
763
768
|
$('<i>', { class: 'nrdb2-sb-icon nrdb2-sb-tab-icon fa ' + tabicon }).appendTo(titleRow)
|
|
764
769
|
$('<span>', { class: 'nrdb2-sb-title' }).text(theme.name || theme.id).appendTo(titleRow)
|
|
765
|
-
$('<span>', { class: 'nrdb2-sb-info' }).text(theme.users.length + '
|
|
770
|
+
$('<span>', { class: 'nrdb2-sb-info' }).text(theme.users.length + ' ' + (theme.users.length > 1 ? c_('label.pages') : c_('label.page'))).appendTo(titleRow)
|
|
766
771
|
|
|
767
772
|
const palette = $('<div>', { class: 'nrdb2-sb-palette' }).appendTo(titleRow)
|
|
768
773
|
const colors = theme.colors
|
|
@@ -819,8 +824,8 @@
|
|
|
819
824
|
function addSidebar () {
|
|
820
825
|
RED.sidebar.addTab({
|
|
821
826
|
id: 'dashboard-2.0',
|
|
822
|
-
label: '
|
|
823
|
-
name: '
|
|
827
|
+
label: c_('label.dashboard2'),
|
|
828
|
+
name: c_('label.dashboard2'),
|
|
824
829
|
content: sidebar,
|
|
825
830
|
closeable: true,
|
|
826
831
|
pinned: true,
|
|
@@ -1089,16 +1094,26 @@
|
|
|
1089
1094
|
|
|
1090
1095
|
<script type="text/html" data-template-name="ui-base">
|
|
1091
1096
|
<div class="form-row">
|
|
1092
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
1093
|
-
<input type="text" id="node-config-input-name">
|
|
1097
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
|
|
1098
|
+
<input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
1094
1099
|
</div>
|
|
1095
1100
|
<div class="form-row">
|
|
1096
|
-
<label for="node-config-input-path"><i class="fa fa-bookmark"></i>
|
|
1101
|
+
<label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="ui-base.label.path"></label>
|
|
1097
1102
|
<input type="text" id="node-config-input-path" disabled>
|
|
1098
1103
|
<span style="display: block; margin-left: 105px; margin-top: 0px; font-style: italic; color: #bbb; font-size: 8pt;">This option is currently disabled and still in-development.</span>
|
|
1099
1104
|
</div>
|
|
1100
1105
|
<div class="form-row" style="margin-bottom: 0;">
|
|
1101
|
-
<label style="font-weight: 600; width: auto;"
|
|
1106
|
+
<label style="font-weight: 600; width: auto;" data-i18n="ui-base.label.sidebar"></label>
|
|
1107
|
+
</div>
|
|
1108
|
+
<div class="form-row" style="align-items: center;">
|
|
1109
|
+
<label style="margin-right: 5px; margin-bottom: 0px;" for="node-config-input-navigationStyle"><span data-i18n="ui-base.label.navigationStyle"></span></label>
|
|
1110
|
+
<select id="node-config-input-navigationStyle">
|
|
1111
|
+
<option value="default" data-i18n="ui-base.label.navigationStyleDefault"></option>
|
|
1112
|
+
<option value="fixed" data-i18n="ui-base.label.navigationStyleFixed"></option>
|
|
1113
|
+
<option value="icon" data-i18n="ui-base.label.navigationStyleIcon"></option>
|
|
1114
|
+
<option value="temporary" data-i18n="ui-base.label.navigationStyleTemporary"></option>
|
|
1115
|
+
<option value="none" data-i18n="ui-base.label.navigationStyleNone"></option>
|
|
1116
|
+
</select>
|
|
1102
1117
|
</div>
|
|
1103
1118
|
<div class="form-row form-row-flex" style="align-items: center;">
|
|
1104
1119
|
<input style="margin: 8px 0 10px 16px; width:20px;" type="checkbox" id="node-config-input-showPathInSidebar">
|
package/nodes/config/ui_base.js
CHANGED
|
@@ -13,6 +13,17 @@ function join (...paths) {
|
|
|
13
13
|
}).join('/')
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Check if an object has a property
|
|
18
|
+
* TODO: move to test-able utility lib
|
|
19
|
+
* @param {Object} obj - Object to check for property
|
|
20
|
+
* @param {String} prop - Property to check for
|
|
21
|
+
* @returns {boolean}
|
|
22
|
+
*/
|
|
23
|
+
function hasProperty (obj, prop) {
|
|
24
|
+
return Object.prototype.hasOwnProperty.call(obj, prop)
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
module.exports = function (RED) {
|
|
17
28
|
const express = require('express')
|
|
18
29
|
const { Server } = require('socket.io')
|
|
@@ -117,9 +128,14 @@ module.exports = function (RED) {
|
|
|
117
128
|
uiShared.app.use(config.path, uiShared.httpMiddleware, express.static(path.join(__dirname, '../../dist')))
|
|
118
129
|
|
|
119
130
|
uiShared.app.get(config.path + '/_setup', uiShared.httpMiddleware, (req, res) => {
|
|
131
|
+
let socketPath = join(RED.settings.httpNodeRoot, config.path, 'socket.io')
|
|
132
|
+
// if no leading /, add one (happens sometimes depending on httpNodeRoot in settings.js)
|
|
133
|
+
if (socketPath[0] !== '/') {
|
|
134
|
+
socketPath = '/' + socketPath
|
|
135
|
+
}
|
|
120
136
|
let resp = {
|
|
121
137
|
socketio: {
|
|
122
|
-
path:
|
|
138
|
+
path: socketPath
|
|
123
139
|
}
|
|
124
140
|
}
|
|
125
141
|
// Hook API - onSetup(RED, config, req, res)
|
|
@@ -259,6 +275,8 @@ module.exports = function (RED) {
|
|
|
259
275
|
|
|
260
276
|
node._created = Date.now()
|
|
261
277
|
|
|
278
|
+
n.root = RED.settings.httpNodeRoot || '/'
|
|
279
|
+
|
|
262
280
|
/** @type {Object.<string, Socket>} */
|
|
263
281
|
// node.connections = {} // store socket.io connections for this node
|
|
264
282
|
// // re-map existing connections for this base node
|
|
@@ -544,7 +562,7 @@ module.exports = function (RED) {
|
|
|
544
562
|
msg = addConnectionCredentials(RED, msg, conn, n)
|
|
545
563
|
|
|
546
564
|
async function defaultHandler (value) {
|
|
547
|
-
if (typeof (value) === 'object' && value !== null &&
|
|
565
|
+
if (typeof (value) === 'object' && value !== null && hasProperty(value, 'payload')) {
|
|
548
566
|
msg.payload = value.payload
|
|
549
567
|
} else {
|
|
550
568
|
msg.payload = value
|
|
@@ -886,13 +904,13 @@ module.exports = function (RED) {
|
|
|
886
904
|
}
|
|
887
905
|
|
|
888
906
|
// standard dynamic property handlers
|
|
889
|
-
if (
|
|
907
|
+
if (hasProperty(msg, 'enabled')) {
|
|
890
908
|
statestore.set(n, widgetNode, msg, 'enabled', msg.enabled)
|
|
891
909
|
}
|
|
892
|
-
if (
|
|
910
|
+
if (hasProperty(msg, 'visible')) {
|
|
893
911
|
statestore.set(n, widgetNode, msg, 'visible', msg.visible)
|
|
894
912
|
}
|
|
895
|
-
if (
|
|
913
|
+
if (hasProperty(msg, 'class')) {
|
|
896
914
|
statestore.set(n, widgetNode, msg, 'class', msg.class)
|
|
897
915
|
}
|
|
898
916
|
|
|
@@ -908,7 +926,7 @@ module.exports = function (RED) {
|
|
|
908
926
|
if (widgetConfig.topic || widgetConfig.topicType) {
|
|
909
927
|
msg = await appendTopic(RED, widgetConfig, wNode, msg)
|
|
910
928
|
}
|
|
911
|
-
if (
|
|
929
|
+
if (hasProperty(widgetConfig, 'passthru')) {
|
|
912
930
|
if (widgetConfig.passthru) {
|
|
913
931
|
send(msg)
|
|
914
932
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
category: 'config',
|
|
4
4
|
defaults: {
|
|
5
5
|
name: {
|
|
6
|
-
value: '
|
|
6
|
+
value: RED._('@flowfuse/node-red-dashboard/ui-group:ui-group.label.groupName'),
|
|
7
7
|
required: true
|
|
8
8
|
},
|
|
9
9
|
page: { type: 'ui-page', required: true },
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
|
|
69
69
|
<script type="text/html" data-template-name="ui-group">
|
|
70
70
|
<div class="form-row">
|
|
71
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
72
|
-
<input type="text" id="node-config-input-name">
|
|
71
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
|
|
72
|
+
<input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
73
73
|
</div>
|
|
74
74
|
<div class="form-row">
|
|
75
75
|
<label for="node-config-input-page"><i class="fa fa-bookmark"></i> <span data-i18n="ui-group.label.page"></label>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
category: 'config',
|
|
4
4
|
defaults: {
|
|
5
5
|
name: {
|
|
6
|
-
value: '
|
|
6
|
+
value: RED._('@flowfuse/node-red-dashboard/ui-page:ui-page.label.pageName'),
|
|
7
7
|
required: true
|
|
8
8
|
},
|
|
9
9
|
ui: {
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
})
|
|
45
45
|
this.path = '/page' + (pageCount + 1)
|
|
46
46
|
$('#node-config-input-path').val(this.path)
|
|
47
|
-
console.log('setting path to', this.path)
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
$('#node-config-input-layout').typedInput({
|
|
@@ -99,8 +98,8 @@
|
|
|
99
98
|
|
|
100
99
|
<script type="text/html" data-template-name="ui-page">
|
|
101
100
|
<div class="form-row">
|
|
102
|
-
<label for="node-config-input-name"><i class="w-16 fa fa-
|
|
103
|
-
<input type="text" id="node-config-input-name">
|
|
101
|
+
<label for="node-config-input-name"><i class="w-16 fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
|
|
102
|
+
<input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
104
103
|
</div>
|
|
105
104
|
<div class="form-row">
|
|
106
105
|
<label for="node-config-input-ui"><i class="w-16 fa fa-sitemap"></i> <span data-i18n="ui-page.label.ui"></label>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
category: 'config',
|
|
4
4
|
defaults: {
|
|
5
5
|
name: {
|
|
6
|
-
value: '
|
|
6
|
+
value: RED._('@flowfuse/node-red-dashboard/ui-theme:ui-theme.label.themeName'),
|
|
7
7
|
required: true
|
|
8
8
|
},
|
|
9
9
|
// colors
|
|
@@ -105,68 +105,68 @@
|
|
|
105
105
|
|
|
106
106
|
<script type="text/html" data-template-name="ui-theme">
|
|
107
107
|
<div class="form-row">
|
|
108
|
-
<label for="node-config-input-name"><i class="fa fa-
|
|
109
|
-
<input type="text" id="node-config-input-name">
|
|
108
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
|
|
109
|
+
<input type="text" id="node-config-input-name" data-i18n="[placeholder]node-red:common.label.name">
|
|
110
110
|
</div>
|
|
111
|
-
<h3 style="margin: 0; margin-bottom: 6px; border-bottom: 1px solid #eee; padding-bottom: 3px;"
|
|
111
|
+
<h3 style="margin: 0; margin-bottom: 6px; border-bottom: 1px solid #eee; padding-bottom: 3px;" data-i18n="ui-theme.label.colors"></h3>
|
|
112
112
|
<div class="form-row" style="margin-bottom: 3px;">
|
|
113
|
-
<h4 style="margin-bottom: 0;"><i class="fa fa-bar-chart"></i>
|
|
113
|
+
<h4 style="margin-bottom: 0;"><i class="fa fa-bar-chart"></i> <span data-i18n="ui-theme.label.dashboard"></h4>
|
|
114
114
|
</div>
|
|
115
115
|
<div class="form-row form-row-flex labels-right" style="margin-bottom: 3px; gap: 9px;">
|
|
116
116
|
<div>
|
|
117
|
-
<label
|
|
117
|
+
<label data-i18n="ui-theme.label.navigation"></label>
|
|
118
118
|
<label class="color-picker-wrapper" for="node-config-input-primary" style="width: 100px; height: 32px; border-radius: 6px; border: 1px solid #ccc">
|
|
119
119
|
<input type="color" id="node-config-input-surface" style="opacity: 0; width: 100%;"/>
|
|
120
120
|
</label>
|
|
121
121
|
</div>
|
|
122
122
|
<div>
|
|
123
|
-
<label
|
|
123
|
+
<label data-i18n="ui-theme.label.primary"></label>
|
|
124
124
|
<label class="color-picker-wrapper" for="node-config-input-primary" style="width: 100px; height: 32px; border-radius: 6px; border: 1px solid #ccc">
|
|
125
125
|
<input type="color" id="node-config-input-primary" style="opacity: 0; width: 100%;"/>
|
|
126
126
|
</label>
|
|
127
127
|
</div>
|
|
128
128
|
</div>
|
|
129
129
|
<div class="form-row" style="margin-bottom: 3px;">
|
|
130
|
-
<h4 style="margin-bottom: 0;"><i class="fa fa-object-group"></i>
|
|
130
|
+
<h4 style="margin-bottom: 0;"><i class="fa fa-object-group"></i> <span data-i18n="ui-theme.label.pages"></h4>
|
|
131
131
|
</div>
|
|
132
132
|
<div class="form-row labels-right" style="margin-bottom: 3px;">
|
|
133
|
-
<label
|
|
133
|
+
<label data-i18n="ui-theme.label.background"></label>
|
|
134
134
|
<label class="color-picker-wrapper" for="node-config-input-background" style="width: 100px; height: 32px; border-radius: 6px; border: 1px solid #ccc">
|
|
135
135
|
<input type="color" id="node-config-input-bgPage" style="opacity: 0; width: 100%;"/>
|
|
136
136
|
</label>
|
|
137
137
|
</div>
|
|
138
138
|
<div class="form-row" style="margin-bottom: 3px;">
|
|
139
|
-
<h4 style="margin-bottom: 0;"><i class="fa fa-table"></i>
|
|
139
|
+
<h4 style="margin-bottom: 0;"><i class="fa fa-table"></i> <span data-i18n="ui-theme.label.groups"></h4>
|
|
140
140
|
</div>
|
|
141
141
|
<div class="form-row form-row-flex labels-right" style="margin-bottom: 3px; gap: 9px;">
|
|
142
142
|
<div>
|
|
143
|
-
<label
|
|
143
|
+
<label data-i18n="ui-theme.label.background"></label>
|
|
144
144
|
<label class="color-picker-wrapper" for="node-config-input-background" style="width: 100px; height: 32px; border-radius: 6px; border: 1px solid #ccc">
|
|
145
145
|
<input type="color" id="node-config-input-groupBg" style="opacity: 0; width: 100%;"/>
|
|
146
146
|
</label>
|
|
147
147
|
</div>
|
|
148
148
|
<div>
|
|
149
|
-
<label
|
|
149
|
+
<label data-i18n="ui-theme.label.outline"></label>
|
|
150
150
|
<label class="color-picker-wrapper" for="node-config-input-background" style="width: 100px; height: 32px; border-radius: 6px; border: 1px solid #ccc">
|
|
151
151
|
<input type="color" id="node-config-input-groupOutline" style="opacity: 0; width: 100%;"/>
|
|
152
152
|
</label>
|
|
153
153
|
</div>
|
|
154
154
|
</div>
|
|
155
|
-
<h3 style="margin: 12px 0 6px; border-bottom: 1px solid #eee; padding-bottom: 3px;"
|
|
155
|
+
<h3 style="margin: 12px 0 6px; border-bottom: 1px solid #eee; padding-bottom: 3px;" data-i18n="ui-theme.label.sizings"></h3>
|
|
156
156
|
<div class="form-row">
|
|
157
|
-
<label for="node-config-input-pagePadding"
|
|
157
|
+
<label for="node-config-input-pagePadding" data-i18n="ui-theme.label.pagePadding"></label>
|
|
158
158
|
<input type="text" id="node-config-input-pagePadding">
|
|
159
159
|
</div>
|
|
160
160
|
<div class="form-row">
|
|
161
|
-
<label for="node-config-input-groupGap"
|
|
161
|
+
<label for="node-config-input-groupGap" data-i18n="ui-theme.label.groupGap"></label>
|
|
162
162
|
<input type="text" id="node-config-input-groupGap">
|
|
163
163
|
</div>
|
|
164
164
|
<div class="form-row">
|
|
165
|
-
<label for="node-config-input-groupBorderRadius"
|
|
165
|
+
<label for="node-config-input-groupBorderRadius" data-i18n="ui-theme.label.groupBorderRadius"></label>
|
|
166
166
|
<input type="text" id="node-config-input-groupBorderRadius">
|
|
167
167
|
</div>
|
|
168
168
|
<div class="form-row">
|
|
169
|
-
<label for="node-config-input-widgetGap"
|
|
169
|
+
<label for="node-config-input-widgetGap" data-i18n="ui-theme.label.widgetGap"></label>
|
|
170
170
|
<input type="text" id="node-config-input-widgetGap">
|
|
171
171
|
</div>
|
|
172
172
|
</script>
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
"optionalIcon": "optional icon",
|
|
8
8
|
"label": "Label",
|
|
9
9
|
"optionalLabel": "optional label",
|
|
10
|
+
"button": "button",
|
|
11
|
+
"className": "Class",
|
|
12
|
+
"classNamePlaceholder": "Optional CSS class name(s)",
|
|
10
13
|
"tooltip": "Tooltip",
|
|
11
14
|
"optionalTooltip": "optional tooltip",
|
|
12
15
|
"color": "Color",
|
|
@@ -16,9 +19,7 @@
|
|
|
16
19
|
"whenClicked": "When clicked, send:",
|
|
17
20
|
"payload": "Payload",
|
|
18
21
|
"topic": "Topic",
|
|
19
|
-
"emulateClick": "If msg arrives on input, emulate a button click:"
|
|
20
|
-
"className": "Class",
|
|
21
|
-
"classNamePlaceholder": "Optional CSS class name(s) for widget"
|
|
22
|
+
"emulateClick": "If msg arrives on input, emulate a button click:"
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
<p>Any of the following can be appended to a <code>msg.</code> in order to override or set properties on this node at runtime.</p>
|
|
18
18
|
<dl class="message-properties">
|
|
19
19
|
<dt class="optional">class <span class="property-type">string</span></dt>
|
|
20
|
-
<dd>Add a CSS class, or more, to the
|
|
20
|
+
<dd>Add a CSS class, or more, to the form at runtime.</dd>
|
|
21
21
|
</dl>
|
|
22
22
|
</script>
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"size": "Size",
|
|
6
6
|
"label": "Label",
|
|
7
7
|
"optionalLabel": "optional label",
|
|
8
|
+
"className": "Class",
|
|
9
|
+
"classNamePlaceholder": "Optional CSS class name(s)",
|
|
8
10
|
"formElements": "Form elements",
|
|
9
11
|
"type": "Type",
|
|
10
12
|
"required": "Required",
|
|
@@ -23,14 +25,14 @@
|
|
|
23
25
|
"time": "Time",
|
|
24
26
|
"element": "element",
|
|
25
27
|
"buttons": "Buttons",
|
|
28
|
+
"submit": "submit",
|
|
26
29
|
"submitButtonText": "submit button text",
|
|
30
|
+
"cancel": "clear",
|
|
27
31
|
"cancelButtonText": "cancel button text",
|
|
28
32
|
"topic": "Topic",
|
|
29
33
|
"optionalMsgTopic": "optional msg.topic",
|
|
30
|
-
"splitLayout":"Place the form elements in two columns",
|
|
31
|
-
"resetOnSubmit":"Reset the form when submitted"
|
|
32
|
-
"className": "Class",
|
|
33
|
-
"classNamePlaceholder": "Optional CSS class name(s) for widget"
|
|
34
|
+
"splitLayout": "Place the form elements in two columns",
|
|
35
|
+
"resetOnSubmit": "Reset the form when submitted"
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
}
|