Skip to content

Commit

Permalink
Merge pull request #847 from broadinstitute/master
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin/master' into pankbase-main
  • Loading branch information
a-shilin authored Feb 3, 2025
2 parents a2bcf44 + 606d39f commit 3660d18
Show file tree
Hide file tree
Showing 33 changed files with 6,660 additions and 753 deletions.
317 changes: 317 additions & 0 deletions configs/vue.config.radiant.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
/* We define all the pages first in an object that can be modified BEFORE being
* exported so we can add/remove pages based on build type.
*/

let pages = {
index: {
entry: "src/portals/Radiant/views/Index/main.js",
template: "public/index.html",
filename: "index.html",
title: "Home",
chunks: ["chunk-vendors", "chunk-common", "index"],
},
debug: {
entry: "src/views/Debug/main.js",
template: "public/index.html",
filename: "debug.html",
title: "Debug Page",
chunks: ["chunk-vendors", "chunk-common", "debug"],
},
phenotype: {
entry: "src/views/Phenotype/main.js",
template: "public/index.html",
filename: "phenotype.html",
title: "Phenotype",
chunks: ["chunk-vendors", "chunk-common", "phenotype"],
},
region: {
entry: "src/views/Region/main.js",
template: "public/index.html",
filename: "region.html",
title: "Region Info",
chunks: ["chunk-vendors", "chunk-common", "region"],
},
variant: {
entry: "src/portals/Radiant/views/Variant/main.js",
template: "public/index.html",
filename: "variant.html",
title: "Variant Info",
chunks: ["chunk-vendors", "chunk-common", "variant"],
},
gene: {
entry: "src/portals/Radiant/views/Gene/main.js",
template: "public/index.html",
filename: "gene.html",
title: "Gene Info",
chunks: ["chunk-vendors", "chunk-common", "gene"],
},
datasets: {
entry: "src/views/Datasets/main.js",
template: "public/index.html",
filename: "datasets.html",
title: "Datasets",
chunks: ["chunk-vendors", "chunk-common", "datasets"],
},
dinspector: {
entry: "src/views/DatasetInspector/main.js",
template: "public/index.html",
filename: "dinspector.html",
title: "Dataset Inspector",
chunks: ["chunk-vendors", "chunk-common", "dinspector"],
},
downloads: {
entry: "src/views/Downloads/main.js",
template: "public/index.html",
filename: "downloads.html",
title: "Downloads",
chunks: ["chunk-vendors", "chunk-common", "downloads"],
},
policies: {
entry: "src/views/Policies/main.js",
template: "public/index.html",
filename: "policies.html",
title: "Policies",
chunks: ["chunk-vendors", "chunk-common", "policies"],
},
about: {
entry: "src/views/About/main.js",
template: "public/index.html",
filename: "about.html",
title: "About",
chunks: ["chunk-vendors", "chunk-common", "about"],
},
collaborate: {
entry: "src/views/Collaborate/main.js",
template: "public/index.html",
filename: "collaborate.html",
title: "Collaborate",
chunks: ["chunk-vendors", "chunk-common", "collaborate"],
},
resources: {
entry: "src/views/Resources/main.js",
template: "public/index.html",
filename: "resources.html",
title: "Resources",
chunks: ["chunk-vendors", "chunk-common", "resources"],
},
publications: {
entry: "src/views/Publications/main.js",
template: "public/index.html",
filename: "publications.html",
title: "Publications",
chunks: ["chunk-vendors", "chunk-common", "publications"],
},
news: {
entry: "src/views/News/main.js",
template: "public/index.html",
filename: "news.html",
title: "News",
chunks: ["chunk-vendors", "chunk-common", "news"],
},
contacts: {
entry: "src/views/Contacts/main.js",
template: "public/index.html",
filename: "contacts.html",
title: "Contacts",
chunks: ["chunk-vendors", "chunk-common", "contacts"],
},
kplab: {
entry: "src/views/KPLab/main.js",
template: "public/index.html",
filename: "kplab.html",
title: "KP Lab",
chunks: ["chunk-vendors", "chunk-common", "kplab"],
},
apis: {
entry: "src/views/Apis/main.js",
template: "public/index.html",
filename: "apis.html",
title: "APIs",
chunks: ["chunk-vendors", "chunk-common", "apis"],
},
epigeneticdatasets: {
entry: "src/views/EpigeneticDatasets/main.js",
template: "public/index.html",
filename: "epigeneticdatasets.html",
title: "Epigenetic Datasets",
chunks: ["chunk-vendors", "chunk-common", "epigeneticdatasets"],
},
epigenomicdatasets: {
entry: "src/views/EpigenomicDatasets/main.js",
template: "public/index.html",
filename: "epigenomicdatasets.html",
title: "Epigenomic Datasets",
chunks: ["chunk-vendors", "chunk-common", "epigenomicdatasets"],
},
ampt2dpartnership: {
entry: "src/views/AmpT2dPartnership/main.js",
template: "public/index.html",
filename: "ampt2dpartnership.html",
title: "AMP T2D Partnership",
chunks: ["chunk-vendors", "chunk-common", "ampt2dpartnership"],
},
effectorgenes: {
entry: "src/views/EffectorGenes/main.js",
template: "public/index.html",
filename: "effectorgenes.html",
title: "Predicted Effector Genes Research Methods",
chunks: ["chunk-vendors", "chunk-common", "effectorgenes"],
},
eglmethod: {
entry: "src/views/EglMethod/main.js",
template: "public/index.html",
filename: "method.html",
title: "Research Method",
chunks: ["chunk-vendors", "chunk-common", "eglmethod"],
},
hugecalculator: {
entry: "src/views/HuGeCalculator/main.js",
template: "public/index.html",
filename: "hugecalculator.html",
title: "HuGe Calculator",
chunks: ["chunk-vendors", "chunk-common", "hugecalculator"],
},

genefinder: {
entry: "src/views/GeneFinder/main.js",
template: "public/index.html",
filename: "genefinder.html",
title: "Gene Finder",
chunks: ["chunk-vendors", "chunk-common", "genefinder"],
},
signalsifter: {
entry: "src/views/SignalSifter/main.js",
template: "public/index.html",
filename: "signalsifter.html",
title: "Signal Sifter",
chunks: ["chunk-vendors", "chunk-common", "signalsifter"],
},
complicationsviewer: {
entry: "src/views/ComplicationsViewer/main.js",
template: "public/index.html",
filename: "complicationsviewer.html",
title: "Complications Viewer",
chunks: ["chunk-vendors", "chunk-common", "complicationsviewer"],
},

page404: {
entry: "src/views/404/main.js",
template: "public/index.html",
filename: "404.html",
title: "Page Not Found",
chunks: ["chunk-vendors", "chunk-common", "page404"],
},
gait: {
entry: "src/views/GAIT/main.js",
template: "public/index.html",
filename: "gait.html",
title: "Genetic Association Interactive Tool",
chunks: ["chunk-vendors", "chunk-common", "gait"],
},
gait2: {
entry: "src/views/GAIT2/main.js",
template: "public/index.html",
filename: "ncgait.html",
title: "Non-Coding Genetic Association Interactive Tool",
chunks: ["chunk-vendors", "chunk-common", "gait2"],
},
project: {
entry: "src/views/Project/main.js",
template: "public/index.html",
filename: "project.html",
title: "Project",
chunks: ["chunk-vendors", "chunk-common", "project"],
},
variantsearch: {
entry: "src/views/VariantSearch/main.js",
template: "public/index.html",
filename: "variantsearch.html",
title: "Variant Search",
chunks: ["chunk-vendors", "chunk-common", "variantsearch"],
},
research: {
entry: "src/views/Papers/Research/main.js",
template: "public/index.html",
filename: "research.html",
title: "Research",
chunks: ["chunk-vendors", "chunk-common", "research"],
},
egggenerator: {
entry: "src/views/EggGenerator/main.js",
template: "public/index.html",
filename: "egggenerator.html",
title: "Exome Gene-Level Group-file Generator",
chunks: ["chunk-vendors", "chunk-common", "egggenerator"],
},
help: {
entry: "src/views/Help/main.js",
template: "public/index.html",
filename: "help.html",
title: "Help",
chunks: ["chunk-vendors", "chunk-common", "help"],
},
};

// remove the debug page in production
if (process.env.NODE_ENV === "production") {
delete pages.debug;
}

module.exports = {
devServer: {
writeToDisk: true, // https://webpack.js.org/configuration/dev-server/#devserverwritetodisk-
},
configureWebpack: (config) => {
let bioindex_dev = process.env.BIOINDEX_DEV;
let bioindex_host = "https://bioindex.hugeamp.org"; // production by default
//set private bioindex host if variable is defined, otherwise use default
let bioindex_host_private =
process.env.BIOINDEX_HOST_PRIVATE || "https://bioindex.hugeamp.org";

if (!!bioindex_dev) {
bioindex_host =
bioindex_dev == "localhost"
? "http://localhost:5000"
: "https://bioindex-dev.hugeamp.org";
}

// output which vue config file and bioindex is being used
console.log(
`VUE_CONFIG_PATH=${process.env.VUE_CLI_SERVICE_CONFIG_PATH}; BIOINDEX_DEV=${process.env.BIOINDEX_DEV}; using ${bioindex_host} and ${bioindex_host_private}`
);

// add the transform rule for bioindex
config.module.rules.push({
test: /bioIndexUtils\.js$/,
loader: "string-replace-loader",
options: {
search: "SERVER_IP_ADDRESS",
replace: bioindex_host,
flags: "g",
},
});

// add the transform rule for bioindex
// Helen 2021-06-17
config.module.rules.push({
test: /bioIndexUtils\.js$/,
loader: "string-replace-loader",
options: {
search: "SERVER_IP_PRIVATE",
replace: bioindex_host_private,
flags: "g",
},
});

// create inline maps for dev builds
if (process.env.NODE_ENV !== "production") {
//config.devtool = "inline-source-map";

//https://stackoverflow.com/questions/48047150/chrome-extension-compiled-by-webpack-throws-unsafe-eval-error
config.devtool = "cheap-module-source-map";
}
},
outputDir: "portals/Radiant/dist",
productionSourceMap: false,
pages,
};
5 changes: 3 additions & 2 deletions src/components/GeneAssociationsMasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,15 @@ export default Vue.component("GeneAssociationsMasks", {
},
//filter associations that only exist in the phenotypeMap
filteredAssociations() {
let assocs = !this.filter
return this.associations;
/*let assocs = !this.filter
? this.associations
: this.associations.filter(this.filter);
return (
assocs.filter((row) => {
return this.phenotypeMap[row.phenotype];
}) || []
);
);*/
},
},
methods: {
Expand Down
11 changes: 5 additions & 6 deletions src/components/researchPortal/ResearchInSectionSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
<span v-html="parameter.label"></span>
</div>

<select v-if="parameter.type == 'api list' &&
parameterOptions[paramIndex].length <= 10"
<select v-if="parameter.type == 'api list'"
:id="'section_search_param_' + parameter.parameter" class="custom-select custom-select-search"
@change="updateSearchInputByEvent($event, paramIndex, parameter.parameter)">

Expand All @@ -27,11 +26,11 @@
v-html="param.label.trim()"></option>
</select>

<template v-if="parameter.type == 'api list' && parameterOptions[paramIndex].length > 10">
<!--<template v-if="parameter.type == 'api list' && parameterOptions[paramIndex].length > 10">
<input v-model="paramSearch[paramIndex]" class="form-control"
@keyup="getListOptions($event, parameter)" :id="'section_search_param_' + parameter.parameter" />
<!--<div :id="'listOptions' + parameter.parameter" class="custom-select custom-select-search long-list"
<div :id="'listOptions' + parameter.parameter" class="custom-select custom-select-search long-list"
:size="!!listOptions[parameter.parameter] && listOptions[parameter.parameter].length >= 5 ? 5 : 'auto'"
:style="!listOptions[parameter.parameter] || listOptions[parameter.parameter].length == 0
? 'display:none !important;'
Expand All @@ -46,8 +45,8 @@
)
" class="custom-select-a-option"></a>
</template>
</div>-->
</template>
</div>
</template>-->

<select
v-if="parameter.type == 'list' &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<input v-model="paramSearch[paramIndex]" class="form-control" @keyup="getGenes($event)"
:id="'search_param_' + parameter.parameter" />

<div class="custom-select custom-select-search" :size="kpGenes.length >= 5 ? 5 : 'auto'" :style="kpGenes.length == 0
<div class="custom-select custom-select-search" :size="kpGenes.length >= 5 ? 5 : 'auto'" :style="kpGenes.length == 0 || checkFocus('search_param_' + parameter.parameter) == false
? 'display:none !important;'
: ''
">
Expand Down Expand Up @@ -202,6 +202,13 @@ export default Vue.component("research-multi-sections-search", {
},
methods: {
checkFocus(ID) {
if (!document.getElementById(ID).matches(':focus')) {
return false;
} else {
return true;
}
},
async getList(apiPoint, INDEX) {
let searchPoint = apiPoint.url;
Expand Down
Loading

0 comments on commit 3660d18

Please sign in to comment.