Revision 59811
Added by Konstantinos Triantafyllou about 3 years ago
indicators.component.html | ||
---|---|---|
243 | 243 |
[formInput]="numberIndicatorFb.get('description')" |
244 | 244 |
label="Description" type="textarea"> |
245 | 245 |
</div> |
246 |
<div dashboard-input *ngIf="isAdministrator || indicator.defaultId" class="uk-width-1-1" [formInput]="numberIndicatorFb.get('additionalDescription')" |
|
246 |
<div dashboard-input *ngIf="isAdministrator || indicator.defaultId" class="uk-width-1-1" |
|
247 |
[formInput]="numberIndicatorFb.get('additionalDescription')" |
|
247 | 248 |
label="Additional information" type="textarea"> |
248 | 249 |
</div> |
249 | 250 |
|
... | ... | |
261 | 262 |
<div class="uk-width-1-1"> |
262 | 263 |
<div class="uk-grid" uk-grid> |
263 | 264 |
<div class="uk-width-1-1"> |
264 |
<div dashboard-input [formInput]="indicatorPath.get('url')" label="Number URL"></div> |
|
265 |
<div dashboard-input [formInput]="indicatorPath.get('url')" label="Number URL" |
|
266 |
[warning]="urlParameterizedMessage"></div> |
|
265 | 267 |
</div> |
266 |
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert uk-width-1-1"> |
|
267 |
{{urlParameterizedMessage}} |
|
268 |
</div> |
|
269 | 268 |
<div class="uk-width-1-1"> |
270 | 269 |
<div dashboard-input [formInput]="indicatorPath.get('source')" label="Source" |
271 | 270 |
type="select" [options]="indicatorUtils.sourceTypes"> |
... | ... | |
274 | 273 |
</div> |
275 | 274 |
</div> |
276 | 275 |
<div formArrayName="jsonPath" class="uk-width-1-1"> |
277 |
<h6 class="uk-text-bold"> |
|
278 |
JSON Path |
|
276 |
<h6 class="uk-text-bold uk-flex uk-flex-middle uk-margin-remove-bottom" |
|
277 |
[class.uk-text-danger]="numberIndicatorPaths.at(i).get('result').invalid && numberIndicatorPaths.at(i).get('result').errors.required"> |
|
278 |
<span>JSON Path</span> |
|
279 | 279 |
</h6> |
280 |
<div class="uk-grid uk-child-width-1-3@m uk-child-width-1-1" uk-grid> |
|
280 |
<div *ngIf="numberIndicatorPaths.at(i).get('result').invalid && numberIndicatorPaths.at(i).get('result').errors.required"> |
|
281 |
<div class="uk-text-danger uk-text-small"> |
|
282 |
This JSON path is not valid or the result has not been calculated yet. |
|
283 |
Please press calculate on box below to see the result. |
|
284 |
</div> |
|
285 |
</div> |
|
286 |
<div class="uk-grid uk-child-width-1-3@m uk-child-width-1-1 uk-margin-top" uk-grid> |
|
281 | 287 |
<div *ngFor="let jsonPath of getJsonPath(i).controls; let j=index" class="uk-flex uk-flex-middle"> |
282 | 288 |
<div dashboard-input class="uk-width-1-1" |
283 | 289 |
[extraLeft]="false" |
... | ... | |
296 | 302 |
</div> |
297 | 303 |
</div> |
298 | 304 |
<div class="uk-flex uk-flex-middle"> |
299 |
<button class="uk-icon-button uk-button-secondary uk-margin-medium-top"
|
|
300 |
(click)="addJsonPath(i)"> |
|
305 |
<button class="uk-icon-button uk-button-secondary uk-margin-medium-top" |
|
306 |
(click)="addJsonPath(i)">
|
|
301 | 307 |
<icon name="add"></icon> |
302 | 308 |
</button> |
303 |
<!--<span *ngIf="getJsonPath(i).invalid" class="uk-margin-small-left uk-margin-medium-top"> |
|
304 |
<button *ngIf="getJsonPath(i).errors.invalid" class="uk-icon-button uk-button-primary" |
|
305 |
(click)="validateJsonPath(i)"> |
|
306 |
<icon name="done"></icon> |
|
307 |
</button> |
|
308 |
</span> |
|
309 |
<span *ngIf="getJsonPath(i).disabled" class="uk-text-primary uk-margin-small-left uk-margin-medium-top">Validating...</span> |
|
310 |
<span *ngIf="getJsonPath(i).valid" class="uk-text-success uk-margin-small-left uk-margin-medium-top"> |
|
311 |
<icon name="done"></icon> |
|
312 |
</span>--> |
|
313 | 309 |
</div> |
314 | 310 |
</div> |
315 | 311 |
</div> |
312 |
<div class="uk-width-1-1 uk-flex uk-flex-center"> |
|
313 |
<div class="uk-flex uk-position-relative"> |
|
314 |
<span class="uk-padding number number-preview"> |
|
315 |
<span *ngIf="numberIndicatorPaths.at(i).get('result').valid">{{numberIndicatorPaths.at(i).get('result').value | number}}</span> |
|
316 |
</span> |
|
317 |
<div *ngIf="numberIndicatorPaths.at(i).get('result').invalid" class="uk-width-1-1 uk-height-1-1 refresh-indicator"> |
|
318 |
<div class="uk-position-relative uk-height-1-1"> |
|
319 |
<div class="uk-position-center uk-text-center clickable uk-text-small" |
|
320 |
(click)="validateJsonPath(i)"> |
|
321 |
<div> |
|
322 |
<icon name="refresh"></icon> |
|
323 |
</div> |
|
324 |
<span *ngIf="numberIndicatorPaths.at(i).get('result').errors.required">Calculate</span> |
|
325 |
<span *ngIf="numberIndicatorPaths.at(i).get('result').errors.validating">Calculating...</span> |
|
326 |
</div> |
|
327 |
</div> |
|
328 |
</div> |
|
329 |
</div> |
|
330 |
</div> |
|
316 | 331 |
</div> |
317 | 332 |
</div> |
318 | 333 |
</div> |
... | ... | |
330 | 345 |
[formInput]="chartIndicatorFb.get('description')" |
331 | 346 |
label="Description" type="textarea"> |
332 | 347 |
</div> |
333 |
<div dashboard-input *ngIf="isAdministrator || indicator.defaultId" class="uk-width-1-1" [formInput]="chartIndicatorFb.get('additionalDescription')" |
|
348 |
<div dashboard-input *ngIf="isAdministrator || indicator.defaultId" class="uk-width-1-1" |
|
349 |
[formInput]="chartIndicatorFb.get('additionalDescription')" |
|
334 | 350 |
label="Additional information" type="textarea"> |
335 | 351 |
</div> |
336 | 352 |
<div dashboard-input class="uk-width-1-2@m" [formInput]="chartIndicatorFb.get('visibility')" |
... | ... | |
345 | 361 |
[formGroup]="indicatorPath" class="uk-grid" uk-grid> |
346 | 362 |
<div dashboard-input class="uk-width-1-1" |
347 | 363 |
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''" |
348 |
[formInput]="indicatorPath.get('url')" |
|
364 |
[formInput]="indicatorPath.get('url')" [warning]="urlParameterizedMessage"
|
|
349 | 365 |
label="Chart URL"></div> |
350 |
<div *ngIf="urlParameterizedMessage.length > 0" class="uk-alert-warning uk-alert uk-width-1-1"> |
|
351 |
{{urlParameterizedMessage}} |
|
352 |
</div> |
|
353 | 366 |
<div class="uk-width-1-1" formArrayName="parameters"> |
354 | 367 |
<div class="uk-grid" uk-grid> |
355 | 368 |
<div *ngIf="getParameter(i, 'title')" class="uk-width-1-1"> |
... | ... | |
402 | 415 |
<div *ngIf="indicator && indicator.indicatorPaths[i] && indicator.indicatorPaths[i].safeResourceUrl" |
403 | 416 |
class="uk-margin-medium-top uk-position-relative uk-width-1-1 uk-flex uk-flex-center"> |
404 | 417 |
<div *ngIf="(hasDifference(i)) && !indicatorPath.invalid" |
405 |
class="uk-width-1-1 uk-height-large refresh-iframe">
|
|
418 |
class="uk-width-1-1 uk-height-large refresh-indicator">
|
|
406 | 419 |
<div class="uk-position-relative uk-height-1-1"> |
407 | 420 |
<div class="uk-position-center uk-text-center clickable" |
408 | 421 |
(click)="refreshIndicator()"> |
Also available in: Unified diff
[Monitor Dashboard | Trunk]: Fix number indicator form, add validation