Skip to content
Permalink
Browse files
Merge pull request #733 from girder/cloudflare-git-rev
  • Loading branch information
brianhelba committed May 4, 2022
2 parents dbf8b7e + e85975a commit 23dc35ae75f61317f70ce6e8ea0df031957d60b1
Showing with 190 additions and 439 deletions.
  1. +2 −2 .circleci/config.yml
  2. +2 −2 web/package.json
  3. +1 −1 web/src/components/SampleBrowser.vue
  4. +14 −14 web/src/components/vis/Heatmap.vue
  5. +21 −5 web/vue.config.js
  6. +150 −415 web/yarn.lock
@@ -18,7 +18,7 @@ jobs:

test_web:
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- restore_cache:
@@ -98,7 +98,7 @@ jobs:

release:
docker:
- image: node:10
- image: node:12
steps:
- checkout
- restore_cache:
@@ -72,11 +72,11 @@
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-vue": "^6.2.2",
"git-revision-webpack-plugin": "^3.0.3",
"node-sass": "^4.13.0",
"pug": "^2.0.3",
"pug-lint-vue": "^0.1.3",
"pug-plain-loader": "^1.0.0",
"sass-loader": "^8.0.2",
"sass": "^1.51.0",
"sass-loader": "^10",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"typescript": "~3.9.3",
@@ -81,7 +81,7 @@ export default {
border-bottom: 1px solid var(--v-primary-lighten4);
border-top: 1px solid var(--v-primary-lighten4);
/deep/ .v-expansion-panel__body {
::v-deep .v-expansion-panel__body {
background: var(--v-primary-lighten5);
box-shadow: inset 0px 0px 4px rgba(0, 0, 0, .25);
}
@@ -810,13 +810,13 @@ export default {
justify-content: center;
overflow: hidden;
line-height: normal;
/deep/ div {
::v-deep div {
flex-direction: column;
flex: 1 1 0;
display: flex;
align-items: center;
}
/deep/ .label {
::v-deep .label {
text-align: right;
writing-mode: tb;
transform: rotate(-180deg);
@@ -825,12 +825,12 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
/deep/ .color {
::v-deep .color {
align-self: stretch;
height: 5px;
margin-bottom: 2px;
}
/deep/ .selected {
::v-deep .selected {
color: orange;
}
}
@@ -841,44 +841,44 @@ export default {
flex-direction: column;
justify-content: center;
line-height: normal;
/deep/ .color {
::v-deep .color {
align-self: stretch;
width: 5px;
min-width: 5px;
margin-right: 2px;
}
/deep/ .color.hidden {
::v-deep .color.hidden {
display: none;
}
/deep/ div {
::v-deep div {
flex: 1 1 0;
display: flex;
align-items: center;
}
/deep/ .label {
::v-deep .label {
flex: 1 1 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/deep/ .selected {
::v-deep .selected {
color: orange;
}
}
.edges {
/deep/ path {
::v-deep path {
fill: none;
stroke-width: 1;
stroke: black;
}
/deep/ path.selected {
::v-deep path.selected {
stroke: orange;
}
}
.nodes {
/deep/ g {
::v-deep g {
opacity: 0;
font: normal normal normal 24px/1 "Material Design Icons";
fill: black;
@@ -887,13 +887,13 @@ export default {
user-select: none;
text-anchor: middle;
dominant-baseline: central;
/deep/ circle {
::v-deep circle {
fill: white;
}
&:hover {
opacity: 1;
fill: orange;
/deep/ text {
::v-deep text {
fill: orange;
}
}
@@ -4,12 +4,26 @@ const webpack = require('webpack');

const proxyTarget = 'http://localhost:5000';

let COMMITHASH = null;

if (process.env.NODE_ENV == 'production') {
function commitHashFromGit() {
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
COMMITHASH = JSON.stringify(gitRevisionPlugin.commithash());
try {
return gitRevisionPlugin.commithash();
} catch {
return undefined;
}
}

let commitHash;
if (process.env.NODE_ENV === 'production') {
commitHash = commitHashFromGit();
if (commitHash === undefined) {
// Cloudflare Pages does not have an actual Git clone
commitHash = process.env.CF_PAGES_COMMIT_SHA;
}
}
if (commitHash === undefined) {
commitHash = 'HEAD';
}

module.exports = {
@@ -30,7 +44,9 @@ module.exports = {
},
},
plugins: [
new webpack.DefinePlugin({ COMMITHASH }),
new webpack.DefinePlugin({
COMMITHASH: JSON.stringify(commitHash),
}),
],
},
chainWebpack: (config) => {

0 comments on commit 23dc35a

Please sign in to comment.