Commit 34508601 authored by David Mendez's avatar David Mendez
Browse files

Merge branch 'staging' into 'master'

ChEMBL 29

See merge request !14
parents 78e64038 b0aa8806
......@@ -88,3 +88,5 @@ sw.*
# Vim swap files
*.swp
deleteme.json
\ No newline at end of file
......@@ -2,12 +2,18 @@
//
// The variables you want to modify
// $font-size-root: 20px;
@import '~vuetify/src/styles/styles.sass';
$chembl-teal: '#09979b';
$teal-accent: '#00bfa5';
$lighter-teal: '#62b7bd';
$chembl-delete: #B71C1C; //red darken-4
$chembl-add: #43A047; //red darken-4
$chembl-teal-color: #09979b;
$chembl-filter-histogram-text: map-get($teal, darken-2);
@font-face {
font-family: "ChEMBL_Verdana";
src: local(Verdana), url("https://www.ebi.ac.uk/chembl/k8s/static/chembl/font/verdana/Verdana.eot");
......
<template>
<div>
<resize-observer v-if="isEmbedded" @notify="handleResize" />
<v-container v-if="!initialStateLoaded">
<v-skeleton-loader type="article, image"></v-skeleton-loader>
</v-container>
......@@ -61,6 +62,8 @@
<script>
import { mapState } from 'vuex'
import { resizeMessagesMixin } from '~/mixins/embedding/resizeMessages.js'
import { embeddingStateMixin } from '~/mixins/embedding/embeddingState.js'
import ProcessDetails from '~/components/advanced_search/search_by_ids/status/ProcessDetails.vue'
import TextToClipboard from '~/web-components-submodule/components/common/TextToClipboard.vue'
export default {
......@@ -68,6 +71,7 @@ export default {
ProcessDetails,
TextToClipboard,
},
mixins: [resizeMessagesMixin, embeddingStateMixin],
computed: mapState({
initialStateLoaded: (state) =>
state.advanced_search.search_by_ids.search_state.initialStateLoaded,
......
......@@ -16,12 +16,20 @@
<div v-if="entityExists">
<p>
<b>ChEMBL ID:</b>
<span v-if="linkToEntity == null">{{ chemblID }}</span>
<ChEMBLLink :href="linkToEntity" :text="chemblID" />
<ChEMBLLink v-if="isActive" :href="linkToEntity" :text="chemblID" />
<span v-else>{{ chemblID }}</span>
</p>
<p><b>ID Status:</b> {{ idStatus }}</p>
<p><b>ID Status Description:</b> {{ idStatusDescription }}</p>
<p><b>Entity Type:</b> {{ entityType }}</p>
<p v-if="!isActive">
<b>Last Active:</b>
<ChEMBLLink :href="releaseDOIsLink" :text="lastReleaseActive" />
</p>
<p v-if="isActive">
<b>Resource API URL:</b>
<ChEMBLLink :href="apiURL" :text="apiURL" />
</p>
</div>
</div>
</v-card-text>
......@@ -45,6 +53,12 @@ export default {
default: () => undefined,
},
},
data() {
return {
releaseDOIsLink:
'https://chembl.gitbook.io/chembl-interface-documentation/downloads#chembl-database-release-dois',
}
},
computed: mapState({
dataLoaded: (state) => state.entity_lookup.single_entity_lookup.dataLoaded,
entityExists: (state) =>
......@@ -55,6 +69,18 @@ export default {
entityType: (state) => state.entity_lookup.single_entity_lookup.entityType,
linkToEntity: (state) =>
state.entity_lookup.single_entity_lookup.linkToEntity,
isActive: (state) => state.entity_lookup.single_entity_lookup.isActive,
lastReleaseActive(state) {
const lastActiveIsKnown =
state.entity_lookup.single_entity_lookup.lastActiveIsKnown
const lastReleaseActive =
state.entity_lookup.single_entity_lookup.lastReleaseActive
const text = lastActiveIsKnown
? `ChEMBL ${lastReleaseActive}`
: `Before ChEMBL 8`
return text
},
apiURL: (state) => state.entity_lookup.single_entity_lookup.apiURL,
}),
mounted() {
this.$store.dispatch(
......
......@@ -5,6 +5,7 @@
<ChEMBLDataTable
:dataset-state="datasetState"
:store-module-name="storeModuleName"
:in-report-card="true"
/>
</v-col>
</v-row>
......@@ -16,6 +17,7 @@ import { embeddingStateMixin } from '~/mixins/embedding/embeddingState.js'
import { datasetMixin } from '~/web-components-submodule/mixins/datasets/datasetMixin.js'
import ChEMBLDataTable from '~/web-components-submodule/components/common/dataSets/data_table/ChEMBLDataTable.vue'
import DrugWarningInfo from '~/web-components-submodule/store/datasets/generators/compound/DrugWarningInfo.js'
import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js'
export default {
components: {
......@@ -37,6 +39,7 @@ export default {
propertiesGroups: {
1: { id: 'report_card_table', selected: true, allHeaders: [] },
},
entityID: EntityNames.DrugWarning.entityID,
customDataRepresentationParams: {
possiblePageSizes: [5, 10],
itemsPerPage: 5,
......
......@@ -39,6 +39,11 @@ spec:
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
readinessProbe:
httpGet:
path: '/chembl/web_components/'
port: 3000
successThreshold: 10
volumes:
- name: run-config
secret:
......
......@@ -21,4 +21,8 @@ export default {
}
</script>
<style></style>
<style>
html {
overflow: hidden;
}
</style>
import { mapState } from 'vuex'
export const embeddingStateMixin = {
props: {
idForParent: {
type: String,
default: () => undefined,
},
},
computed: mapState({
isEmbedded: (state) => state.embedding.isEmbedded,
}),
......
......@@ -11,8 +11,6 @@ export const resizeMessagesMixin = {
idForParent: this.idForParent,
...resizeData,
}
console.log('handle resize!')
console.log('msgData: ', msgData)
window.parent.postMessage(
{ msg: 'EMBEDDED_VUE_RESIZED', data: msgData },
process.env.iframeTargetOrigin
......
......@@ -54,6 +54,19 @@ export default {
.DJ_JOB_STATUS_CHECK_INTERVAL_MILLIS
? parseInt(process.env.DJ_JOB_STATUS_CHECK_INTERVAL_MILLIS)
: 2000,
entityJoinDestinationTemplate:
process.env.ENTITY_JOIN_DESTINATION_TEMPLATE ||
'wwwdev.ebi.ac.uk/chembl/g/#browse/<BROWSER_NAME>/full_state/<GENERATED_STATE>',
tinyUrlTemplate:
process.env.TINY_URL_TEMPLATE ||
'https://wwwdev.ebi.ac.uk/chembl/g/tiny/<TINY_HASH>',
entityBrowserStateUrlTemplate:
process.env.ENTITY_BROWSER_STATE_URL_TEMPLATE ||
'https://wwwdev.ebi.ac.uk/chembl/g/#browse/<BROWSER_NAME>/full_state/<GENERATED_STATE>',
hastagUrlsBase:
process.env.HASHTAG_URLS_BASE || 'https://wwwdev.ebi.ac.uk/chembl/g/',
wsLookupBaseUrl:
process.env.WS_LOOKUP_BASE_URL || 'https://wwwdev.ebi.ac.uk',
},
/*
** Headers of the page
......
......@@ -6180,6 +6180,276 @@
"resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz",
"integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk="
},
"d3": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/d3/-/d3-6.7.0.tgz",
"integrity": "sha512-hNHRhe+yCDLUG6Q2LwvR/WdNFPOJQ5VWqsJcwIYVeI401+d2/rrCjxSXkiAdIlpx7/73eApFB4Olsmh3YN7a6g==",
"requires": {
"d3-array": "2",
"d3-axis": "2",
"d3-brush": "2",
"d3-chord": "2",
"d3-color": "2",
"d3-contour": "2",
"d3-delaunay": "5",
"d3-dispatch": "2",
"d3-drag": "2",
"d3-dsv": "2",
"d3-ease": "2",
"d3-fetch": "2",
"d3-force": "2",
"d3-format": "2",
"d3-geo": "2",
"d3-hierarchy": "2",
"d3-interpolate": "2",
"d3-path": "2",
"d3-polygon": "2",
"d3-quadtree": "2",
"d3-random": "2",
"d3-scale": "3",
"d3-scale-chromatic": "2",
"d3-selection": "2",
"d3-shape": "2",
"d3-time": "2",
"d3-time-format": "3",
"d3-timer": "2",
"d3-transition": "2",
"d3-zoom": "2"
}
},
"d3-array": {
"version": "2.12.1",
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",
"integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",
"requires": {
"internmap": "^1.0.0"
}
},
"d3-axis": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-2.1.0.tgz",
"integrity": "sha512-z/G2TQMyuf0X3qP+Mh+2PimoJD41VOCjViJzT0BHeL/+JQAofkiWZbWxlwFGb1N8EN+Cl/CW+MUKbVzr1689Cw=="
},
"d3-brush": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-2.1.0.tgz",
"integrity": "sha512-cHLLAFatBATyIKqZOkk/mDHUbzne2B3ZwxkzMHvFTCZCmLaXDpZRihQSn8UNXTkGD/3lb/W2sQz0etAftmHMJQ==",
"requires": {
"d3-dispatch": "1 - 2",
"d3-drag": "2",
"d3-interpolate": "1 - 2",
"d3-selection": "2",
"d3-transition": "2"
}
},
"d3-chord": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-2.0.0.tgz",
"integrity": "sha512-D5PZb7EDsRNdGU4SsjQyKhja8Zgu+SHZfUSO5Ls8Wsn+jsAKUUGkcshLxMg9HDFxG3KqavGWaWkJ8EpU8ojuig==",
"requires": {
"d3-path": "1 - 2"
}
},
"d3-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz",
"integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ=="
},
"d3-contour": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-2.0.0.tgz",
"integrity": "sha512-9unAtvIaNk06UwqBmvsdHX7CZ+NPDZnn8TtNH1myW93pWJkhsV25JcgnYAu0Ck5Veb1DHiCv++Ic5uvJ+h50JA==",
"requires": {
"d3-array": "2"
}
},
"d3-delaunay": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz",
"integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==",
"requires": {
"delaunator": "4"
}
},
"d3-dispatch": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz",
"integrity": "sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA=="
},
"d3-drag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-2.0.0.tgz",
"integrity": "sha512-g9y9WbMnF5uqB9qKqwIIa/921RYWzlUDv9Jl1/yONQwxbOfszAWTCm8u7HOTgJgRDXiRZN56cHT9pd24dmXs8w==",
"requires": {
"d3-dispatch": "1 - 2",
"d3-selection": "2"
}
},
"d3-dsv": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz",
"integrity": "sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==",
"requires": {
"commander": "2",
"iconv-lite": "0.4",
"rw": "1"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
}
}
},
"d3-ease": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-2.0.0.tgz",
"integrity": "sha512-68/n9JWarxXkOWMshcT5IcjbB+agblQUaIsbnXmrzejn2O82n3p2A9R2zEB9HIEFWKFwPAEDDN8gR0VdSAyyAQ=="
},
"d3-fetch": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-2.0.0.tgz",
"integrity": "sha512-TkYv/hjXgCryBeNKiclrwqZH7Nb+GaOwo3Neg24ZVWA3MKB+Rd+BY84Nh6tmNEMcjUik1CSUWjXYndmeO6F7sw==",
"requires": {
"d3-dsv": "1 - 2"
}
},
"d3-force": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz",
"integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==",
"requires": {
"d3-dispatch": "1 - 2",
"d3-quadtree": "1 - 2",
"d3-timer": "1 - 2"
}
},
"d3-format": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-2.0.0.tgz",
"integrity": "sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA=="
},
"d3-geo": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-2.0.1.tgz",
"integrity": "sha512-M6yzGbFRfxzNrVhxDJXzJqSLQ90q1cCyb3EWFZ1LF4eWOBYxFypw7I/NFVBNXKNqxv1bqLathhYvdJ6DC+th3A==",
"requires": {
"d3-array": ">=2.5"
}
},
"d3-hierarchy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-2.0.0.tgz",
"integrity": "sha512-SwIdqM3HxQX2214EG9GTjgmCc/mbSx4mQBn+DuEETubhOw6/U3fmnji4uCVrmzOydMHSO1nZle5gh6HB/wdOzw=="
},
"d3-interpolate": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz",
"integrity": "sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==",
"requires": {
"d3-color": "1 - 2"
}
},
"d3-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz",
"integrity": "sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA=="
},
"d3-polygon": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-2.0.0.tgz",
"integrity": "sha512-MsexrCK38cTGermELs0cO1d79DcTsQRN7IWMJKczD/2kBjzNXxLUWP33qRF6VDpiLV/4EI4r6Gs0DAWQkE8pSQ=="
},
"d3-quadtree": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz",
"integrity": "sha512-b0Ed2t1UUalJpc3qXzKi+cPGxeXRr4KU9YSlocN74aTzp6R/Ud43t79yLLqxHRWZfsvWXmbDWPpoENK1K539xw=="
},
"d3-random": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/d3-random/-/d3-random-2.2.2.tgz",
"integrity": "sha512-0D9P8TRj6qDAtHhRQn6EfdOtHMfsUWanl3yb/84C4DqpZ+VsgfI5iTVRNRbELCfNvRfpMr8OrqqUTQ6ANGCijw=="
},
"d3-scale": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.3.0.tgz",
"integrity": "sha512-1JGp44NQCt5d1g+Yy+GeOnZP7xHo0ii8zsQp6PGzd+C1/dl0KGsp9A7Mxwp+1D1o4unbTTxVdU/ZOIEBoeZPbQ==",
"requires": {
"d3-array": "^2.3.0",
"d3-format": "1 - 2",
"d3-interpolate": "1.2.0 - 2",
"d3-time": "^2.1.1",
"d3-time-format": "2 - 3"
}
},
"d3-scale-chromatic": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz",
"integrity": "sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA==",
"requires": {
"d3-color": "1 - 2",
"d3-interpolate": "1 - 2"
}
},
"d3-selection": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-2.0.0.tgz",
"integrity": "sha512-XoGGqhLUN/W14NmaqcO/bb1nqjDAw5WtSYb2X8wiuQWvSZUsUVYsOSkOybUrNvcBjaywBdYPy03eXHMXjk9nZA=="
},
"d3-shape": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-2.1.0.tgz",
"integrity": "sha512-PnjUqfM2PpskbSLTJvAzp2Wv4CZsnAgTfcVRTwW03QR3MkXF8Uo7B1y/lWkAsmbKwuecto++4NlsYcvYpXpTHA==",
"requires": {
"d3-path": "1 - 2"
}
},
"d3-time": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.1.1.tgz",
"integrity": "sha512-/eIQe/eR4kCQwq7yxi7z4c6qEXf2IYGcjoWB5OOQy4Tq9Uv39/947qlDcN2TLkiTzQWzvnsuYPB9TrWaNfipKQ==",
"requires": {
"d3-array": "2"
}
},
"d3-time-format": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz",
"integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==",
"requires": {
"d3-time": "1 - 2"
}
},
"d3-timer": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz",
"integrity": "sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA=="
},
"d3-transition": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-2.0.0.tgz",
"integrity": "sha512-42ltAGgJesfQE3u9LuuBHNbGrI/AJjNL2OAUdclE70UE6Vy239GCBEYD38uBPoLeNsOhFStGpPI0BAOV+HMxog==",
"requires": {
"d3-color": "1 - 2",
"d3-dispatch": "1 - 2",
"d3-ease": "1 - 2",
"d3-interpolate": "1 - 2",
"d3-timer": "1 - 2"
}
},
"d3-zoom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-2.0.0.tgz",
"integrity": "sha512-fFg7aoaEm9/jf+qfstak0IYpnesZLiMX6GZvXtUSdv8RH2o4E2qeelgdU09eKS6wGuiGMfcnMI0nTIqWzRHGpw==",
"requires": {
"d3-dispatch": "1 - 2",
"d3-drag": "2",
"d3-interpolate": "1 - 2",
"d3-selection": "2",
"d3-transition": "2"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
......@@ -6315,6 +6585,11 @@
"resolved": "https://registry.npmjs.org/defu/-/defu-3.2.2.tgz",
"integrity": "sha512-8UWj5lNv7HD+kB0e9w77Z7TdQlbUYDVWqITLHNqFIn6khrNHv5WQo38Dcm1f6HeNyZf0U7UbPf6WeZDSdCzGDQ=="
},
"delaunator": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz",
"integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag=="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
......@@ -8980,6 +9255,11 @@
"through": "^2.3.6"
}
},
"internmap": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
"integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="
},
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
......@@ -13324,6 +13604,11 @@
"aproba": "^1.1.1"
}
},
"rw": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
"integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q="
},
"rxjs": {
"version": "6.6.6",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.6.tgz",
......
......@@ -5,7 +5,7 @@
"scripts": {
"dev": "HOST=0.0.0.0 nuxt",
"build": "nuxt build",
"start": "nuxt start",
"start": "HOST=0.0.0.0 nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "npm run lint:js",
......@@ -14,6 +14,7 @@
"dependencies": {
"axios": "^0.21.1",
"copy-to-clipboard": "^3.3.1",
"d3": "^6.7.0",
"dotenv": "^8.2.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
......
<template>
<div><SearchByIDsStatus /></div>
<div><SearchByIDsStatus id-for-parent="SearchByIDsStatus" /></div>
</template>
<script>
......
......@@ -10,6 +10,10 @@ export const state = () => ({
idStatusDescription: undefined,
entityType: undefined,
linkToEntity: undefined,
isActive: false,
lastActiveIsKnown: false,
lastReleaseActive: undefined,
apiURL: undefined,
})
const methods = {
......@@ -54,6 +58,18 @@ export const mutations = {
SET_LINK_TO_ENTITY(state, linkToEntity) {
state.linkToEntity = linkToEntity
},
SET_IS_ACTIVE(state, isActive) {
state.isActive = isActive
},
SET_LAST_ACTIVE_IS_KNOWN(state, lastActiveIsKnown) {
state.lastActiveIsKnown = lastActiveIsKnown
},
SET_LAST_RELEASE_ACTIVE(state, lastReleaseActive) {
state.lastReleaseActive = lastReleaseActive
},
SET_API_URL(state, apiURL) {
state.apiURL = apiURL
},
}
export const actions = {
......@@ -73,6 +89,12 @@ export const actions = {
commit('SET_ID_STATUS_DESCRIPTION', idStatusDescription)
const entityType = entityData.entity_type
commit('SET_ENTITY_TYPE', entityType)
const lastActive = entityData.last_active
commit('SET_LAST_RELEASE_ACTIVE', lastActive)
const lastActiveIsKnown = lastActive != null
commit('SET_LAST_ACTIVE_IS_KNOWN', lastActiveIsKnown)
const apiURL = `${process.env.wsLookupBaseUrl}${entityData.resource_url}`
commit('SET_API_URL', apiURL)
if (idStatus === 'ACTIVE') {
const officialIndexName = IndexNames.getIndexNameFromLookupEntityName(
......@@ -81,7 +103,7 @@ export const actions = {
const linkToEntity = LinksToEntities[
officialIndexName
].getLinkToReportCard(chemblID)
commit('SET_IS_ACTIVE', true)
commit('SET_LINK_TO_ENTITY', linkToEntity)
}
......
Subproject commit 43470b52ecb9534eb5d262a5f1ed6a96b7f26a54
Subproject commit 71b1eb206c42a4fdd5c6a78bf4e24dde23b21aad
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment