-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adjust layout for alarms and events in datapoints graph
- Loading branch information
1 parent
7be91d3
commit b96a95e
Showing
12 changed files
with
238 additions
and
98 deletions.
There are no files selected for viewing
56 changes: 30 additions & 26 deletions
56
...arm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
<div [formGroup]="formGroup"> | ||
<c8y-form-group> | ||
<label translate>Label</label> | ||
<input | ||
class="form-control" | ||
name="label" | ||
formControlName="label" | ||
[placeholder]=" | ||
'e.g. {{ example }}' | ||
| translate | ||
: { | ||
example: | ||
timelineType === 'ALARM' | ||
? 'c8y_UnavailabilityAlarm' | ||
: 'c8y_LocationUpdate' | ||
} | ||
" | ||
/> | ||
</c8y-form-group> | ||
|
||
<div formGroupName="filters"> | ||
<c8y-form-group> | ||
<label translate>Type</label> | ||
<div class="d-flex a-i-center gap-8"> | ||
<label class="m-0" translate>Label</label> | ||
<input | ||
class="form-control" | ||
name="type" | ||
formControlName="type" | ||
class="form-control flex-grow" | ||
name="label" | ||
formControlName="label" | ||
[placeholder]=" | ||
'e.g. {{ example }}' | ||
| translate | ||
: { | ||
example: | ||
timelineType === 'ALARM' | ||
? 'c8y_UnavailabilityAlarm' | ||
: 'c8y_LocationUpdate' | ||
? 'Alarm unavailable' | ||
: 'Location update' | ||
} | ||
" | ||
/> | ||
</div> | ||
</c8y-form-group> | ||
|
||
<div formGroupName="filters"> | ||
<c8y-form-group> | ||
<div class="d-flex a-i-center gap-8"> | ||
<label class="m-0" translate>Type</label> | ||
<input | ||
class="form-control flex-grow" | ||
name="type" | ||
formControlName="type" | ||
[placeholder]=" | ||
'e.g. {{ example }}' | ||
| translate | ||
: { | ||
example: | ||
timelineType === 'ALARM' | ||
? 'c8y_UnavailabilityAlarm' | ||
: 'c8y_LocationUpdate' | ||
} | ||
" | ||
/> | ||
</div> | ||
</c8y-form-group> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 16 additions & 15 deletions
31
...graph/alarm-event-selector/custom-alarm-event-form/custom-alarm-event-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
<form [formGroup]="formGroup"> | ||
<form [formGroup]="formGroup" class="p-16"> | ||
<div | ||
class="c8y-list__item__colorpicker p-t-0 p-b-0 p-l-0" | ||
class="form-group d-flex a-i-center gap-8" | ||
[title]="'Change color' | translate" | ||
> | ||
<label translate>Color</label> | ||
<div class="c8y-colorpicker"> | ||
<label class="m-0" translate>Color</label> | ||
<div class="c8y-colorpicker c8y-colorpicker--alarm"> | ||
<input | ||
type="color" | ||
formControlName="color" | ||
(click)="$event.stopPropagation()" | ||
/> | ||
<span [style.background-color]="formGroup.value.color"></span> | ||
<span [style.background-color]="formGroup.value.color"> | ||
<i [c8yIcon]="timelineType === 'EVENT' ? 'c8y-events' : 'bell'"></i> | ||
</span> | ||
</div> | ||
</div> | ||
|
||
<div class="data-point-details"> | ||
<c8y-alarm-event-attributes-form | ||
formControlName="details" | ||
[timelineType]="timelineType" | ||
></c8y-alarm-event-attributes-form> | ||
</div> | ||
<c8y-alarm-event-attributes-form | ||
formControlName="details" | ||
[timelineType]="timelineType" | ||
></c8y-alarm-event-attributes-form> | ||
|
||
<div class="d-flex"> | ||
<button class="btn btn-default" (click)="cancel.emit()"> | ||
<div class="d-flex p-t-16"> | ||
<button class="btn btn-default btn-sm" (click)="cancel.emit()"> | ||
{{ 'Cancel' | translate }} | ||
</button> | ||
<button | ||
class="btn btn-default" | ||
class="btn btn-primary btn-sm" | ||
[disabled]="(valid$ | async) === false" | ||
(click)="add()" | ||
> | ||
{{ 'Add' | translate }} | ||
<i c8yIcon="plus-circle"></i> | ||
{{ 'Select' | translate }} | ||
</button> | ||
</div> | ||
</form> |
Oops, something went wrong.