Skip to content

Commit be0886c

Browse files
author
Dennis Labordus
authored
Merge pull request #175 from com-pas/export-ied-parameters
New menu option to export IED Parameters to CSV File
2 parents fb4ea0a + 61357e1 commit be0886c

File tree

12 files changed

+9901
-5521
lines changed

12 files changed

+9901
-5521
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ COPY build/. /usr/share/nginx/html/
33

44
VOLUME /etc/nginx/conf.d
55
VOLUME /usr/share/nginx/html/public/cim
6+
VOLUME /usr/share/nginx/html/public/conf

package-lock.json

Lines changed: 7897 additions & 5486 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@material/mwc-textfield": "0.22.1",
3838
"@material/mwc-top-app-bar-fixed": "0.22.1",
3939
"ace-custom-element": "^1.6.5",
40+
"csv-stringify": "^6.2.0",
4041
"lit-element": "2.5.1",
4142
"lit-html": "1.4.1",
4243
"lit-translate": "^1.2.1",

public/conf/export-ied-params.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"comments": [
3+
"This file contains the configuration for exporting IED Information to a CSV File.",
4+
"Each column can be defined below in the section \"columns\".",
5+
"A Column must at least have a \"header\" defined.",
6+
"",
7+
"A selector can be defined to search for a Element, if no selector is defined, the IED Element is used.",
8+
"If the useOwnerDocument is set to true, the selector will be used on the whole document, otherwise on the IED Element",
9+
"There is a variable 'iedName' being replaced before executing the selector, put this between '{{' an '}}'.",
10+
"If a dataAttributePath is defined, the selector should return a LN(0) Element and the path is then used to search for a DAI/DA Element.",
11+
"The dataAttributePath should at least contain 2 names, because the minimum is always a DO(I) followed by a DA(I) element.",
12+
"",
13+
"If a attributeName is defined that attribute will be retrieved from the elements found by the selector.",
14+
"Otherwise the text content of the elements is retrieved."
15+
],
16+
"columns": [
17+
{
18+
"header": "IED Name",
19+
"attributeName": "name"
20+
},
21+
{
22+
"header": "IP address",
23+
"selector": "Communication > SubNetwork > ConnectedAP[iedName=\"{{ iedName }}\"] > Address:first-child > P[type=\"IP\"]",
24+
"useOwnerDocument": true
25+
},
26+
{
27+
"header": "Subnetmask",
28+
"selector": "Communication > SubNetwork > ConnectedAP[iedName=\"{{ iedName }}\"] > Address:first-child > P[type=\"IP-SUBNET\"]",
29+
"useOwnerDocument": true
30+
},
31+
{
32+
"header": "IED Description",
33+
"attributeName": "desc"
34+
},
35+
{
36+
"header": "IL1 Primary rated current",
37+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
38+
"dataAttributePath": ["ARtg", "setMag", "f"]
39+
},
40+
{
41+
"header": "IL1 Network Nominal Current",
42+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
43+
"dataAttributePath": ["ARtgNom", "setMag", "f"]
44+
},
45+
{
46+
"header": "IL1 Secondary rated current",
47+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"IL1\"][lnClass=\"TCTR\"]",
48+
"dataAttributePath": ["ARtgSec", "setVal"]
49+
},
50+
{
51+
"header": "RES Primary rated current",
52+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
53+
"dataAttributePath": ["ARtg", "setMag", "f"]
54+
},
55+
{
56+
"header": "RES Network Nominal Current",
57+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
58+
"dataAttributePath": ["ARtgNom", "setMag", "f"]
59+
},
60+
{
61+
"header": "RES Secondary rated current",
62+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TCTR\"]",
63+
"dataAttributePath": ["ARtgSec", "setVal"]
64+
},
65+
{
66+
"header": "UL1 Primary rated voltage",
67+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
68+
"dataAttributePath": ["VRtg", "setMag", "f"]
69+
},
70+
{
71+
"header": "UL1 Secondary rated voltage",
72+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
73+
"dataAttributePath": ["VRtgSec", "setVal"]
74+
},
75+
{
76+
"header": "UL1 Devision ratio",
77+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"UL1\"][lnClass=\"TVTR\"]",
78+
"dataAttributePath": ["Rat", "setMag", "f"]
79+
},
80+
{
81+
"header": "RES Primary rated voltage",
82+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
83+
"dataAttributePath": ["VRtg", "setMag", "f"]
84+
},
85+
{
86+
"header": "RES Secondary rated voltage",
87+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
88+
"dataAttributePath": ["VRtgSec", "setVal"]
89+
},
90+
{
91+
"header": "RES Devision ratio",
92+
"selector": "AccessPoint > Server > LDevice > LN[prefix=\"RES\"][lnClass=\"TVTR\"]",
93+
"dataAttributePath": ["Rat", "setMag", "f"]
94+
},
95+
{
96+
"header": "Vendor",
97+
"selector": "AccessPoint > Server > LDevice > LN[lnClass=\"LPHD\"]",
98+
"dataAttributePath": ["PhyNam", "vendor"]
99+
},
100+
{
101+
"header": "Model",
102+
"selector": "AccessPoint > Server > LDevice > LN[lnClass=\"LPHD\"]",
103+
"dataAttributePath": ["PhyNam", "model"]
104+
}
105+
]
106+
}

public/js/plugins.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const officialPlugins = [
101101
default: true,
102102
kind: 'menu',
103103
requireDoc: false,
104-
position: 'top'
104+
position: 'top',
105105
},
106106
{
107107
name: 'Import from API',
@@ -110,7 +110,7 @@ export const officialPlugins = [
110110
default: false,
111111
kind: 'menu',
112112
requireDoc: false,
113-
position: 'top'
113+
position: 'top',
114114
},
115115
{
116116
name: 'Save project',
@@ -119,7 +119,7 @@ export const officialPlugins = [
119119
default: true,
120120
kind: 'menu',
121121
requireDoc: true,
122-
position: 'top'
122+
position: 'top',
123123
},
124124
{
125125
name: 'Save project as',
@@ -227,7 +227,16 @@ export const officialPlugins = [
227227
default: true,
228228
kind: 'menu',
229229
requireDoc: true,
230-
position: 'middle'
230+
position: 'middle',
231+
},
232+
{
233+
name: 'Export IED Params',
234+
src: '/src/menu/ExportIEDParams.js',
235+
icon: 'download',
236+
default: false,
237+
kind: 'menu',
238+
requireDoc: true,
239+
position: 'middle',
231240
},
232241
{
233242
name: 'Locamation VMU',
@@ -236,7 +245,7 @@ export const officialPlugins = [
236245
default: false,
237246
kind: 'menu',
238247
requireDoc: true,
239-
position: 'middle'
248+
position: 'middle',
240249
},
241250
{
242251
name: 'CoMPAS Settings',
@@ -245,7 +254,7 @@ export const officialPlugins = [
245254
default: true,
246255
kind: 'menu',
247256
requireDoc: false,
248-
position: 'bottom'
257+
position: 'bottom',
249258
},
250259
{
251260
name: 'Help',

0 commit comments

Comments
 (0)