Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(subscription) Coalesce lack of prefix to empty string, allow no prefix in FCDA description #1078

Merged
merged 4 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/editors/subscription/foundation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { css, LitElement, query } from 'lit-element';
import { css, html, LitElement, query } from 'lit-element';
import { nothing } from 'lit-html';

import {
cloneElement,
compareNames,
Expand Down Expand Up @@ -109,12 +111,14 @@ export function getFcdaTitleValue(fcdaElement: Element): string {

export function getFcdaSubtitleValue(fcdaElement: Element): string {
return `${fcdaElement.getAttribute('ldInst')} ${
fcdaElement.hasAttribute('ldInst') && fcdaElement.hasAttribute('prefix')
? `/`
fcdaElement.hasAttribute('ldInst') ? `/` : ''
}${
fcdaElement.getAttribute('prefix')
? ` ${fcdaElement.getAttribute('prefix')}`
: ''
} ${fcdaElement.getAttribute('prefix')} ${fcdaElement.getAttribute(
'lnClass'
)} ${fcdaElement.getAttribute('lnInst')}`;
} ${fcdaElement.getAttribute('lnClass')} ${fcdaElement.getAttribute(
'lnInst'
)}`;
}

export function existExtRef(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,19 +679,19 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
value="
GOOSE_Publisher>>QB2_Disconnector>GOOSE2
Pos.stVal
QB2_Disconnector / CSWI 1
QB2_Disconnector / CSWI 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE2sDataSet>QB2_Disconnector/ CSWI 1.Pos stVal (ST)
Pos.q
QB2_Disconnector / CSWI 1
QB2_Disconnector / CSWI 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE2sDataSet>QB2_Disconnector/ CSWI 1.Pos q (ST)
EnaOpn.stVal
QB1_Disconnector null CILO 1
QB1_Disconnector / CILO 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE2sDataSet>QB1_Disconnector/ CILO 1.EnaOpn stVal (ST)
EnaCls.stVal
QB1_Disconnector / CILO 1
QB1_Disconnector / CILO 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE2sDataSet>QB1_Disconnector/ CILO 1.EnaCls stVal (ST)
EnaOpn.stVal
QB2_Disconnector null CILO 1
QB2_Disconnector / CILO 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE2sDataSet>QB2_Disconnector/ CILO 1.EnaOpn stVal (ST)"
>
<mwc-icon-button
Expand Down Expand Up @@ -729,7 +729,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
Pos.stVal
</span>
<span slot="secondary">
QB2_Disconnector / CSWI 1
QB2_Disconnector / CSWI 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -753,7 +753,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
Pos.q
</span>
<span slot="secondary">
QB2_Disconnector / CSWI 1
QB2_Disconnector / CSWI 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -776,7 +776,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
EnaOpn.stVal
</span>
<span slot="secondary">
QB1_Disconnector null CILO 1
QB1_Disconnector / CILO 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -796,7 +796,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
EnaCls.stVal
</span>
<span slot="secondary">
QB1_Disconnector / CILO 1
QB1_Disconnector / CILO 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -816,7 +816,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
EnaOpn.stVal
</span>
<span slot="secondary">
QB2_Disconnector null CILO 1
QB2_Disconnector / CILO 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -832,10 +832,10 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
value="
GOOSE_Publisher>>QB2_Disconnector>GOOSE1
Pos.stVal
QB1_Disconnector / CSWI 1
QB1_Disconnector / CSWI 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE1sDataSet>QB1_Disconnector/ CSWI 1.Pos stVal (ST)
Pos.q
QB1_Disconnector / CSWI 1
QB1_Disconnector / CSWI 1
GOOSE_Publisher>>QB2_Disconnector>GOOSE1sDataSet>QB1_Disconnector/ CSWI 1.Pos q (ST)"
>
<mwc-icon-button
Expand Down Expand Up @@ -872,7 +872,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
Pos.stVal
</span>
<span slot="secondary">
QB1_Disconnector / CSWI 1
QB1_Disconnector / CSWI 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand All @@ -892,7 +892,7 @@ snapshots["fcda-binding-list with a GSEControl doc loaded looks like the latest
Pos.q
</span>
<span slot="secondary">
QB1_Disconnector / CSWI 1
QB1_Disconnector / CSWI 1
</span>
<mwc-icon slot="graphic">
subdirectory_arrow_right
Expand Down