#1175 Separate analytics generator and hide analytics parameters (#1546)

* #1175 Separate analytics generator and hide analytics parameters

* Remove unused code
fix unit test

* Rollback mandatory field (appId)

* fix the onChanges problem

* #1175 - rebased branch
This commit is contained in:
Maurizio Vitale
2017-01-27 14:35:28 +00:00
committed by Mario Romano
parent b05247dade
commit 537be1e058
15 changed files with 598 additions and 402 deletions

View File

@@ -15,12 +15,27 @@
* limitations under the License.
*/
import { Component, EventEmitter, OnInit, OnChanges, Input, Output, SimpleChanges, OnDestroy, AfterViewChecked } from '@angular/core';
import {
Component,
EventEmitter,
OnInit,
OnChanges,
Input,
Output,
SimpleChanges,
OnDestroy,
AfterViewChecked
} from '@angular/core';
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
import * as moment from 'moment';
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
import { AnalyticsService } from '../services/analytics.service';
import { ReportParametersModel, ReportQuery, ParameterValueModel, ReportParameterDetailsModel } from '../models/report.model';
import {
ReportParametersModel,
ReportQuery,
ParameterValueModel,
ReportParameterDetailsModel
} from '../models/report.model';
declare var componentHandler;
@@ -69,6 +84,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
private reportParamsSub;
private paramOpts;
private isEditable: boolean = false;
private hideParameters: boolean = true;
constructor(private translateService: AlfrescoTranslationService,
private analyticsService: AnalyticsService,
@@ -246,4 +262,12 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
componentHandler.upgradeAllRegistered();
}
}
toggleParameters() {
this.hideParameters = !this.hideParameters;
}
isParametersHide() {
return this.hideParameters;
}
}