alfresco-ng2-components/lib/insights/analytics-process/components/analytics-report-parameters.component.html
davidcanonieto 1a21f234b6 [ADF-3746] Add style lint rules (#3975)
* add stylelint

* fix style first part

*  fix style second part

*  fix style third part

*  fix style fourth part

* Fix e2e tests first part

* Fix e2e tests second part

* Rebase branch

*  fix style third part

*  fix style fourth part

* Fix list error

* fix insights

* fix style abotu component

* Fix e2e tests second part

* Rebase branch

*  fix style third part

*  fix style fourth part

* Fix list error

* Fix e2e tests second part

* Rebase branch

*  fix style third part

*  fix style fourth part

* Fix list error

* [ADF-3746] Rebase branch

* Fix e2e tests second part

* Rebase branch

*  fix style third part

*  fix style fourth part

* Fix list error

* Fix e2e tests second part

* Rebase branch

* Fix list error

* fix new style added

* tslint fix

* [ADF-3746] Fix scss errors on Process Filters Cloud component
2018-11-28 14:43:18 +00:00

136 lines
8.1 KiB
HTML

<div [class.adf-hide]="hideComponent">
<div class="adf-report-report-container">
<div *ngIf="reportParameters">
<form [formGroup]="reportForm" novalidate>
<adf-toolbar>
<adf-toolbar-title class="adf-report-title-container">
<div *ngIf="isEditable">
<mat-form-field class="adf-full-width-input">
<input
matInput
type="text"
class="adf-edit-report-title"
id="reportName"
autofocus
data-automation-id="reportName"
[value]="reportParameters.name"
(input)="reportParameters.name=$event.target.value"
(blur)="editTitle()"
(keyup.enter)="editTitle()"
/>
</mat-form-field>
</div>
<div class="adf-report-title" *ngIf="!isEditable" (click)="editEnable()">
<mat-icon class="adf-report-icon" >mode_edit</mat-icon>
<h4>{{reportParameters.name}}</h4>
</div>
</adf-toolbar-title>
<adf-buttons-action-menu *ngIf="!isEditable">
<button mat-menu-item (click)="toggleParameters()" id="">
<mat-icon>settings</mat-icon><span>{{ 'ANALYTICS.MESSAGES.ICON-SETTING' | translate }}</span>
</button>
<button mat-menu-item (click)="deleteReport(reportId)" id="delete-button">
<mat-icon>delete</mat-icon><span>{{ 'ANALYTICS.MESSAGES.ICON-DELETE' | translate }}</span>
</button>
<div *ngIf="isFormValid()">
<button mat-menu-item (click)="showDialog('Export')" id="export-button">
<mat-icon>file_download</mat-icon><span>{{ 'ANALYTICS.MESSAGES.ICON-EXPORT-CSV' | translate }}</span>
</button>
<button mat-menu-item (click)="showDialog('Save')" id="save-button">
<mat-icon>save</mat-icon><span>{{ 'ANALYTICS.MESSAGES.ICON-SAVE' | translate }}</span>
</button>
</div>
</adf-buttons-action-menu>
</adf-toolbar>
<div *ngFor="let field of reportParameters.definition.parameters"
[class.adf-is-hide]="isParametersHide()">
<div [ngSwitch]="field.type">
<div *ngSwitchCase="'integer'">
<br>
<analytics-number-widget [field]="field" [group]="reportForm.controls.processInstanceGroup"
[controllerName]="'slowProcessInstanceInteger'"
[required]="true"></analytics-number-widget>
</div>
<div *ngSwitchCase="'duration'">
<br>
<duration-widget [field]="field" [group]="reportForm.controls.durationGroup"
[controllerName]="'duration'"></duration-widget>
</div>
<div *ngSwitchCase="'boolean'">
<br>
<analytics-checkbox-widget [field]="field" [group]="reportForm.controls.typeFilteringGroup"
[controllerName]="'typeFiltering'"></analytics-checkbox-widget>
</div>
<div *ngSwitchCase="'status'">
<br>
<analytics-dropdown-widget [field]="field" [group]="reportForm.controls.statusGroup"
[controllerName]="'status'"
[required]="true"></analytics-dropdown-widget>
</div>
<div *ngSwitchCase="'processDefinition'">
<br>
<analytics-dropdown-widget [field]="field" [group]="reportForm.controls.processDefGroup"
[controllerName]="'processDefinitionId'"
[required]="true"
(fieldChanged)="onProcessDefinitionChanges(field)"></analytics-dropdown-widget>
</div>
<div *ngSwitchCase="'task'">
<br>
<analytics-dropdown-widget [field]="field" [group]="reportForm.controls.taskGroup"
[controllerName]="'taskName'"
[required]="true"></analytics-dropdown-widget>
</div>
<div *ngSwitchCase="'dateRange'">
<br>
<adf-date-range-widget [field]="field"
[group]="reportForm.controls.dateRange"></adf-date-range-widget>
</div>
<div *ngSwitchCase="'dateInterval'">
<br>
<analytics-dropdown-widget [field]="field" [group]="reportForm.controls.dateIntervalGroup"
[controllerName]="'dateRangeInterval'"
[required]="true" [showDefaultOption]="false"></analytics-dropdown-widget>
</div>
<div *ngSwitchDefault>
<span>{{'ANALYTICS.MESSAGES.UNKNOWN-WIDGET-TYPE' | translate}}: {{field.type}}</span>
</div>
</div>
</div>
<ng-template #reportNameDialog>
<div id="report-dialog" class="adf-report-dialog">
<h5 matDialogTitle id="report-dialog-title">{{action}} report</h5>
<div mat-dialog-content>
<div *ngIf="isSaveAction()" id="save-title-submessage" class="adf-export-message">
{{'DIALOG.SAVE_MESSAGE' | translate}}
</div>
<div class="adf-save-export-input">
<mat-form-field class="adf-example-full-width" floatPlaceholder="always">
<input matInput
type="text"
id="repName"
placeholder="Report Name"
[value]="reportName"
[(ngModel)]="reportName"
[ngModelOptions]="{standalone: true}">
</mat-form-field>
</div>
</div>
<div mat-dialog-actions>
<button mat-button
color="accent"
type="button"
id="close-dialog-button"
(click)="closeDialog()">Close</button>
<button mat-button
color="primary"
type="button"
id="action-dialog-button"
(click)="performAction(action, reportParamQuery)">{{action}}</button>
</div>
</div>
</ng-template>
</form>
</div>
</div>
</div>