Skip to content

Commit

Permalink
Merge pull request #244 from SmartAPI/redesign-revisions
Browse files Browse the repository at this point in the history
Revisions
  • Loading branch information
marcodarko authored May 22, 2024
2 parents 1cc38ef + 1145151 commit c27df4d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion web-app/src/store/modules/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const about = {
{
name: 'Chunlei',
lastname: 'Wu',
title: 'Associate Professor',
title: 'Professor',
work_logo: scripps_img,
work_website: 'https://www.scripps.edu/',
bio: "Chunlei Wu is an Associate Professor in the Department of Integrative Structure and Computational Biology at Scripps Research. Prior to joining Scripps in July 2011, he was the Research Investigator II at the Genomics Institute of the Novartis Research Foundation (GNF) in San Diego, CA. More details about Chunlei's lab are available at https://wulab.io.",
Expand Down
10 changes: 7 additions & 3 deletions web-app/src/store/modules/metakg.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ export const metakg = {
// `</span> ➡️ <span class="orange-text">`+output+
// `</span></div>`

// remove apis with the same id for a a given edge
let apis = [...new Map(op['api'].map(item => [item['smartapi']['id'], item])).values()];

let edge = {
...op,
group: 'edges',
Expand All @@ -456,9 +459,10 @@ export const metakg = {
target: output,
// smartapi_id: id,
// component: op['api'][0]['x-translator']['component'],
label: op['api'].length,
weight: op['api'].length / 2 < 1 ? 1 : op['api'].length / 2,
apis: op['api']
label: apis.length,
weight: apis.length / 2 < 1 ? 1 : apis.length / 2,
// apis: op['api'],
apis: apis
}
};
// edge hover tip
Expand Down
41 changes: 22 additions & 19 deletions web-app/src/views/UI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,28 @@
</div>
</teleport>
<template v-if="data.ready">
<div class="p-1" style="position: absolute; top: 140px; right: 20px; clear: left">
<span
v-if="data?.api?.info?.['x-trapi']?.version"
class="versionBadge pink lighten-2"
v-text="'TRAPI ' + data?.api?.info?.['x-trapi']?.version"
>
</span>
<span
v-if="data?.api?.info?.['x-translator']?.component"
class="versionBadge indigo darken-2"
>Translator: {{ data?.api?.info?.['x-translator']?.component }}</span
>
<span
v-if="data?.api?.tags && data?.api?.tags.some((item) => item?.name == 'biothings')"
class="versionBadge grey darken-2"
>
BioThings API
</span>
</div>
<teleport to=".info">
<div style="margin-top: 30px;">
<span
v-if="data?.api?.info?.['x-trapi']?.version"
style="margin-left: 0px;"
class="versionBadge pink lighten-2"
v-text="'TRAPI ' + data?.api?.info?.['x-trapi']?.version"
>
</span>
<span
v-if="data?.api?.info?.['x-translator']?.component"
class="versionBadge indigo darken-2"
>Translator: {{ data?.api?.info?.['x-translator']?.component }}</span
>
<span
v-if="data?.api?.tags && data?.api?.tags.some((item) => item?.name == 'biothings')"
class="versionBadge grey darken-2"
>
BioThings API
</span>
</div>
</teleport>
</template>
<div class="grey lighten-5 z-depth-3" id="swagger-ui" style="overflow: hidden"></div>
</main>
Expand Down

0 comments on commit c27df4d

Please sign in to comment.