Skip to content

Commit

Permalink
Prettier fix to merge to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea committed Jul 11, 2024
1 parent 65008ad commit f2b92a4
Showing 4 changed files with 82 additions and 78 deletions.
109 changes: 54 additions & 55 deletions components/Communities/CommunityToolsTable.vue
Original file line number Diff line number Diff line change
@@ -1,64 +1,63 @@
<template>
<div>
<v-data-table
dense
:headers="headers"
:items="tools"
:items-per-page="15"
:search="search"
item-key="_id"
:loading="$store.state.community.loading.tools"
>
<template #top>
<v-text-field
v-model="search"
label="Search"
class="mx-4"
></v-text-field>
</template>
<!-- eslint-disable -->
<template #item.name="{ item }">
<!-- eslint-enable -->
<nuxt-link
:to="
`/tool/` +
(item.registry_tool_id ? item.registry_tool_id.split(':')[1] : '')
"
append
target="_blank"
class="inline-icon"
>
{{ item.name }}
<v-icon x-small class="icon-spacing">mdi-open-in-new</v-icon>
</nuxt-link>
</template>
</v-data-table>
<v-data-table
dense
:headers="headers"
:items="tools"
:items-per-page="15"
:search="search"
item-key="_id"
:loading="$store.state.community.loading.tools"
>
<template #top>
<v-text-field
v-model="search"
label="Search"
class="mx-4"
></v-text-field>
</template>
<!-- eslint-disable -->
<template #item.name="{ item }">
<!-- eslint-enable -->
<nuxt-link
:to="
`/tool/` +
(item.registry_tool_id ? item.registry_tool_id.split(':')[1] : '')
"
append
target="_blank"
class="inline-icon"
>
{{ item.name }}
<v-icon x-small class="icon-spacing">mdi-open-in-new</v-icon>
</nuxt-link>
</template>
</v-data-table>
</div>
</template>
</template>

<script>
export default {
<script>
export default {
components: {},
props: {
tools: { type: Array, required: true },
tools: { type: Array, required: true },
},
data() {
return {
search: '',
headers: [
{
text: 'Name',
align: 'start',
value: 'name',
},
{ text: 'Status', value: 'status' },
{ text: 'Description', value: 'description' },
],
};
return {
search: '',
headers: [
{
text: 'Name',
align: 'start',
value: 'name',
},
{ text: 'Status', value: 'status' },
{ text: 'Description', value: 'description' },
],
};
},
};
</script>

};
</script>

<script>
export default {
@@ -85,11 +84,11 @@ export default {

<style scoped>
.inline-icon {
display: inline-flex;
align-items: center;
display: inline-flex;
align-items: center;
}
.icon-spacing {
margin-left: 5px;
margin-left: 5px;
}
</style>
37 changes: 17 additions & 20 deletions components/Widgets/LoaderChartWidgets.vue
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ export default {
y_axis: yAxis,
optimization,
};
} else if(type === 'box-plot') {
} else if (type === 'box-plot') {
// Process visualization data for ScatterPlot
const visualization = data.datalink.inline_data.visualization;
const optimization = visualization.optimization
@@ -129,28 +129,25 @@ export default {
this.preparedData.inline_data.visualization = {
type: visualization.type,
y_axis: visualization.yAxis??null,
y_axis: visualization.yAxis ?? null,
optimization,
};
data.graphData.forEach(
(participant) => {
const preparedParticipant = {
name: participant.name,
metric_id: participant.metric_id,
q1: participant.q1,
mean: participant.mean,
median: participant.median,
q3: participant.q3,
lowerfence: participant.lowerfence,
upperfence: participant.upperfence
};
this.preparedData.inline_data.challenge_participants.push(
preparedParticipant
);
}
);
data.graphData.forEach((participant) => {
const preparedParticipant = {
name: participant.name,
metric_id: participant.metric_id,
q1: participant.q1,
mean: participant.mean,
median: participant.median,
q3: participant.q3,
lowerfence: participant.lowerfence,
upperfence: participant.upperfence,
};
this.preparedData.inline_data.challenge_participants.push(
preparedParticipant
);
});
} else {
return null;
}
2 changes: 1 addition & 1 deletion pages/benchmarking/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container >
<v-container>
<v-container>
<h1 class="text-h4 mt-13 mb-5 hidden-md-and-up">
Benchmarking Communities
12 changes: 10 additions & 2 deletions store/challenge.js
Original file line number Diff line number Diff line change
@@ -199,10 +199,18 @@ export default {
const id = dataset._id;
// TODO remove if statement, once more visualizations are consuming the widget endpoint
const response =
(dataset.datalink.inline_data.visualization.type === 'bar-plot' || dataset.datalink.inline_data.visualization.type === 'box-plot')
dataset.datalink.inline_data.visualization.type === 'bar-plot' ||
dataset.datalink.inline_data.visualization.type === 'box-plot'
? await this.$graphql
.$get(
`/widget/${dataset.datalink.inline_data.visualization.type}/${dataset._id}${(dataset.datalink.inline_data.visualization.type === 'box-plot')?'?log2=true':''}`
`/widget/${dataset.datalink.inline_data.visualization.type}/${
dataset._id
}${
dataset.datalink.inline_data.visualization.type ===
'box-plot'
? '?log2=true'
: ''
}`
)
.catch(() => {
return [];

0 comments on commit f2b92a4

Please sign in to comment.