Skip to content

Commit

Permalink
4675 task ux home page projects table stats column (#4727)
Browse files Browse the repository at this point in the history
Co-authored-by: Brittany Kondo <[email protected]>
  • Loading branch information
brittanykondo and Brittany Kondo authored Sep 10, 2024
1 parent dde5721 commit 68d0028
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,34 @@
{{ data.userName ?? '--' }}
</template>
<div v-else-if="col.field === 'stats'" class="stats">
<span class="mr-1"><i class="pi pi-user mr-1" /> {{ data.metadata?.['contributor-count'] }}</span>
<span class="mr-1"><i class="pi pi-file mr-1" /> {{ data.metadata?.['document-count'] }}</span>
<span class="mr-1">
<span
class="mr-1"
v-tooltip.top="formatStatTooltip(formatStat(data.metadata, 'contributor-count'), 'contributor')"
>
<i class="pi pi-user mr-1" />
{{ formatStat(data.metadata, 'contributor-count') }}
</span>
<span class="mr-1" v-tooltip.top="formatStatTooltip(formatStat(data.metadata, 'document-count'), 'paper')">
<i class="pi pi-file mr-1" />
{{ formatStat(data.metadata, 'document-count') }}
</span>
<span class="mr-1" v-tooltip.top="formatStatTooltip(formatStat(data.metadata, 'datasets-count'), 'dataset')">
<dataset-icon fill="var(--text-color-secondary)" class="mr-1" />
{{ data.metadata?.['datasets-count'] }}
{{ formatStat(data.metadata, 'datasets-count') }}
</span>
<span v-tooltip.top="formatStatTooltip(formatStat(data.metadata, 'models-count'), 'model')">
<i class="pi pi-share-alt mr-1" />
{{ formatStat(data.metadata, 'models-count') }}
</span>
<span v-tooltip.top="formatStatTooltip(formatStat(data.metadata, 'workflows-count'), 'workflow')">
<vue-feather
class="p-button-icon-left"
type="git-merge"
size="1.25rem"
stroke="var(--text-color-secondary)"
/>
{{ formatStat(data.metadata, 'workflows-count') }}
</span>
<span><i class="pi pi-share-alt mr-1" /> {{ data.metadata?.['models-count'] }}</span>
</div>
<template v-else-if="col.field === 'createdOn'">
{{ data.createdOn ? formatDdMmmYyyy(data.createdOn) : '--' }}
Expand Down Expand Up @@ -59,6 +80,15 @@ defineProps<{
const emit = defineEmits(['open-project']);
function formatStat(data, key) {
const stat = data?.[key];
return key === 'contributor-count' ? parseInt(stat ?? '1', 10) : parseInt(stat ?? '0', 10);
}
function formatStatTooltip(stat, displayName) {
return `${stat} ${displayName}${stat === 1 ? '' : 's'}`;
}
function getColumnWidth(columnField: string) {
switch (columnField) {
case 'description':
Expand Down
7 changes: 2 additions & 5 deletions testing/manual/transform-dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Report any issues into GitHub: [open an issue](https://github.com/DARPA-ASKEM/t
email: [email protected]
password: askem-quality-assurance
```
2. Create, or open, project named `QA <Your Name>`
### 2. Upload Datasets
Expand All @@ -21,12 +21,9 @@ Report any issues into GitHub: [open an issue](https://github.com/DARPA-ASKEM/t
2. Connect the two datasets to a transform data set operator.
3. Ask the agent the two datasets on date.
4. Add a code cell to view the newly joined dataset
``
`merged_df`
5. Filter for LA county for January 2021 to March 2021.
6. Ask the agent to add a new column named timestamp.
7. Save as a new dataset named 'LA_cases_deaths_data'
8. Ask the operator to plot for cases and deaths.
9. Copy the plot into the overview page.
10. Add the dataset to the workflow canvas and preview the dataset. Ensure that it has saved correctly.
10. Add the dataset to the workflow canvas and preview the dataset. Ensure that it has saved correctly.

0 comments on commit 68d0028

Please sign in to comment.