adf-insights 2.0.1

This commit is contained in:
Eugenio Romano 2017-11-29 17:15:33 +00:00
parent 18dc0711f9
commit 933cee23e3
41 changed files with 1075 additions and 724 deletions

View File

@ -77,7 +77,7 @@
"@alfresco/adf-content-services": "2.0.0",
"@alfresco/adf-process-services": "2.0.0",
"@alfresco/adf-core": "2.0.0",
"@alfresco/adf-insights": "2.0.0",
"@alfresco/adf-insights": "2.0.1",
"chart.js": "2.5.0",
"classlist.js": "1.1.20150312",
"core-js": "2.4.1",
@ -102,7 +102,7 @@
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"codelyzer": "4.0.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",

View File

@ -21,8 +21,8 @@ import { ChartsModule } from 'ng2-charts';
import { MaterialModule } from '../../material.module';
import { DiagramsModule } from '../../diagram/diagram.module';
import { Chart } from '../../diagram';
import { ReportQuery } from '../../diagram';
import { Chart } from '../../diagram/models/chart/chart.model';
import { ReportQuery } from '../../diagram/models/report/reportQuery.model';
import * as analyticMock from '../../mock';
import { AnalyticsGeneratorComponent } from '../components/analytics-generator.component';
import { AnalyticsProcessModule } from '../analytics-process.module';

View File

@ -16,8 +16,8 @@
*/
import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation } from '@angular/core';
import { ReportQuery } from '../../diagram';
import { Chart } from '../../diagram';
import { ReportQuery } from '../../diagram/models/report/reportQuery.model';
import { Chart } from '../../diagram/models/chart/chart.model';
import { AnalyticsService } from '../services/analytics.service';
@Component({

View File

@ -20,7 +20,7 @@ import { DiagramsModule } from '../../diagram/diagram.module';
import { AnalyticsProcessModule } from '../analytics-process.module';
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
import { MaterialModule } from '../../material.module';
import { ReportParametersModel } from '../../diagram/models/report.model';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
declare let jasmine: any;

View File

@ -18,7 +18,7 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';
import { ReportParametersModel } from '../../diagram';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import { AnalyticsService } from '../services/analytics.service';
@Component({

View File

@ -17,7 +17,7 @@
import { SimpleChange } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportParametersModel } from '../../diagram';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import * as analyticParamsMock from '../../mock';
import { AnalyticsReportParametersComponent } from '../components/analytics-report-parameters.component';
import { AnalyticsProcessModule } from '../analytics-process.module';

View File

@ -32,7 +32,10 @@ import {
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material';
import moment from 'moment-es6';
import { ParameterValueModel, ReportParameterDetailsModel, ReportParametersModel, ReportQuery } from '../../diagram';
import { ParameterValueModel } from '../../diagram/models/report/parameterValue.model';
import { ReportParameterDetailsModel } from '../../diagram/models/report/reportParameterDetails.model';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import { ReportQuery } from '../../diagram/models/report/reportQuery.model';
import { AnalyticsService } from '../services/analytics.service';
@Component({

View File

@ -16,7 +16,7 @@
*/
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import { ReportQuery } from '../../diagram';
import { ReportQuery } from '../../diagram/models/report/reportQuery.model';
import { AnalyticsGeneratorComponent } from './analytics-generator.component';
@Component({

View File

@ -20,8 +20,8 @@
/* tslint:disable::no-access-missing-member */
import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ParameterValueModel } from '../../../../diagram/models/report.model';
import { ReportParameterDetailsModel } from '../../../../diagram/models/report.model';
import { ParameterValueModel } from '../../../../diagram/models/report/parameterValue.model';
import { ReportParameterDetailsModel } from '../../../../diagram/models/report/reportParameterDetails.model';
import { NumberWidgetAanlyticsComponent } from './../number/number.widget';
@Component({

View File

@ -20,10 +20,4 @@ export * from './components/analytics-generator.component';
export * from './components/analytics-report-list.component';
export * from './components/analytics-report-parameters.component';
export * from './components/widgets/checkbox/checkbox.widget';
export * from './components/widgets/date-range/date-range.widget';
export * from './components/widgets/dropdown/dropdown.widget';
export * from './components/widgets/duration/duration.widget';
export * from './components/widgets/number/number.widget';
export * from './services/analytics.service';

View File

@ -19,16 +19,16 @@ import { AlfrescoApiService, LogService } from '@alfresco/adf-core';
import { Injectable } from '@angular/core';
import { Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { ParameterValueModel, ReportParametersModel } from '../../diagram';
import {
BarChart,
Chart,
DetailsTableChart,
HeatMapChart,
MultiBarChart,
PieChart,
TableChart
} from '../../diagram';
import { ParameterValueModel } from '../../diagram/models/report/parameterValue.model';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import { BarChart } from '../../diagram/models/chart/barChart.model';
import { Chart } from '../../diagram/models/chart/chart.model';
import { DetailsTableChart } from '../../diagram/models/chart/detailsTableChart.model';
import { HeatMapChart } from '../../diagram/models/chart/heatMapChart.model';
import { MultiBarChart } from '../../diagram/models/chart/multiBarChart.model';
import { PieChart } from '../../diagram/models/chart/pieChart.model';
import { TableChart } from '../../diagram/models/chart/tableChart.model';
import 'rxjs/add/observable/throw';
@Injectable()

View File

@ -16,7 +16,8 @@
*/
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import { DiagramElementModel, DiagramModel } from '../models/diagram.model';
import { DiagramElementModel } from '../models/diagram/diagramElement.model';
import { DiagramModel } from '../models/diagram/diagram.model';
import { DiagramColorService } from '../services/diagram-color.service';
import { DiagramsService } from '../services/diagrams.service';
import { RaphaelService } from './raphael/raphael.service';

View File

@ -1,307 +0,0 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import moment from 'moment-es6';
export class Chart {
id: string;
type: string;
icon: string;
constructor(obj?: any) {
this.id = obj && obj.id || null;
if (obj && obj.type) {
this.type = this.convertType(obj.type);
this.icon = this.getIconType(this.type);
}
}
private convertType(type: string) {
let chartType = '';
switch (type) {
case 'pieChart':
chartType = 'pie';
break;
case 'table':
chartType = 'table';
break;
case 'line':
chartType = 'line';
break;
case 'barChart':
chartType = 'bar';
break;
case 'multiBarChart':
chartType = 'multiBar';
break;
case 'processDefinitionHeatMap':
chartType = 'HeatMap';
break;
case 'masterDetailTable':
chartType = 'masterDetailTable';
break;
default:
chartType = 'table';
break;
}
return chartType;
}
private getIconType(type: string): string {
let typeIcon: string = '';
switch (type) {
case 'pie':
typeIcon = 'pie_chart';
break;
case 'table':
typeIcon = 'web';
break;
case 'line':
typeIcon = 'show_chart';
break;
case 'bar':
typeIcon = 'equalizer';
break;
case 'multiBar':
typeIcon = 'poll';
break;
case 'HeatMap':
typeIcon = 'share';
break;
case 'masterDetailTable':
typeIcon = 'subtitles';
break;
default:
typeIcon = 'web';
break;
}
return typeIcon;
}
}
export class LineChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
datasets: any[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.labels = obj && obj.columnNames.slice(1, obj.columnNames.length);
obj.rows.forEach((value: any) => {
this.datasets.push({data: value.slice(1, value.length), label: value[0]});
});
}
}
export class BarChart extends Chart {
title: string;
titleKey: string;
labels: any = [];
datasets: any[] = [];
data: any[] = [];
xAxisType: string;
yAxisType: string;
options: any = {
responsive: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 1
}
}],
xAxes: [{
ticks: {
},
stacked: false
}]
}
};
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.xAxisType = obj && obj.xAxisType || null;
this.yAxisType = obj && obj.yAxisType || null;
this.options.scales.xAxes[0].ticks.callback = this.xAxisTickFormatFunction(this.xAxisType);
this.options.scales.yAxes[0].ticks.callback = this.yAxisTickFormatFunction(this.yAxisType);
if (obj.values) {
obj.values.forEach((params: any) => {
let dataValue = [];
params.values.forEach((info: any) => {
info.forEach((value: any, index: any) => {
if (index % 2 === 0) {
if (!this.labels.includes(value)) {
this.labels.push(value);
}
} else {
dataValue.push(value);
}
});
});
if (dataValue && dataValue.length > 0) {
this.datasets.push({data: dataValue, label: params.key});
}
});
}
}
xAxisTickFormatFunction = function (xAxisType) {
return function (value) {
if (xAxisType !== null && xAxisType !== undefined) {
if ('date_day' === xAxisType) {
return moment(new Date(value)).format('DD');
} else if ('date_month' === xAxisType) {
return moment(new Date(value)).format('MMMM');
} else if ('date_year' === xAxisType) {
return moment(new Date(value)).format('YYYY');
}
}
return value;
};
};
yAxisTickFormatFunction = function (yAxisType) {
return function (value) {
if (yAxisType !== null && yAxisType !== undefined) {
if ('count' === yAxisType) {
let label = '' + value;
if (label.indexOf('.') !== -1) {
return '';
}
}
}
return value;
};
};
hasDatasets() {
return this.datasets && this.datasets.length > 0 ? true : false;
}
}
export class MultiBarChart extends BarChart {
constructor(obj?: any) {
super(obj);
}
}
export class TableChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
datasets: any[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.labels = obj && obj.columnNames;
if (obj.rows) {
this.datasets = obj && obj.rows;
}
}
hasDatasets() {
return this.datasets && this.datasets.length > 0 ? true : false;
}
}
export class DetailsTableChart extends TableChart {
detailsTable: any;
showDetails: boolean = false;
constructor(obj?: any) {
super(obj);
if (obj.detailTables) {
this.detailsTable = new TableChart(obj.detailTables[0]);
}
}
hasDetailsTable() {
return this.detailsTable ? true : false;
}
}
export class HeatMapChart extends Chart {
avgTimePercentages: string;
avgTimeValues: string;
processDefinitionId: string;
titleKey: string;
totalCountValues: string;
totalCountsPercentages: string;
totalTimePercentages: string;
totalTimeValues: string;
constructor(obj?: any) {
super(obj);
this.avgTimePercentages = obj && obj.avgTimePercentages || null;
this.avgTimeValues = obj && obj.avgTimeValues || null;
this.processDefinitionId = obj && obj.processDefinitionId || null;
this.totalCountValues = obj && obj.totalCountValues || null;
this.titleKey = obj && obj.titleKey || null;
this.totalCountsPercentages = obj && obj.totalCountsPercentages || null;
this.totalTimePercentages = obj && obj.totalTimePercentages || null;
this.totalTimeValues = obj && obj.totalTimeValues || null;
}
}
export class PieChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
data: string[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
if (obj.values) {
obj.values.forEach((value: any) => {
this.add(value.key, value.y);
});
}
}
add(label: string, data: string) {
this.labels.push(label);
this.data.push(data);
}
hasData(): boolean {
return this.data && this.data.length > 0 ? true : false;
}
hasZeroValues(): boolean {
let isZeroValues: boolean = false;
if (this.hasData()) {
isZeroValues = true;
this.data.forEach((value) => {
if (value.toString() !== '0') {
isZeroValues = false;
}
});
}
return isZeroValues;
}
}

View File

@ -0,0 +1,107 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import moment from 'moment-es6';
import { Chart } from './chart.model';
export class BarChart extends Chart {
title: string;
titleKey: string;
labels: any = [];
datasets: any[] = [];
data: any[] = [];
xAxisType: string;
yAxisType: string;
options: any = {
responsive: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 1
}
}],
xAxes: [{
ticks: {
},
stacked: false
}]
}
};
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.xAxisType = obj && obj.xAxisType || null;
this.yAxisType = obj && obj.yAxisType || null;
this.options.scales.xAxes[0].ticks.callback = this.xAxisTickFormatFunction(this.xAxisType);
this.options.scales.yAxes[0].ticks.callback = this.yAxisTickFormatFunction(this.yAxisType);
if (obj.values) {
obj.values.forEach((params: any) => {
let dataValue = [];
params.values.forEach((info: any) => {
info.forEach((value: any, index: any) => {
if (index % 2 === 0) {
if (!this.labels.includes(value)) {
this.labels.push(value);
}
} else {
dataValue.push(value);
}
});
});
if (dataValue && dataValue.length > 0) {
this.datasets.push({data: dataValue, label: params.key});
}
});
}
}
xAxisTickFormatFunction = function (xAxisType) {
return function (value) {
if (xAxisType !== null && xAxisType !== undefined) {
if ('date_day' === xAxisType) {
return moment(new Date(value)).format('DD');
} else if ('date_month' === xAxisType) {
return moment(new Date(value)).format('MMMM');
} else if ('date_year' === xAxisType) {
return moment(new Date(value)).format('YYYY');
}
}
return value;
};
};
yAxisTickFormatFunction = function (yAxisType) {
return function (value) {
if (yAxisType !== null && yAxisType !== undefined) {
if ('count' === yAxisType) {
let label = '' + value;
if (label.indexOf('.') !== -1) {
return '';
}
}
}
return value;
};
};
hasDatasets() {
return this.datasets && this.datasets.length > 0 ? true : false;
}
}

View File

@ -0,0 +1,92 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class Chart {
id: string;
type: string;
icon: string;
constructor(obj?: any) {
this.id = obj && obj.id || null;
if (obj && obj.type) {
this.type = this.convertType(obj.type);
this.icon = this.getIconType(this.type);
}
}
private convertType(type: string) {
let chartType = '';
switch (type) {
case 'pieChart':
chartType = 'pie';
break;
case 'table':
chartType = 'table';
break;
case 'line':
chartType = 'line';
break;
case 'barChart':
chartType = 'bar';
break;
case 'multiBarChart':
chartType = 'multiBar';
break;
case 'processDefinitionHeatMap':
chartType = 'HeatMap';
break;
case 'masterDetailTable':
chartType = 'masterDetailTable';
break;
default:
chartType = 'table';
break;
}
return chartType;
}
private getIconType(type: string): string {
let typeIcon: string = '';
switch (type) {
case 'pie':
typeIcon = 'pie_chart';
break;
case 'table':
typeIcon = 'web';
break;
case 'line':
typeIcon = 'show_chart';
break;
case 'bar':
typeIcon = 'equalizer';
break;
case 'multiBar':
typeIcon = 'poll';
break;
case 'HeatMap':
typeIcon = 'share';
break;
case 'masterDetailTable':
typeIcon = 'subtitles';
break;
default:
typeIcon = 'web';
break;
}
return typeIcon;
}
}

View File

@ -0,0 +1,34 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { TableChart } from './tableChart.model';
export class DetailsTableChart extends TableChart {
detailsTable: any;
showDetails: boolean = false;
constructor(obj?: any) {
super(obj);
if (obj.detailTables) {
this.detailsTable = new TableChart(obj.detailTables[0]);
}
}
hasDetailsTable() {
return this.detailsTable ? true : false;
}
}

View File

@ -0,0 +1,41 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Chart } from './chart.model';
export class HeatMapChart extends Chart {
avgTimePercentages: string;
avgTimeValues: string;
processDefinitionId: string;
titleKey: string;
totalCountValues: string;
totalCountsPercentages: string;
totalTimePercentages: string;
totalTimeValues: string;
constructor(obj?: any) {
super(obj);
this.avgTimePercentages = obj && obj.avgTimePercentages || null;
this.avgTimeValues = obj && obj.avgTimeValues || null;
this.processDefinitionId = obj && obj.processDefinitionId || null;
this.totalCountValues = obj && obj.totalCountValues || null;
this.titleKey = obj && obj.titleKey || null;
this.totalCountsPercentages = obj && obj.totalCountsPercentages || null;
this.totalTimePercentages = obj && obj.totalTimePercentages || null;
this.totalTimeValues = obj && obj.totalTimeValues || null;
}
}

View File

@ -0,0 +1,36 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Chart } from './chart.model';
export class LineChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
datasets: any[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.labels = obj && obj.columnNames.slice(1, obj.columnNames.length);
obj.rows.forEach((value: any) => {
this.datasets.push({data: value.slice(1, value.length), label: value[0]});
});
}
}

View File

@ -0,0 +1,25 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BarChart } from './barChart.model';
export class MultiBarChart extends BarChart {
constructor(obj?: any) {
super(obj);
}
}

View File

@ -0,0 +1,58 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Chart } from './chart.model';
export class PieChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
data: string[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
if (obj.values) {
obj.values.forEach((value: any) => {
this.add(value.key, value.y);
});
}
}
add(label: string, data: string) {
this.labels.push(label);
this.data.push(data);
}
hasData(): boolean {
return this.data && this.data.length > 0 ? true : false;
}
hasZeroValues(): boolean {
let isZeroValues: boolean = false;
if (this.hasData()) {
isZeroValues = true;
this.data.forEach((value) => {
if (value.toString() !== '0') {
isZeroValues = false;
}
});
}
return isZeroValues;
}
}

View File

@ -0,0 +1,39 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Chart } from './chart.model';
export class TableChart extends Chart {
title: string;
titleKey: string;
labels: string[] = [];
datasets: any[] = [];
constructor(obj?: any) {
super(obj);
this.title = obj && obj.title || null;
this.titleKey = obj && obj.titleKey || null;
this.labels = obj && obj.columnNames;
if (obj.rows) {
this.datasets = obj && obj.rows;
}
}
hasDatasets() {
return this.datasets && this.datasets.length > 0 ? true : false;
}
}

View File

@ -1,206 +0,0 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class DiagramModel {
diagramBeginX: number;
diagramBeginY: number;
diagramHeight: number;
diagramWidth: number;
elements: DiagramElementModel[] = [];
flows: DiagramFlowElementModel[] = [];
pools: DiagramPoolElementModel[] = [];
constructor(obj?: any) {
if (obj) {
this.diagramBeginX = obj.diagramBeginX;
this.diagramBeginY = obj.diagramBeginY;
this.diagramHeight = obj.diagramHeight;
this.diagramWidth = obj.diagramWidth;
if (obj.elements) {
obj.elements.forEach((element: DiagramElementModel) => {
this.elements.push(new DiagramElementModel(element));
});
}
if (obj.flows) {
obj.flows.forEach((flow: DiagramFlowElementModel) => {
this.flows.push(new DiagramFlowElementModel(flow));
});
}
if (obj.pools) {
obj.pools.forEach((pool: DiagramPoolElementModel) => {
this.pools.push(new DiagramPoolElementModel(pool));
});
}
}
}
}
export class DiagramElementModel {
completed: boolean;
current: boolean;
height: string;
id: string;
name: string;
type: string;
width: string;
value: string;
x: string;
y: string;
properties: DiagramElementPropertyModel[] = [];
dataType: string = '';
eventDefinition: DiagramEventDefinitionModel;
taskType: string = '';
constructor(obj?: any) {
if (obj) {
this.completed = !!obj.completed;
this.current = !!obj.current;
this.height = obj.height || '';
this.id = obj.id || '';
this.name = obj.name || '';
this.type = obj.type || '';
this.width = obj.width || '';
this.value = obj.value || '';
this.x = obj.x || '';
this.y = obj.y || '';
this.taskType = obj.taskType || '';
if (obj.properties) {
obj.properties.forEach((property: DiagramElementPropertyModel) => {
this.properties.push(new DiagramElementPropertyModel(property));
});
}
this.dataType = obj.dataType || '';
if (obj.eventDefinition) {
this.eventDefinition = new DiagramEventDefinitionModel(obj.eventDefinition);
}
}
}
}
export class DiagramElementPropertyModel {
name: string;
type: string;
value: any;
constructor(obj?: any) {
if (obj) {
this.name = obj.name;
this.type = obj.type;
this.value = obj.value;
}
}
}
export class DiagramFlowElementModel {
completed: boolean;
current: boolean;
id: string;
properties: any[] = [];
sourceRef: string;
targetRef: string;
type: string;
waypoints: DiagramWayPointModel[] = [];
constructor(obj?: any) {
if (obj) {
this.completed = !!obj.completed;
this.current = !!obj.current;
this.id = obj.id;
this.properties = obj.properties;
this.sourceRef = obj.sourceRef;
this.targetRef = obj.targetRef;
this.type = obj.type;
if (obj.waypoints) {
obj.waypoints.forEach((waypoint: DiagramWayPointModel) => {
this.waypoints.push(new DiagramWayPointModel(waypoint));
});
}
}
}
}
export class DiagramWayPointModel {
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.x = obj.x;
this.y = obj.y;
}
}
}
export class DiagramEventDefinitionModel {
timeCycle: string;
type: string;
constructor(obj?: any) {
if (obj) {
this.timeCycle = obj.timeCycle;
this.type = obj.type;
}
}
}
export class DiagramPoolElementModel {
height: string;
id: string;
name: string;
properties: any;
lanes: DiagramLaneElementModel[] = [];
width: string;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.properties = obj.properties;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
if (obj.lanes) {
obj.lanes.forEach((lane: DiagramLaneElementModel) => {
this.lanes.push(new DiagramLaneElementModel(lane));
});
}
}
}
}
export class DiagramLaneElementModel {
height: number;
id: string;
name: string;
width: number;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
}
}
}

View File

@ -0,0 +1,54 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DiagramElementModel } from './diagramElement.model';
import { DiagramFlowElementModel } from './diagramFlowElement.model';
import { DiagramPoolElementModel } from './diagramPoolElement.model';
export class DiagramModel {
diagramBeginX: number;
diagramBeginY: number;
diagramHeight: number;
diagramWidth: number;
elements: DiagramElementModel[] = [];
flows: DiagramFlowElementModel[] = [];
pools: DiagramPoolElementModel[] = [];
constructor(obj?: any) {
if (obj) {
this.diagramBeginX = obj.diagramBeginX;
this.diagramBeginY = obj.diagramBeginY;
this.diagramHeight = obj.diagramHeight;
this.diagramWidth = obj.diagramWidth;
if (obj.elements) {
obj.elements.forEach((element: DiagramElementModel) => {
this.elements.push(new DiagramElementModel(element));
});
}
if (obj.flows) {
obj.flows.forEach((flow: DiagramFlowElementModel) => {
this.flows.push(new DiagramFlowElementModel(flow));
});
}
if (obj.pools) {
obj.pools.forEach((pool: DiagramPoolElementModel) => {
this.pools.push(new DiagramPoolElementModel(pool));
});
}
}
}
}

View File

@ -0,0 +1,61 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DiagramElementPropertyModel } from './diagramElementProperty.model';
import { DiagramEventDefinitionModel } from './diagramEventDefinition.model';
export class DiagramElementModel {
completed: boolean;
current: boolean;
height: string;
id: string;
name: string;
type: string;
width: string;
value: string;
x: string;
y: string;
properties: DiagramElementPropertyModel[] = [];
dataType: string = '';
eventDefinition: DiagramEventDefinitionModel;
taskType: string = '';
constructor(obj?: any) {
if (obj) {
this.completed = !!obj.completed;
this.current = !!obj.current;
this.height = obj.height || '';
this.id = obj.id || '';
this.name = obj.name || '';
this.type = obj.type || '';
this.width = obj.width || '';
this.value = obj.value || '';
this.x = obj.x || '';
this.y = obj.y || '';
this.taskType = obj.taskType || '';
if (obj.properties) {
obj.properties.forEach((property: DiagramElementPropertyModel) => {
this.properties.push(new DiagramElementPropertyModel(property));
});
}
this.dataType = obj.dataType || '';
if (obj.eventDefinition) {
this.eventDefinition = new DiagramEventDefinitionModel(obj.eventDefinition);
}
}
}
}

View File

@ -0,0 +1,30 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class DiagramElementPropertyModel {
name: string;
type: string;
value: any;
constructor(obj?: any) {
if (obj) {
this.name = obj.name;
this.type = obj.type;
this.value = obj.value;
}
}
}

View File

@ -0,0 +1,28 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class DiagramEventDefinitionModel {
timeCycle: string;
type: string;
constructor(obj?: any) {
if (obj) {
this.timeCycle = obj.timeCycle;
this.type = obj.type;
}
}
}

View File

@ -0,0 +1,46 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DiagramWayPointModel } from './diagramWayPoint.model';
export class DiagramFlowElementModel {
completed: boolean;
current: boolean;
id: string;
properties: any[] = [];
sourceRef: string;
targetRef: string;
type: string;
waypoints: DiagramWayPointModel[] = [];
constructor(obj?: any) {
if (obj) {
this.completed = !!obj.completed;
this.current = !!obj.current;
this.id = obj.id;
this.properties = obj.properties;
this.sourceRef = obj.sourceRef;
this.targetRef = obj.targetRef;
this.type = obj.type;
if (obj.waypoints) {
obj.waypoints.forEach((waypoint: DiagramWayPointModel) => {
this.waypoints.push(new DiagramWayPointModel(waypoint));
});
}
}
}
}

View File

@ -0,0 +1,36 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class DiagramLaneElementModel {
height: number;
id: string;
name: string;
width: number;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
}
}
}

View File

@ -0,0 +1,46 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DiagramLaneElementModel } from './diagramLaneElement.model';
export class DiagramPoolElementModel {
height: string;
id: string;
name: string;
properties: any;
lanes: DiagramLaneElementModel[] = [];
width: string;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.properties = obj.properties;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
if (obj.lanes) {
obj.lanes.forEach((lane: DiagramLaneElementModel) => {
this.lanes.push(new DiagramLaneElementModel(lane));
});
}
}
}
}

View File

@ -0,0 +1,28 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class DiagramWayPointModel {
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.x = obj.x;
this.y = obj.y;
}
}
}

View File

@ -1,144 +0,0 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
* This object represent the report definition.
*
*
* @returns {ReportParametersModel} .
*/
export class ReportParametersModel {
id: number;
name: string;
definition: ReportDefinitionModel;
created: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
if (obj && obj.definition) {
this.definition = new ReportDefinitionModel(JSON.parse(obj.definition));
}
this.created = obj && obj.created || null;
}
hasParameters() {
return (this.definition && this.definition.parameters && this.definition.parameters.length > 0) ? true : false;
}
}
export class ReportDefinitionModel {
parameters: ReportParameterDetailsModel[] = [];
constructor(obj?: any) {
obj.parameters.forEach((params: any) => {
let reportParamsModel = new ReportParameterDetailsModel(params);
this.parameters.push(reportParamsModel);
});
}
findParam(name: string): ReportParameterDetailsModel {
this.parameters.forEach((param) => {
return param.type === name ? param : null;
});
return null;
}
}
/**
*
* This object represent the report parameter definition.
*
*
* @returns {ReportParameterDetailsModel} .
*/
export class ReportParameterDetailsModel {
id: string;
name: string;
nameKey: string;
type: string;
value: any;
options: ParameterValueModel[];
dependsOn: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
this.nameKey = obj && obj.nameKey || null;
this.type = obj && obj.type || null;
this.value = obj && obj.value || null;
this.options = obj && obj.options || null;
this.dependsOn = obj && obj.dependsOn || null;
}
}
export class ParameterValueModel {
id: string;
name: string;
version: string;
value: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
this.value = obj && obj.value || null;
this.version = obj && obj.version || null;
}
get label () {
return this.version ? `${this.name} (v ${this.version}) ` : this.name;
}
}
export class ReportQuery {
reportName: string;
processDefinitionId: string;
status: string;
taskName: string;
typeFiltering: boolean;
dateRange: ReportDateRange;
dateRangeInterval: string;
slowProcessInstanceInteger: number;
duration: number;
constructor(obj?: any) {
this.reportName = obj && obj.reportName || null;
this.processDefinitionId = obj && obj.processDefinitionId || null;
this.status = obj && obj.status || null;
this.taskName = obj && obj.taskName || null;
this.dateRangeInterval = obj && obj.dateRangeInterval || null;
this.typeFiltering = obj && (typeof obj.typeFiltering !== 'undefined') ? obj.typeFiltering : true;
this.slowProcessInstanceInteger = obj && obj.slowProcessInstanceInteger || 0;
this.duration = obj && obj.duration || 0;
this.dateRange = new ReportDateRange(obj);
}
}
export class ReportDateRange {
startDate: string;
endDate: string;
rangeId: string;
constructor(obj?: any) {
this.startDate = obj && obj.startDate || null;
this.endDate = obj && obj.endDate || null;
this.rangeId = obj && obj.rangeId || null;
}
}

View File

@ -0,0 +1,34 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class ParameterValueModel {
id: string;
name: string;
version: string;
value: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
this.value = obj && obj.value || null;
this.version = obj && obj.version || null;
}
get label () {
return this.version ? `${this.name} (v ${this.version}) ` : this.name;
}
}

View File

@ -0,0 +1,29 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export class ReportDateRange {
startDate: string;
endDate: string;
rangeId: string;
constructor(obj?: any) {
this.startDate = obj && obj.startDate || null;
this.endDate = obj && obj.endDate || null;
this.rangeId = obj && obj.rangeId || null;
}
}

View File

@ -0,0 +1,36 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ReportParameterDetailsModel } from './reportParameterDetails.model';
export class ReportDefinitionModel {
parameters: ReportParameterDetailsModel[] = [];
constructor(obj?: any) {
obj.parameters.forEach((params: any) => {
let reportParamsModel = new ReportParameterDetailsModel(params);
this.parameters.push(reportParamsModel);
});
}
findParam(name: string): ReportParameterDetailsModel {
this.parameters.forEach((param) => {
return param.type === name ? param : null;
});
return null;
}
}

View File

@ -0,0 +1,38 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ParameterValueModel } from './parameterValue.model';
export class ReportParameterDetailsModel {
id: string;
name: string;
nameKey: string;
type: string;
value: any;
options: ParameterValueModel[];
dependsOn: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
this.nameKey = obj && obj.nameKey || null;
this.type = obj && obj.type || null;
this.value = obj && obj.value || null;
this.options = obj && obj.options || null;
this.dependsOn = obj && obj.dependsOn || null;
}
}

View File

@ -0,0 +1,38 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ReportDefinitionModel } from './reportDefinition.model';
export class ReportParametersModel {
id: number;
name: string;
definition: ReportDefinitionModel;
created: string;
constructor(obj?: any) {
this.id = obj && obj.id;
this.name = obj && obj.name || null;
if (obj && obj.definition) {
this.definition = new ReportDefinitionModel(JSON.parse(obj.definition));
}
this.created = obj && obj.created || null;
}
hasParameters() {
return (this.definition && this.definition.parameters && this.definition.parameters.length > 0) ? true : false;
}
}

View File

@ -0,0 +1,43 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ReportDateRange } from './reportDateRange.model';
export class ReportQuery {
reportName: string;
processDefinitionId: string;
status: string;
taskName: string;
typeFiltering: boolean;
dateRange: ReportDateRange;
dateRangeInterval: string;
slowProcessInstanceInteger: number;
duration: number;
constructor(obj?: any) {
this.reportName = obj && obj.reportName || null;
this.processDefinitionId = obj && obj.processDefinitionId || null;
this.status = obj && obj.status || null;
this.taskName = obj && obj.taskName || null;
this.dateRangeInterval = obj && obj.dateRangeInterval || null;
this.typeFiltering = obj && (typeof obj.typeFiltering !== 'undefined') ? obj.typeFiltering : true;
this.slowProcessInstanceInteger = obj && obj.slowProcessInstanceInteger || 0;
this.duration = obj && obj.duration || 0;
this.dateRange = new ReportDateRange(obj);
}
}

View File

@ -21,6 +21,27 @@ export * from './components/diagram.component';
export * from './services/diagram-color.service';
export * from './services/diagrams.service';
export * from './models/diagram.model';
export * from './models/chart.model';
export * from './models/report.model';
export * from './models/diagram/diagram.model';
export * from './models/diagram/diagramElement.model';
export * from './models/diagram/diagramElementProperty.model';
export * from './models/diagram/diagramEventDefinition.model';
export * from './models/diagram/diagramFlowElement.model';
export * from './models/diagram/diagramLaneElement.model';
export * from './models/diagram/diagramPoolElement.model';
export * from './models/diagram/diagramWayPoint.model';
export * from './models/chart/barChart.model';
export * from './models/chart/chart.model';
export * from './models/chart/detailsTableChart.model';
export * from './models/chart/heatMapChart.model';
export * from './models/chart/lineChart.model';
export * from './models/chart/multiBarChart.model';
export * from './models/chart/pieChart.model';
export * from './models/chart/tableChart.model';
export * from './models/report/parameterValue.model';
export * from './models/report/reportDateRange.model';
export * from './models/report/reportDefinition.model';
export * from './models/report/reportParameterDetails.model';
export * from './models/report/reportParameters.model';
export * from './models/report/reportQuery.model';

View File

@ -16,9 +16,7 @@
*/
export * from './insights.module';
export * from './diagram/diagram.module';
//
export * from './analytics-process/analytics-process.module';
export * from './diagram';
//
export * from './analytics-process';

View File

@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-insights",
"description": "Alfresco ADF insights",
"version": "2.0.0",
"version": "2.0.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-insights.js",
"repository": {

View File

@ -14,8 +14,10 @@ eval EXEC_SLEEP=false
eval SLEEP_TIME="0"
eval EXEC_VERSION_JSAPI=false
eval JSAPI_VERSION=""
eval EXEC_BUILD=true
eval projects=( "core"
eval projects=(
"core"
"insights"
"content-services"
"process-services" )
@ -29,6 +31,7 @@ show_help() {
echo "-r or --registry to publish in an alternative npm registry -registry 'http://npm.local.me:8080/' "
echo "-token auth token for publish in the npm registry"
echo "-t or --tag to add a tag when publish a package"
echo "-sb skip build"
echo "--sleep add a sleep before any publish"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
echo "-vjsapi <commit-ish> Install different version from npm of JS-API defined in the package.json"
@ -48,6 +51,10 @@ set_sleep(){
EXEC_SLEEP=true
}
skip_build(){
EXEC_BUILD=false
}
get_token_registry(){
TOKEN_REGISTRY=$1
@ -109,6 +116,7 @@ while [[ $1 == -* ]]; do
-f|--force) enable_force; shift;;
-token) get_token_registry $2; shift 2;;
--sleep) set_sleep $2; shift 2;;
-sb) skip_build; shift;;
-r|--registry) enable_change_registry $2; shift 2;;
-gitjsapi) enable_js_api_git_link $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;;
@ -116,10 +124,12 @@ while [[ $1 == -* ]]; do
esac
done
if $EXEC_BUILD == true; then
echo "====== INSTALL AND CLEAN ${PACKAGE} ===== "
npm install rimraf
npm run clean
npm install
fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
@ -134,8 +144,10 @@ if $EXEC_VERSION_JSAPI == true; then
npm install alfresco-js-api@${JSAPI_VERSION} --no-save
fi
if $EXEC_BUILD == true; then
echo "====== Build ADF ===== "
npm run new-build
fi
for PACKAGE in ${projects[@]}
do