forked from bartbutenaers/node-red-contrib-nodes-memory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemory.html
112 lines (108 loc) · 5.54 KB
/
memory.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!--
Copyright 2018, Bart Butenaers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/javascript">
RED.nodes.registerType('memory-analyser',{
category: 'performance',
color: '#E9967A',
defaults: {
name: {value:""},
typefilter: {value:""},
namefilter: {value:""},
idfilter: {value:""},
tabidfilter: {value:""},
excludeid: {value:""},
topCount: {value:0},
sort: {value:"size"},
separatemsg: {value:false},
sum: {value:false}
},
inputs:1,
outputs:1,
icon: "fluid.png",
label: function() {
return this.name||"Memory";
},
oneditprepare: function() {
debugger;
RED.nodes.filterNodes({});
}
});
</script>
<script type="text/x-red" data-template-name="memory-analyser">
<div class="form-row">
<label for="node-input-typefilter"><i class="fa fa-filter"></i> Type filter</label>
<input type="text" id="node-input-typefilter" placeholder="Node type (incl. wildcard *)">
</div>
<div class="form-row">
<label for="node-input-namefilter"><i class="fa fa-filter"></i> Name filter</label>
<input type="text" id="node-input-namefilter" placeholder="Node name (incl. wildcard *)">
</div>
<div class="form-row">
<label for="node-input-idfilter"><i class="fa fa-filter"></i> Id filter</label>
<input type="text" id="node-input-idfilter" placeholder="Node id (incl. wildcard *)">
</div>
<div class="form-row">
<label for="node-input-tabidfilter"><i class="fa fa-filter"></i> Tab id filter</label>
<input type="text" id="node-input-tabidfilter" placeholder="Tab id (incl. wildcard *)">
</div>
<div class="form-row">
<label for="node-input-excludeid"><i class="fa fa-filter"></i> Exclude id</label>
<input type="text" id="node-input-excludeid" placeholder="Node id (incl. wildcard *)">
</div>
<div class="form-row">
<label for="node-input-topCount"><i class="fa fa-angle-double-up "></i> Top count</label>
<input type="number" id="node-input-topCount" step="1" min="0">
</div>
<div class="form-row">
<label for="node-input-sort"><i class="fa fa-sort-amount-desc"></i> Sort</label>
<select id="node-input-sort">
<option value="size">By node size</option>
<option value="name">By node name</option>
<option value="type">By node type</option>
</select>
</div>
<div class="form-row">
<input type="checkbox" id="node-input-separatemsg" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-separatemsg" style="width:70%;"> Separate message per node</label>
</div>
<div class="form-row">
<input type="checkbox" id="node-input-sum" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-sum" style="width:70%;"> Calculate total sum</label>
</div>
</br>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="memory-analyser">
<p>A Node-RED node to get memory used by Node-RED.</p>
<p><strong>Type filter:</strong><br/>
Limit the memory analyses to nodes having the specified node type(s). A <code>*</code> wildcard character is allowed.</p>
<p><strong>Name filter:</strong><br/>
Limit the memory analyses to nodes having the specified node name(s). A <code>*</code> wildcard character is allowed.</p>
<p><strong>Id filter:</strong><br/>
Limit the memory analyses to nodes having the specified node id(s). A <code>*</code> wildcard character is allowed.</p>
<p><strong>Tab id filter:</strong><br/>
Limit the memory analyses to nodes located on the specified tab id(s). A <code>*</code> wildcard character is allowed.</p>
<p><strong>Exclude id filter:</strong><br/>
Exclude specific nodes from analysis. A <code>*</code> wildcard character is allowed.</p>
<p><strong>Top count:</strong><br/>
Limit the output to only the specified number of nodes with the largest size. When no value or 0 value, all available nodes will be analyzed.</p>
<p><strong>Sort:</strong><br/>
Sort the node list by node name, node type or node memory size (descending).</p>
<p><strong>Separate message per node:</strong><br/>
When selected, a separate message will be send for every specified node. Otherwise a single message will be send, which contains the memory analysis of all the specified nodes.</p>
<p><strong>Calculate total used memory:</strong><br/>
When selected, the total memory of all specified nodes will be summed. This means memory from **all** selected nodes, not only the specified top N nodes!</p>
</script>