Compare commits

...
Author SHA1 Message Date
ohif-bot 1b68c307fc chore(release): publish [skip ci]
- @ohif/viewer@0.50.13
2019-09-03 00:49:13 +00:00
Gustavo André Lelis 7a9b477609 fix: 🐛 Activating Pan and Zoom on right and middle click by def (#841) 2019-09-02 20:38:48 -04:00
ohif-bot 8f758186c1 chore(release): publish [skip ci]
- @ohif/viewer@0.50.12
2019-08-29 14:38:57 +00:00
Danny Brown d48b617e1c fix: asset resolution when at non-root route (#828)
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* chore: production defaults to true; set in --env.production by cli

* Remove lingering merge issue

* Add minimification plugins

* Need relative URLs to find root assets

* Default public url to forward slash in define plugin

* Don't wrap w/ react-hot-loader if we're building for production

* No need to log extensions

* Minimize using terser; and minimize css

* Import redux from es; this bypasses commonjs as import and fixes our "production build" warning

* Split commone webpack build for now to test hotfix

* postfix slash

* undefined safe env access

* Try to fix node_env prod issue w/ redux

* Set NODE_ENV production for all prod builds

* Syntax error

* nix tests

* Increase max amount of available memory

* Don't run bundle analyzer by default

* fix: asset resolution when at non-root route
2019-08-29 10:29:38 -04:00
ohif-bot 7c2b444cf9 chore(release): publish [skip ci]
- @ohif/viewer@0.50.11
2019-08-29 13:03:45 +00:00
Danny Brown d86f758125 ci: set NODE_ENV, fix out of memory issue, fix hot reload bundling
* ci: test docs-publish

* Specify to use prod

* Babel should transpile with env set by webpack

* chore: production defaults to true; set in --env.production by cli

* Remove lingering merge issue

* Add minimification plugins

* Need relative URLs to find root assets

* Default public url to forward slash in define plugin

* Don't wrap w/ react-hot-loader if we're building for production

* No need to log extensions

* Minimize using terser; and minimize css

* Import redux from es; this bypasses commonjs as import and fixes our "production build" warning

* Split commone webpack build for now to test hotfix

* postfix slash

* undefined safe env access

* Try to fix node_env prod issue w/ redux

* Set NODE_ENV production for all prod builds

* Syntax error

* nix tests

* Increase max amount of available memory

* Don't run bundle analyzer by default
2019-08-29 08:53:33 -04:00
ohif-bot d26035fa55 chore(release): publish [skip ci]
- @ohif/viewer@0.50.10
2019-08-27 19:28:23 +00:00
Danny Brown ec4e2ef1a6 ci: fix dev-server script (#811)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming

* chore: WebPack output progress that we care about

* chore: Only publish the app config we care about

* PWA should publish source map

* Unused index.html file

* chore: Remove unused copy-webpack-plugin ignore

* Don't generate source map until we resolve memory issue

* ci: attempt to publish with GCP bucket deploy

* Update dev config to use new template loccations and env vars
2019-08-27 15:19:23 -04:00
Danny Brown 619d363243 ci: GCP deploy (#810)
* ci: test docs-publish

* Require unit tests for dry run

* ci: Make sure our docs publish is executable

* Try to correct path issue

* Try repo prefix

* Try as yarn command

* Need a workspace to attach to from previous step

* Add before we call our bash script

* See if we can enforce commands being available -- or just install locally?

* Try again

* Try SSH

* Include username in gh https url

* Note regarding failure on PR branches

* Remove docs publish from PR workflow

* chore: ability to specify an alternative html-template at build time

* chore: add command to build demo PWA website output

* chore: remove unused CI code

* Testing GCP capabilities

* syntax

* Naming

* naming

* chore: WebPack output progress that we care about

* chore: Only publish the app config we care about

* PWA should publish source map

* Unused index.html file

* chore: Remove unused copy-webpack-plugin ignore

* Don't generate source map until we resolve memory issue

* ci: attempt to publish with GCP bucket deploy
2019-08-27 14:43:44 -04:00
Danny Brown 073c0af7f7 GitHub labels appear to prefer short-hand syntax over literal emojis 2019-08-27 12:59:11 -04:00
Danny Brown 4aa49f4e26 Add awaiting review label to stale bot ignore 2019-08-27 10:59:58 -04:00
21 changed files with 293 additions and 105 deletions

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ yarn -v
node -v
echo 'Installing Gitbook CLI'
yarn global bin
yarn config get prefix
yarn config set prefix ~/.yarn
+9 -13
View File
@@ -231,7 +231,6 @@ jobs:
name: 'Build Demo Site, Upload SourceMaps, Send Deploy Notification'
command: |
npx lerna run build:viewer:demo --stream
# perl -i -pe 's#</head>#`cat .circleci/rollbar.html` #e' build/index.html
# export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;)
# export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;)
# export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;)
@@ -254,18 +253,15 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Node Test
command: npx lerna run build:viewer:demo --stream
# - run:
# name: Deploy latest version to viewer.ohif.org
# command: |
# # https://circleci.com/docs/2.0/google-auth/#authorization
# echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
# gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
# gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
# # Remove all files in Storage Bucket; Push latest
# gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
# gsutil -m rsync -R platform/viewer/dist gs://$GOOGLE_STORAGE_BUCKET
name: Deploy latest version to viewer.ohif.org
command: |
# https://circleci.com/docs/2.0/google-auth/#authorization
echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
# Remove all files in Storage Bucket; Push latest
gsutil -m rm gs://$GOOGLE_STORAGE_BUCKET/**
gsutil -m rsync -R platform/viewer/dist gs://$GOOGLE_STORAGE_BUCKET
workflows:
version: 2
+3 -1
View File
@@ -11,12 +11,14 @@ exemptLabels:
- 'Bug: Verified 🐛'
- 'Task: CI/Tooling 🤖'
- 'Task: Docs 📖'
- 'Task: Docs :book:'
- 'Task: Refactor 🛠'
- 'Task: Tests 🔬'
- 'PR: Awaiting Review 👀'
- 'Triage 🏳️'
- 'Announcement 🎉'
# Label to use when marking an issue as stale
staleLabel: 'Stale 🥖'
staleLabel: 'Stale :baguette_bread:'
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
+101
View File
@@ -0,0 +1,101 @@
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
const mode =
process.env.NODE_ENV === 'production' ? 'production' : 'development';
return {
mode,
entry: {
bundle: `${SRC_DIR}/index.js`,
},
context: SRC_DIR,
module: {
rules: [
/**
* JSX
*/
{
test: /\.jsx?$/,
exclude: [/node_modules/, /packages\\extension/],
loader: 'babel-loader',
options: {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
envName: mode,
presets: [
[
'@babel/preset-env',
{
// Do not transform ES6 modules to another format.
// Webpack will take care of that.
modules: false,
targets: {
ie: '11',
},
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
useBuiltIns: 'usage',
// https://babeljs.io/docs/en/babel-preset-env#corejs
corejs: 3,
},
],
],
},
},
/**
* This allows us to include web workers in our bundle, and VTK.js
* web workers in our bundle. While this increases bundle size, it
* cuts down on the number of includes we need for `script tag` usage.
*/
{
test: /\.worker\.js$/,
include: /vtk\.js[\/\\]Sources/,
use: [
{
loader: 'worker-loader',
options: { inline: true, fallback: false },
},
],
},
/**
* This is exclusively used by `vtk.js` to bundle glsl files.
*/
{
test: /\.glsl$/i,
include: /vtk\.js[\/\\]Sources/,
loader: 'shader-loader',
},
],
},
resolve: {
// Which directories to search when resolving modules
modules: [
// Modules specific to this package
path.resolve(__dirname, '../node_modules'),
// Hoisted Yarn Workspace Modules
path.resolve(__dirname, '../../../node_modules'),
SRC_DIR,
],
// Attempt to resolve these extensions in order.
extensions: ['.js', '.jsx', '.json', '*'],
// symlinked resources are resolved to their real path, not their symlinked location
symlinks: true,
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
'process.env.APP_CONFIG': JSON.stringify(process.env.APP_CONFIG || ''),
'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || '/'),
}),
],
// Fix: https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-285598881
// For issue in cornerstone-wado-image-loader
node: {
fs: 'empty',
},
};
};
+6 -2
View File
@@ -1,10 +1,13 @@
const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
// const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
const mode =
process.env.NODE_ENV === 'production' ? 'production' : 'development';
return {
mode,
entry: {
bundle: `${SRC_DIR}/index.js`,
},
@@ -22,6 +25,7 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
// Find babel.config.js in monorepo root
// https://babeljs.io/docs/en/options#rootmode
rootMode: 'upward',
envName: mode,
presets: [
[
'@babel/preset-env',
@@ -115,7 +119,7 @@ module.exports = (env, argv, { SRC_DIR, DIST_DIR }) => {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.DEBUG': JSON.stringify(process.env.DEBUG),
'process.env.APP_CONFIG': JSON.stringify(process.env.APP_CONFIG || ''),
'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || ''),
'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || '/'),
}),
],
// Fix: https://github.com/webpack-contrib/css-loader/issues/447#issuecomment-285598881
+2
View File
@@ -65,6 +65,7 @@
"jest-junit": "^6.4.0",
"lerna": "^3.15.0",
"lint-staged": "^9.0.2",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.6.0",
@@ -79,6 +80,7 @@
"stylelint-config-recommended": "^2.2.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"terser-webpack-plugin": "^1.4.1",
"webpack": "^4.35.2",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2",
+1 -1
View File
@@ -5,5 +5,5 @@
# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#adding-development-environment-variables-in-env
#
PUBLIC_URL=/demo
PUBLIC_URL=/demo/
APP_CONFIG=config/netlify.js
+10 -4
View File
@@ -19,7 +19,8 @@ const DIST_DIR = path.join(__dirname, '../dist');
const PUBLIC_DIR = path.join(__dirname, '../public');
const ASSET_PATH = process.env.ASSET_PATH || '/';
// Env Vars
const PUBLIC_URL = process.env.PUBLIC_URL || '';
const HTML_TEMPLATE = process.env.HTML_TEMPLATE || 'index.html';
const PUBLIC_URL = process.env.PUBLIC_URL || '/';
const APP_CONFIG = process.env.APP_CONFIG || 'config/default.js';
module.exports = (env, argv) => {
@@ -42,16 +43,21 @@ module.exports = (env, argv) => {
to: DIST_DIR,
toType: 'dir',
// Ignore our HtmlWebpackPlugin template file
ignore: ['index.html', '.DS_Store'],
// Ignore our configuration files
ignore: ['config/*', 'html-templates/*', '.DS_Store'],
},
// Copy over and rename our target app config file
{
from: `${PUBLIC_DIR}/${APP_CONFIG}`,
to: `${DIST_DIR}/app-config.js`,
},
]),
// Generate "index.html" w/ correct includes/imports
new HtmlWebpackPlugin({
template: `${PUBLIC_DIR}/index.html`,
template: `${PUBLIC_DIR}/html-templates/${HTML_TEMPLATE}`,
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
APP_CONFIG: APP_CONFIG,
},
}),
],
@@ -62,8 +62,6 @@ module.exports = (env, argv) => {
],
},
plugins: [
// Longer build. Let's report progress
new webpack.ProgressPlugin(),
// Clean output.path
new CleanWebpackPlugin(),
],
+83 -7
View File
@@ -1,20 +1,24 @@
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const webpackCommon = require('./../../../.webpack/webpack.common.js');
const webpackCommon = require('./../../../.webpack/webpack.common-pwa.js');
// Plugins
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
const TerserJSPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const workboxPlugin = require('workbox-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
//
const SRC_DIR = path.join(__dirname, '../src');
const DIST_DIR = path.join(__dirname, '../dist');
const PUBLIC_DIR = path.join(__dirname, '../public');
// Env Vars
const HTML_TEMPLATE = process.env.HTML_TEMPLATE || 'index.html';
const PUBLIC_URL = process.env.PUBLIC_URL || '';
const PUBLIC_URL = process.env.PUBLIC_URL || '/';
const APP_CONFIG = process.env.APP_CONFIG || 'config/default.js';
module.exports = (env, argv) => {
@@ -23,6 +27,8 @@ module.exports = (env, argv) => {
return merge(commonConfig, {
// https://webpack.js.org/configuration/mode/#mode-production
mode: 'production',
// Out of memory -- Code Split
// devtool: 'source-map',
stats: {
colors: true,
hash: true,
@@ -37,17 +43,81 @@ module.exports = (env, argv) => {
optimization: {
minimize: true,
sideEffects: true,
minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})],
},
output: {
path: DIST_DIR,
filename: '[name].bundle.[chunkhash].js',
publicPath: PUBLIC_URL, // Used by HtmlWebPackPlugin for asset prefix
},
module: {
rules: [
{
test: /\.styl$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: process.env.NODE_ENV === 'development',
},
},
{ loader: 'css-loader' },
{ loader: 'stylus-loader' },
],
},
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: process.env.NODE_ENV === 'development',
},
},
'css-loader',
'postcss-loader',
// 'sass-loader',
],
},
],
},
module: {
rules: [
{
test: /\.styl$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: process.env.NODE_ENV === 'development',
},
},
{ loader: 'css-loader' },
{ loader: 'stylus-loader' },
],
},
{
test: /\.(sa|sc|c)ss$/,
use: [
{
loader: ExtractCssChunksPlugin.loader,
options: {
hot: process.env.NODE_ENV === 'development',
},
},
'css-loader',
'postcss-loader',
// 'sass-loader',
],
},
],
},
// TODO:
// Do we need to rip anything out of the more generic common.js we're
// merging with this?
plugins: [
// Longer build. Let's report progress
new webpack.ProgressPlugin(),
// Uncomment to generate bundle analyzer
// new BundleAnalyzerPlugin(),
// Clean output.path
new CleanWebpackPlugin(),
// "Public" Folder
@@ -57,13 +127,20 @@ module.exports = (env, argv) => {
to: DIST_DIR,
toType: 'dir',
// Ignore our HtmlWebpackPlugin template file
ignore: ['index.html', 'html-templates/*', '.DS_Store'],
// Ignore our configuration files
ignore: ['config/*', 'html-templates/*', '.DS_Store'],
},
// Copy over and rename our target app config file
{
from: `${PUBLIC_DIR}/${APP_CONFIG}`,
to: `${DIST_DIR}/app-config.js`,
},
]),
// https://github.com/faceyspacey/extract-css-chunks-webpack-plugin#webpack-4-standalone-installation
new ExtractCssChunksPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
// hot: true /* only necessary if hot reloading not function*/
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
/**
* This generates our index.html file from the specified template.
@@ -74,7 +151,6 @@ module.exports = (env, argv) => {
filename: 'index.html',
templateParameters: {
PUBLIC_URL: PUBLIC_URL,
APP_CONFIG: APP_CONFIG,
},
// favicon: `${PUBLIC_DIR}/favicon.ico`,
}),
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.50.13](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.12...@ohif/viewer@0.50.13) (2019-09-03)
### Bug Fixes
* 🐛 Activating Pan and Zoom on right and middle click by def ([#841](https://github.com/OHIF/Viewers/issues/841)) ([7a9b477](https://github.com/OHIF/Viewers/commit/7a9b477))
## [0.50.12](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.11...@ohif/viewer@0.50.12) (2019-08-29)
### Bug Fixes
* asset resolution when at non-root route ([#828](https://github.com/OHIF/Viewers/issues/828)) ([d48b617](https://github.com/OHIF/Viewers/commit/d48b617))
## [0.50.11](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.10...@ohif/viewer@0.50.11) (2019-08-29)
**Note:** Version bump only for package @ohif/viewer
## [0.50.10](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.9...@ohif/viewer@0.50.10) (2019-08-27)
**Note:** Version bump only for package @ohif/viewer
## [0.50.9](https://github.com/OHIF/Viewers/compare/@ohif/viewer@0.50.8...@ohif/viewer@0.50.9) (2019-08-27)
**Note:** Version bump only for package @ohif/viewer
@@ -5,18 +5,18 @@ describe('ViewerRouting', () => {
cy.get('#studyListData > :nth-child(1) > .patientId').click();
});
it('thumbnails list has more than 2 items', () => {
cy.get('.scrollable-study-thumbnails div.ThumbnailEntryContainer')
.its('length')
.should('be.gte', 2);
});
// it('thumbnails list has more than 2 items', () => {
// cy.get('.scrollable-study-thumbnails div.ThumbnailEntryContainer')
// .its('length')
// .should('be.gte', 2);
// });
it('loads route with at least 2 thumbnails', () => {
cy.get(
':nth-child(1) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
cy.get(
':nth-child(2) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
).should('be.visible');
});
// it('loads route with at least 2 thumbnails', () => {
// cy.get(
// ':nth-child(1) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
// ).should('be.visible');
// cy.get(
// ':nth-child(2) > .ThumbnailEntry > .p-x-1 > .ImageThumbnail > .image-thumbnail-canvas > canvas'
// ).should('be.visible');
// });
});
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "0.50.9",
"version": "0.50.13",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -17,10 +17,10 @@
},
"proxy": "http://localhost:8042",
"scripts": {
"build:package": "webpack --config .webpack/commonjs.prod.js",
"build:viewer": "webpack --config .webpack/pwa.prod.js",
"build:viewer:ci": "cross-env PUBLIC_URL=/pwa APP_CONFIG=config/netlify.js webpack --config .webpack/pwa.prod.js",
"build:viewer:demo": "cross-env PUBLIC_URL=/ APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html webpack --config .webpack/pwa.prod.js",
"build:package": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/commonjs.prod.js",
"build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/pwa.prod.js",
"build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/pwa/ APP_CONFIG=config/netlify.js node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/pwa.prod.js",
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/pwa.prod.js",
"build:viewer:package": "yarn run build:package",
"dev": "webpack-dev-server --config .webpack/all.dev.js -w",
"dev:orthanc": "cross-env APP_CONFIG=config/docker_nginx-orthanc.js react-scripts start",
@@ -8,10 +8,10 @@
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="<%= PUBLIC_URL %>/manifest.json" />
<link rel="manifest" href="<%= PUBLIC_URL %>manifest.json" />
<script
type="text/javascript"
src="<%= PUBLIC_URL %>/<%= APP_CONFIG %>"
src="<%= PUBLIC_URL %>app-config.js"
></script>
<title>OHIF Viewer</title>
@@ -8,11 +8,8 @@
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="<%= PUBLIC_URL %>/manifest.json" />
<script
type="text/javascript"
src="<%= PUBLIC_URL %>/<%= APP_CONFIG %>"
></script>
<link rel="manifest" href="<%= PUBLIC_URL %>manifest.json" />
<script type="text/javascript" src="<%= PUBLIC_URL %>app-config.js"></script>
<title>OHIF Viewer</title>
-38
View File
@@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="<%= PUBLIC_URL %>/manifest.json" />
<script
type="text/javascript"
src="<%= PUBLIC_URL %>/<%= APP_CONFIG %>"
></script>
<title>OHIF Viewer</title>
<!-- WEB FONTS -->
<link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700|Sanchez&display=swap"
rel="stylesheet"
/>
<!-- EXTENSIONS -->
<!-- <script type="text/javascript" src="path/to/some-extension.js"></script>
<script>
window.config.extensions = [SomeExtension];
</script> -->
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
</body>
</html>
+4 -1
View File
@@ -197,5 +197,8 @@ function _makeAbsoluteIfNecessary(url, base_url) {
return base_url + url;
}
export default hot(App);
// Only wrap/use hot if in dev
const ExportedApp = process.env.NODE_ENV === 'development' ? hot(App) : App;
export default ExportedApp;
export { commandsManager, extensionManager, hotkeysManager };
-2
View File
@@ -31,8 +31,6 @@ const appDefaults = {
relativeWebWorkerScriptsPath: '',
};
console.log(OHIFVTKExtension);
if (window) {
config = window.config || {};
config.extensions = [
+2 -2
View File
@@ -142,8 +142,8 @@ function getResetLabellingAndContextMenu(store) {
export default function setupTools(store) {
const toolLabellingFlowCallback = getToolLabellingFlowCallback(store);
const availableTools = [
{ name: 'Pan', mouseButtonMasks: [4] },
{ name: 'Zoom', mouseButtonMasks: [2] },
{ name: 'Pan', mouseButtonMasks: [1, 4] },
{ name: 'Zoom', mouseButtonMasks: [1, 2] },
{ name: 'Wwwc', mouseButtonMasks: [1] },
{ name: 'Magnify' },
{ name: 'WwwcRegion' },
+10 -6
View File
@@ -1,10 +1,14 @@
import { applyMiddleware, combineReducers, createStore } from "redux";
import {
applyMiddleware,
combineReducers,
createStore,
} from 'redux/es/redux.js';
// import { createLogger } from 'redux-logger';
import layoutReducers from "./layout/reducers.js";
import { reducer as oidcReducer } from "redux-oidc";
import { redux } from "@ohif/core";
import thunkMiddleware from "redux-thunk";
import layoutReducers from './layout/reducers.js';
import { reducer as oidcReducer } from 'redux-oidc';
import { redux } from '@ohif/core';
import thunkMiddleware from 'redux-thunk';
// Combine our ohif-core, ui, and oidc reducers
// Set init data, using values found in localStorage
@@ -28,7 +32,7 @@ const store = createStore(
// Update our cached preferences in localStorage
store.subscribe(() => {
localStorage.saveState({
preferences: store.getState().preferences
preferences: store.getState().preferences,
});
});
+1 -1
View File
@@ -12707,7 +12707,7 @@ optimist@^0.6.1:
minimist "~0.0.1"
wordwrap "~0.0.2"
optimize-css-assets-webpack-plugin@^5.0.1:
optimize-css-assets-webpack-plugin@^5.0.1, optimize-css-assets-webpack-plugin@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz#e2f1d4d94ad8c0af8967ebd7cf138dcb1ef14572"
integrity sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA==