Skip to content

Commit 71b6a8b

Browse files
committed
add counter for substitutions
1 parent f172b38 commit 71b6a8b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dynamic-mapper-service/src/main/java/dynamic/mapper/core/ConfigurationRegistry.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
import dynamic.mapper.model.DeviceToClientMapRepresentation;
5959
import dynamic.mapper.model.Direction;
6060
import dynamic.mapper.model.Mapping;
61-
import dynamic.mapper.model.MappingStatus;
62-
import dynamic.mapper.model.MappingTreeNode;
6361
import dynamic.mapper.model.MapperServiceRepresentation;
6462
import dynamic.mapper.notification.NotificationSubscriber;
6563
import dynamic.mapper.processor.extension.ExtensibleProcessorInbound;
@@ -69,7 +67,6 @@
6967
import dynamic.mapper.processor.inbound.HexProcessorInbound;
7068
import dynamic.mapper.processor.inbound.JSONProcessorInbound;
7169
import dynamic.mapper.processor.model.MappingType;
72-
import dynamic.mapper.processor.model.ProcessingContext;
7370
import dynamic.mapper.processor.outbound.BaseProcessorOutbound;
7471
import dynamic.mapper.processor.outbound.CodeBasedProcessorOutbound;
7572
import dynamic.mapper.processor.outbound.DispatcherOutbound;
@@ -119,11 +116,10 @@ public class ConfigurationRegistry {
119116
// Structure: < Tenant, < ExtensibleProcessorSource > >
120117
private Map<String, ExtensibleProcessorInbound> extensibleProcessors = new ConcurrentHashMap<>();
121118

122-
// TODO persist cache as DeviceToClientRepresentation
123119
// Structure: < Tenant, < Device, Client > >
124120
private Map<String, Map<String, String>> deviceToClientPerTenant = new ConcurrentHashMap<>();
125121

126-
// Structure: < Tenant , ID Map >
122+
// Structure: < Tenant, Id ManagedObject Map >
127123
private Map<String, String> deviceToClientMapRepresentations = new ConcurrentHashMap<>();
128124

129125
@Getter

dynamic-mapper-ui/src/mapping/step-property/mapping-properties.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div class="d-flex">
2323
<div class="col-lg-6 col-lg-offset-3">
2424
<h4 class="text-medium text-center">
25-
General settings for {{ mapping.mappingType }} mapping
25+
General settings for {{ mapping.mappingType | formatStringAsWords }} mapping
2626
<span *ngIf="stepperConfiguration.editorMode === EditorMode.READ_ONLY" class="label label-primary">{{ 'Read
2727
Only'
2828
}}</span>

dynamic-mapper-ui/src/mapping/substitution/substitution-grid.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
<table class="table table-condensed m-b-0">
2424
<thead style="position: sticky; top: 0; z-index: 10; background-color: white;">
2525
<tr>
26-
<th class="bg-level-1"></th>
26+
<th class="bg-level-1" style="width: 2%"></th>
27+
<th class="bg-level-1" style="width: 2%">#</th>
2728
<th class="bg-level-1" style="width: 67%">
2829
<div class="d-flex">
29-
Substitution [ pathSource &#8212;> pathTarget ]
30+
Substitutions [ pathSource &#8212;> pathTarget ] selected {{settings.selectedSubstitutionIndex}} of # {{mapping.substitutions?.length}}
3031
<button class="btn-help btn-help--sm" [attr.aria-label]="'Help' | translate" popover="{{
3132
substitutionTemplateHelp
3233
}}" placement="bottom" triggers="focus" type="button"></button>
@@ -39,17 +40,20 @@
3940
</thead>
4041
</table>
4142

42-
<div style="max-height: 160px; overflow-y: auto; border-top: 0px solid #ddd;">
43+
<div style="max-height: 160px; overflow-y: scroll; border-top: 0px solid #ddd;">
4344
<table class="table table-condensed" style="margin-bottom: 0;">
4445
<tbody>
4546
<tr *ngFor="let sub of mapping.substitutions; let i = index" id="{{ 'sub-' + id + '-' + i }}">
46-
<td width="4%">
47+
<td width="2%">
4748
<label class="c8y-radio" title="Checkbox">
4849
<input type="radio" (click)="onSubstitutionSelect(i)"
4950
[checked]="settings.selectedSubstitutionIndex == i" />
5051
<span></span>
5152
</label>
5253
</td>
54+
<td width="2%">
55+
{{ i }}
56+
</td>
5357
<td>
5458
<span *ngIf="!sub['registeredType']" class="text-12">{{
5559
'[ ' +

0 commit comments

Comments
 (0)