Skip to content

Commit

Permalink
Merge pull request #166 from OHDSI/network_performance_changes
Browse files Browse the repository at this point in the history
Network performance report: default settings and minor changes
  • Loading branch information
fdefalco authored Aug 15, 2022
2 parents 1c42be9 + 69d7c55 commit be83107
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 12 deletions.
29 changes: 26 additions & 3 deletions src/interface/components/Pivot/Pivot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
class="pa-3"
label="Aggregate attribute"
:menu-props="{ bottom: true, offsetY: true }"
:items="getDisplayedAttributes"
:items="getAggregateValues"
></v-select>
</div>
</v-card>
Expand Down Expand Up @@ -212,9 +212,13 @@ export default {
VuePivottable,
draggable,
},
props: {
data: { type: Array, required: true, default: () => [] },
attributes: { type: Array, required: false, default: () => [] },
aggregators: { type: Array, required: false, default: () => [] },
aggregateAttrs: { type: Array, required: false, default: () => [] },
defaults: { type: Object, required: false, default: () => {} },
eventListener: { type: Function, required: false, default: function () {} },
},
data() {
Expand All @@ -223,8 +227,7 @@ export default {
selectedFilterAttributes: [],
selectedCols: [],
selectedFilterValues: {},
aggregators: ["Count", "Sum"],
aggregateFunction: "Count",
aggregateFunction: "",
aggregateValue: [""],
};
},
Expand All @@ -241,11 +244,31 @@ export default {
{}
);
},
getAggregateValues: function () {
if (this.aggregateAttrs.length) {
return this.aggregateAttrs;
} else {
return this.getDisplayedAttributes;
}
},
getDisplayedAttributes: function () {
return this.attributes;
},
},
created() {
this.load();
},
methods: {
load: function () {
this.selectedRows = this.defaults?.rows ? this.defaults.rows : [];
this.selectedCols = this.defaults?.columns ? this.defaults.columns : [];
this.aggregateFunction = this.defaults?.aggregateFunction
? this.defaults?.aggregateFunction
: this.aggregators[0];
this.aggregateValue = this.defaults?.aggregateValue
? this.defaults?.aggregateValue
: [this.getAggregateValues[0]];
},
removeRows(i) {
this.$delete(this.selectedRows, i);
},
Expand Down
22 changes: 13 additions & 9 deletions src/interface/views/network/NetworkPerformance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<v-card>
<Pivot
:data="getData['networkPerformance']"
:attributes="[
'TASK',
'TIMING',
'PACKAGE',
'CATEGORY',
'SOURCE',
'RELEASE',
]"
:attributes="['TASK', 'PACKAGE', 'CATEGORY', 'SOURCE']"
:defaults="{
rows: ['SOURCE'],
columns: ['PACKAGE'],
}"
:aggregators="['Sum']"
:aggregate-attrs="['TIMING']"
/>
</v-card>
</v-container>
Expand All @@ -29,4 +28,9 @@ export default {
};
</script>

<style scoped></style>
<style scoped>
>>> table.pvtTable tbody tr td {
text-decoration: none;
cursor: default;
}
</style>
1 change: 1 addition & 0 deletions src/interface/views/release/DataQualityResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
'CDM_TABLE_NAME',
'FAILED',
]"
:aggregators="['Count']"
>
</Pivot>
</v-container>
Expand Down

0 comments on commit be83107

Please sign in to comment.