feat: add create report page (#592)

Fixes: #233
This commit is contained in:
Karan Takalkar
2020-05-30 21:55:12 +05:30
committed by GitHub
parent 8c9bb25fd8
commit ca9404213c
25 changed files with 983 additions and 3 deletions
@@ -0,0 +1,16 @@
/** Chart Data Model */
export class ChartData {
keysLabel: string;
valuesLabel: string;
keys: string[];
values: number[];
constructor(response: any) {
this.keysLabel = response.columnHeaders[0].columnName;
this.valuesLabel = response.columnHeaders[1].columnName;
this.keys = response.data.map((object: any) => object.row[0]);
this.values = response.data.map((object: any) => object.row[1]);
}
}
@@ -0,0 +1,31 @@
/** Report Parameter Model */
export class ReportParameter {
name: string;
variable: string;
label: string;
displayType: string;
formatType: string;
defaultVal: any;
selectOne: any;
selectAll: any;
parentParameterName: string;
inputName: string;
selectOptions: any[] = [];
childParameter: any;
pentahoName: any;
constructor(options: any[]) {
this.name = options[0];
this.variable = options[1];
this.label = options[2];
this.displayType = options[3];
this.formatType = options[4];
this.defaultVal = options[5];
this.selectOne = options[6];
this.selectAll = options[7];
this.parentParameterName = options[8];
this.inputName = `R_${options[1]}`;
}
}
@@ -0,0 +1,11 @@
/** Select Option model */
export class SelectOption {
id: number;
name: string;
constructor(options: any[]) {
this.id = options[0],
this.name = options[1];
}
}