Skip to content

Commit ff3a971

Browse files
Katherine BrownKatherine Brown
authored andcommitted
rebased onto develop
1 parent c875519 commit ff3a971

File tree

6 files changed

+248
-237
lines changed

6 files changed

+248
-237
lines changed

plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.html

Lines changed: 105 additions & 197 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<div class="arc-admin">
22
<h1>ArcGIS Configuration</h1>
3-
<br/>
4-
53
<mat-card appearance="outlined">
64
<mat-card-header>
75
<mat-card-title>
@@ -73,199 +71,111 @@ <h1>ArcGIS Configuration</h1>
7371
<button (click)="onEditProcessing()" mat-button>Edit</button>
7472
</mat-card-actions>
7573
</mat-card>
76-
77-
78-
<!-- <section class="arc-processing">
79-
<header>
80-
<h2>Processing <button class="edit-button" mat-icon-button (click)="onEditProcessing()"><mat-icon>edit</mat-icon></button></h2>
81-
<p class="subheading">MAGE ArcGIS plugin processing settings.</p>
82-
</header>
83-
<div class="processing">
84-
<table class="processing-table">
85-
<tr>
86-
<th>Enabled
87-
<button class="info-button" mat-icon-button
88-
(click)="showInfo('Enabled', 'Process observations and send to configured ArcGIS feature layers')">
89-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
90-
</button>
91-
</th>
92-
<td>{{config.enabled}}</td>
93-
</tr>
94-
<tr>
95-
<th>Base URL
96-
<button class="info-button" mat-icon-button (click)="showInfo('Base URL', 'MAGE server base URL')">
97-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
98-
</button>
99-
</th>
100-
<td>{{config.baseUrl}}</td>
101-
</tr>
102-
<tr>
103-
<th>Interval (s)
104-
<button class="info-button" mat-icon-button
105-
(click)="showInfo('Interval', 'Observation query and processing frequency time interval in seconds')">
106-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
107-
</button>
108-
</th>
109-
<td>{{config.intervalSeconds}}</td>
110-
</tr>
111-
<tr>
112-
<th>Startup Interval (s)
113-
<button class="info-button" mat-icon-button
114-
(click)="showInfo('Startup Interval', 'Startup interval in seconds to wait for feature layer processors to be ready')">
115-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
116-
</button>
117-
</th>
118-
<td>{{config.startupIntervalSeconds}}</td>
119-
</tr>
120-
<tr>
121-
<th>Update Interval (s)
122-
<button class="info-button" mat-icon-button
123-
(click)="showInfo('Update Interval', 'Processing wait time interval in seconds when pending observation updates exist')">
124-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
125-
</button>
126-
</th>
127-
<td>{{config.updateIntervalSeconds}}</td>
128-
</tr>
129-
<tr>
130-
<th>Batch Size
131-
<button class="info-button" mat-icon-button
132-
(click)="showInfo('Batch Size', 'Maximum number of observations to process during a single time interval')">
133-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
134-
</button>
135-
</th>
136-
<td>{{config.batchSize}}</td>
137-
</tr>
138-
<tr>
139-
<th>Attachment Tolerance (ms)
140-
<button class="info-button" mat-icon-button
141-
(click)="showInfo('Attachment Tolerance', 'Time tolerance in milliseconds to consider an attachment as modified compared to the observation')">
142-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
143-
</button>
144-
</th>
145-
<td>{{config.attachmentModifiedTolerance}}</td>
146-
</tr>
147-
</table>
148-
</div>
149-
</section> -->
150-
<arc-layer [config]=config (configChanged)=configChanged($event)></arc-layer>
151-
<arc-event [config]=config (configChanged)=configChanged($event) [configChangedNotifier]=configChangedNotifier.asObservable()></arc-event>
152-
<section class="arc-fields">
153-
<header>
154-
<h2>Attributes <button class="edit-button" mat-icon-button (click)="onEditAttributes()"><mat-icon>edit</mat-icon></button></h2>
155-
<p class="subheading">MAGE Field to ArcGIS Attribute mappings.</p>
156-
</header>
157-
<div class="attributes">
158-
<table class="attributes-table">
159-
<tr>
160-
<th>Observation Id Field
161-
<button class="info-button" mat-icon-button
162-
(click)="showInfo('Observation Id Field', 'The ArcGIS layer text field attribute name to store the MAGE observation id')">
163-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
164-
</button>
165-
</th>
166-
<td>{{config.observationIdField}}</td>
167-
</tr>
168-
<tr>
169-
<th>Id Separator
170-
<button class="info-button" mat-icon-button
171-
(click)="showInfo('Id Separator', 'When event id field is not configured, the separator combining observation ids and event ids in the observation id field')">
172-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
173-
</button>
174-
</th>
175-
<td>{{config.idSeparator}}</td>
176-
</tr>
177-
<tr>
178-
<th>Event Id Field
179-
<button class="info-button" mat-icon-button
180-
(click)="showInfo('Event Id Field', 'The ArcGIS layer integer field attribute name to store the MAGE event id')">
181-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
182-
</button>
183-
</th>
184-
<td>{{config.eventIdField}}</td>
185-
</tr>
186-
<tr>
187-
<th>Last Edited Date Field
188-
<button class="info-button" mat-icon-button
189-
(click)="showInfo('Last Edited Date Field', 'The last edited date field attribute name on the ArcGIS layer')">
190-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
191-
</button>
192-
</th>
193-
<td>{{config.lastEditedDateField}}</td>
194-
</tr>
195-
<tr>
196-
<th>Event Name Field
197-
<button class="info-button" mat-icon-button
198-
(click)="showInfo('Event Name Field', 'The ArcGIS layer text field attribute name to store the MAGE event name')">
199-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
200-
</button>
201-
</th>
202-
<td>{{config.eventNameField}}</td>
203-
</tr>
204-
<tr>
205-
<th>User Id Field
206-
<button class="info-button" mat-icon-button
207-
(click)="showInfo('User Id Field', 'The ArcGIS layer text field attribute name to store the MAGE user id')">
208-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
209-
</button>
210-
</th>
211-
<td>{{config.userIdField}}</td>
212-
</tr>
213-
<tr>
214-
<th>Username Field
215-
<button class="info-button" mat-icon-button
216-
(click)="showInfo('Username Field', 'The ArcGIS layer text field attribute name to store the MAGE username')">
217-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
218-
</button>
219-
</th>
220-
<td>{{config.usernameField}}</td>
221-
</tr>
222-
<tr>
223-
<th>User Display Name Field
224-
<button class="info-button" mat-icon-button
225-
(click)="showInfo('User Display Name Field', 'The ArcGIS layer text field attribute name to store the MAGE user display name')">
226-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
227-
</button>
228-
</th>
229-
<td>{{config.userDisplayNameField}}</td>
230-
</tr>
231-
<tr>
232-
<th>Device Id Field
233-
<button class="info-button" mat-icon-button
234-
(click)="showInfo('Device Id Field', 'The ArcGIS layer text field attribute name to store the MAGE device id')">
235-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
236-
</button>
237-
</th>
238-
<td>{{config.deviceIdField}}</td>
239-
</tr>
240-
<tr>
241-
<th>Created At Field
242-
<button class="info-button" mat-icon-button
243-
(click)="showInfo('Created At Field', 'The ArcGIS layer date time field attribute name to store the MAGE created at date')">
244-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
245-
</button>
246-
</th>
247-
<td>{{config.createdAtField}}</td>
248-
</tr>
249-
<tr>
250-
<th>Last Modified Field
251-
<button class="info-button" mat-icon-button
252-
(click)="showInfo('Last Modified Field', 'The ArcGIS layer date time field attribute name to store the MAGE last modified date (may be the same as last edited date field if editable)')">
253-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
254-
</button>
255-
</th>
256-
<td>{{config.lastModifiedField}}</td>
257-
</tr>
258-
<tr>
259-
<th>Geometry Type Field
260-
<button class="info-button" mat-icon-button
261-
(click)="showInfo('Geometry Type Field', 'The ArcGIS layer text field attribute name to store the Esri geometry type')">
262-
<mat-icon class="info-icon" [inline]="true">info_outline</mat-icon>
263-
</button>
264-
</th>
265-
<td>{{config.geometryType}}</td>
266-
</tr>
267-
</table>
268-
</div>
74+
<arc-layer [config]="config" (configChanged)="configChanged($event)"></arc-layer>
75+
<arc-event [config]="config" (configChanged)="configChanged($event)" [configChangedNotifier]="configChangedNotifier.asObservable()"></arc-event>
76+
<section class="arc-fields"></section>
77+
<mat-card appearance="outlined">
78+
<mat-card-header>
79+
<mat-card-title>Attributes</mat-card-title>
80+
<mat-card-subtitle>MAGE Field to ArcGIS Attribute mappings.</mat-card-subtitle>
81+
</mat-card-header>
82+
<mat-card-content>
83+
<form [formGroup]="attributesForm">
84+
<div class="edit-attributes-form">
85+
<div class="observation-id-field">
86+
<mat-form-field [style.width.%]="90" appearance="fill">
87+
<mat-label>Observation Id Field</mat-label>
88+
<input type="text" matInput formControlName="observationIdField" />
89+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE observation id</mat-hint>
90+
</mat-form-field>
91+
</div>
92+
<div class="id-separator-field">
93+
<mat-form-field [style.width.%]="90" appearance="fill">
94+
<mat-label>Id Separator</mat-label>
95+
<input type="text" matInput formControlName="idSeparator" />
96+
<mat-hint>When event id field is not configured, the separator combining observation ids and event ids in the observation id field</mat-hint>
97+
</mat-form-field>
98+
</div>
99+
<div class="event-id-field">
100+
<mat-form-field [style.width.%]="90" appearance="fill">
101+
<mat-label>Event Id Field</mat-label>
102+
<input type="text" matInput formControlName="eventIdField" />
103+
<mat-hint>The ArcGIS layer integer field attribute name to store the MAGE event id</mat-hint>
104+
</mat-form-field>
105+
</div>
106+
<div class="last-edited-date-field">
107+
<mat-form-field [style.width.%]="90" appearance="fill">
108+
<mat-label>Last Edited Date Field</mat-label>
109+
<input type="text" matInput formControlName="lastEditedDateField" />
110+
<mat-hint>The last edited date field attribute name on the ArcGIS layer</mat-hint>
111+
</mat-form-field>
112+
</div>
113+
<div class="event-name-field">
114+
<mat-form-field [style.width.%]="90" appearance="fill">
115+
<mat-label>Event Name Field</mat-label>
116+
<input type="text" matInput formControlName="eventNameField" />
117+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE event name</mat-hint>
118+
</mat-form-field>
119+
</div>
120+
<div class="user-id-field">
121+
<mat-form-field [style.width.%]="90" appearance="fill">
122+
<mat-label>User Id Field</mat-label>
123+
<input type="text" matInput formControlName="userIdField" />
124+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE user id</mat-hint>
125+
</mat-form-field>
126+
</div>
127+
<div class="username-field">
128+
<mat-form-field [style.width.%]="90" appearance="fill">
129+
<mat-label>Username Field</mat-label>
130+
<input type="text" matInput formControlName="usernameField" />
131+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE username</mat-hint>
132+
</mat-form-field>
133+
</div>
134+
<div class="user-display-name-field">
135+
<mat-form-field [style.width.%]="90" appearance="fill">
136+
<mat-label>User Display Name Field</mat-label>
137+
<input type="text" matInput formControlName="userDisplayNameField" />
138+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE user display name</mat-hint>
139+
</mat-form-field>
140+
</div>
141+
<div class="device-id-field">
142+
<mat-form-field [style.width.%]="90" appearance="fill">
143+
<mat-label>Device Id Field</mat-label>
144+
<input type="text" matInput formControlName="deviceIdField" />
145+
<mat-hint>The ArcGIS layer text field attribute name to store the MAGE device id</mat-hint>
146+
</mat-form-field>
147+
</div>
148+
<div class="created-at-field">
149+
<mat-form-field [style.width.%]="90" appearance="fill">
150+
<mat-label>Created At Field</mat-label>
151+
<input type="text" matInput formControlName="createdAtField" />
152+
<mat-hint>The ArcGIS layer date time field attribute name to store the MAGE created at date</mat-hint>
153+
</mat-form-field>
154+
</div>
155+
<div class="last-modified-field">
156+
<mat-form-field [style.width.%]="90" appearance="fill">
157+
<mat-label>Last Modified Field</mat-label>
158+
<input type="text" matInput formControlName="lastModifiedField" />
159+
<mat-hint>The ArcGIS layer date time field attribute name to store the MAGE last modified date (may be the
160+
same as last edited date field if editable)</mat-hint>
161+
</mat-form-field>
162+
</div>
163+
<div class="geometry-type-field">
164+
<mat-form-field [style.width.%]="90" appearance="fill">
165+
<mat-label>Geometry Type Field</mat-label>
166+
<input type="text" matInput formControlName="geometryType" />
167+
<mat-hint>The ArcGIS layer text field attribute name to store the Esri geometry type</mat-hint>
168+
</mat-form-field>
169+
</div>
170+
<div class="button-group">
171+
<button mat-raised-button color="primary" type="submit" [disabled]="attributesForm.invalid">Save</button>
172+
<button mat-button type="button" (click)="cancelEdit()">Cancel</button>
173+
</div>
174+
</div>
175+
</form>
176+
</mat-card-content>
177+
</mat-card>
178+
<mat-card>
269179
<div class="fieldOverrides">
270180
Field Mappings
271181
<button class="info-button" mat-icon-button
@@ -725,8 +635,6 @@ <h2>Attributes <button class="edit-button" mat-icon-button (click)="onEditAttrib
725635
</ng-container>
726636
</table>
727637
</div>
728-
</section>
729-
</div>
730638
<ng-template #infoDialog let-data>
731639
<h3 matDialogTitle>{{infoTitle}}</h3>
732640
<mat-dialog-content>

plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.scss

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
section {
1111
>* {
12-
margin-inline-start: 1em;
12+
margin-inline-start: 0;
1313
}
1414

1515
header {
@@ -50,20 +50,6 @@ section {
5050
}
5151
}
5252

53-
.attributes-table {
54-
tr {
55-
th {
56-
font-weight: normal;
57-
}
58-
59-
td {
60-
padding-left: 20px;
61-
opacity: 0.5;
62-
font-size: 0.9em;
63-
}
64-
}
65-
}
66-
6753
.fieldOverrides {
6854
margin-top: 20px;
6955
}
@@ -193,3 +179,17 @@ section {
193179
line-height: inherit;
194180
width: inherit;
195181
}
182+
183+
mat-form-field {
184+
width: 100%;
185+
margin-bottom: 16px;
186+
}
187+
188+
mat-card {
189+
margin-bottom: 8px;
190+
}
191+
192+
.hint {
193+
font-size: 75%;
194+
padding: 0 1em;
195+
}

0 commit comments

Comments
 (0)