Skip to content

Commit

Permalink
Activate feature metrics and switch from yarn to npmv7
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Mar 5, 2021
1 parent 78ad65c commit 6f2f923
Show file tree
Hide file tree
Showing 5 changed files with 8,187 additions and 5,506 deletions.
21 changes: 15 additions & 6 deletions assets/vue/gwas_region.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import BatchScroller from 'localzoom/src/components/BatchScroller.vue';
import PlotPanes from 'localzoom/src/components/PlotPanes.vue';
import RegionPicker from 'localzoom/src/components/RegionPicker.vue';
import {setup_feature_metrics} from 'localzoom/src/util/metrics';
const MAX_REGION_SIZE = 1000000;
Expand Down Expand Up @@ -34,6 +35,11 @@
};
},
methods: {
activateMetrics() {
// After plot is created, initiate metrics capture
// TODO: This is a mite finicky; consider further refactoring in the future?
this.$refs.plotWidget.$refs.assoc_plot.callPlot(setup_feature_metrics);
},
activateBatchMode(regions) {
this.batch_mode_active = true;
this.batch_mode_regions = regions;
Expand Down Expand Up @@ -108,12 +114,15 @@
</div>
<div class="row">
<div class="col-md-12">
<plot-panes ref="plotWidget"
:dynamic_urls="true"
:assoc_layout="lz_layout" :assoc_sources="lz_sources"
:study_names="study_names" :has_credible_sets="true"
:build="build"
:chr="c_chr" :start="c_start" :end="c_end"/>
<plot-panes
ref="plotWidget"
:dynamic_urls="true"
:assoc_layout="lz_layout" :assoc_sources="lz_sources"
:study_names="study_names" :has_credible_sets="true"
:build="build"
:chr="c_chr" :start="c_start" :end="c_end"
@plot-created="activateMetrics"
/>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions compose/production/django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### Production dockerfile for the web app. JS and python are implemented as two steps of a multistage build.
# Multistage build

# Step 1: JS assets. Ensure that a change to package.json or yarn.lock invalidates the cache
# Step 1: JS assets. Ensure that a change to package.json or package-lock.json invalidates the cache
FROM node:fermium as jsbuilder
COPY ./package.json ./yarn.lock /build/
COPY ./package.json ./package-lock.json /build/
COPY . /build/
WORKDIR /build/
RUN yarn install --from-lockfile && yarn run prod
RUN npm install ci && npm run prod


# Step 2 (main): Django app. Install python dependencies, add volume mounts, and run.
Expand Down
Loading

0 comments on commit 6f2f923

Please sign in to comment.