You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/10/02 19:01:45 UTC
[airavata-django-portal] branch master updated (faa8be4 -> 8065673)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.
from faa8be4 Handle null description in SSHCredentialSelector
new d28e87f AIRAVATA-3081 Max file upload size guidance in Uppy component
new a9caeef Dockerfile for building JS code
new f720120 Add shebang to build script
new 794b4ac Revert "AIRAVATA-2984 Load webpack-stats.json from STATIC_ROOT"
new 6e2cc65 Revert "AIRAVATA-2984 Generate webpack files in STATIC_ROOT dir"
new 8065673 Expose dev server port 9000
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
build_js.sh | 1 +
django_airavata/apps/admin/vue.config.js | 5 +-
django_airavata/apps/dataparsers/vue.config.js | 5 +-
django_airavata/apps/groups/vue.config.js | 5 +-
.../experiment/input-editors/InputFileSelector.vue | 73 ++++---------------
.../components/experiment/input-editors/Uppy.vue | 46 ++++++++++--
.../js/containers/UserStorageContainer.vue | 64 +++--------------
django_airavata/apps/workspace/vue.config.js | 5 +-
django_airavata/settings.py | 63 ++++++++++++++++-
django_airavata/static/common/vue.config.js | 3 +-
django_airavata/webpack_loader_util.py | 82 ----------------------
docs/dev/new_django_app.md | 22 +++---
scripts/docker-build/Dockerfile | 11 +++
13 files changed, 149 insertions(+), 236 deletions(-)
delete mode 100644 django_airavata/webpack_loader_util.py
create mode 100644 scripts/docker-build/Dockerfile
[airavata-django-portal] 06/06: Expose dev server port 9000
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 8065673c37be23d6f2ac2a3919a6d300061bca26
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Aug 13 09:47:59 2019 -0400
Expose dev server port 9000
---
scripts/docker-build/Dockerfile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/docker-build/Dockerfile b/scripts/docker-build/Dockerfile
index 0dd1032..76640a5 100644
--- a/scripts/docker-build/Dockerfile
+++ b/scripts/docker-build/Dockerfile
@@ -6,4 +6,6 @@ VOLUME /code
WORKDIR /code
+EXPOSE 9000
+
CMD ["./build_js.sh"]
[airavata-django-portal] 04/06: Revert "AIRAVATA-2984 Load
webpack-stats.json from STATIC_ROOT"
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 794b4ac25189b6910b5d7746775333053931f583
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Aug 12 19:45:11 2019 -0400
Revert "AIRAVATA-2984 Load webpack-stats.json from STATIC_ROOT"
This reverts commit e2b13d4808601f3cb0e5f04846aa7681297996e1.
---
django_airavata/settings.py | 63 ++++++++++++++++++++++++--
django_airavata/webpack_loader_util.py | 82 ----------------------------------
docs/dev/new_django_app.md | 15 +++----
3 files changed, 66 insertions(+), 94 deletions(-)
diff --git a/django_airavata/settings.py b/django_airavata/settings.py
index 3e63a54..58bce54 100644
--- a/django_airavata/settings.py
+++ b/django_airavata/settings.py
@@ -15,8 +15,6 @@ from importlib import import_module
from pkg_resources import iter_entry_points
-from . import webpack_loader_util
-
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -277,7 +275,66 @@ AUTHENTICATION_OPTIONS = {
THRIFT_CLIENT_POOL_KEEPALIVE = 5
# Webpack loader
-WEBPACK_LOADER = webpack_loader_util.create_webpack_loader_config()
+WEBPACK_LOADER = {
+ 'COMMON': {
+ 'BUNDLE_DIR_NAME': 'common/dist/',
+ 'STATS_FILE': os.path.join(
+ BASE_DIR,
+ 'django_airavata',
+ 'static',
+ 'common',
+ 'dist',
+ 'webpack-stats.json'),
+ },
+ 'ADMIN': {
+ 'BUNDLE_DIR_NAME': 'django_airavata_admin/dist/',
+ 'STATS_FILE': os.path.join(
+ BASE_DIR,
+ 'django_airavata',
+ 'apps',
+ 'admin',
+ 'static',
+ 'django_airavata_admin',
+ 'dist',
+ 'webpack-stats.json'),
+ },
+ 'DATAPARSERS': {
+ 'BUNDLE_DIR_NAME': 'django_airavata_dataparsers/dist/',
+ 'STATS_FILE': os.path.join(
+ BASE_DIR,
+ 'django_airavata',
+ 'apps',
+ 'dataparsers',
+ 'static',
+ 'django_airavata_dataparsers',
+ 'dist',
+ 'webpack-stats.json'),
+ },
+ 'GROUPS': {
+ 'BUNDLE_DIR_NAME': 'django_airavata_groups/dist/',
+ 'STATS_FILE': os.path.join(
+ BASE_DIR,
+ 'django_airavata',
+ 'apps',
+ 'groups',
+ 'static',
+ 'django_airavata_groups',
+ 'dist',
+ 'webpack-stats.json'),
+ },
+ 'WORKSPACE': {
+ 'BUNDLE_DIR_NAME': 'django_airavata_workspace/dist/',
+ 'STATS_FILE': os.path.join(
+ BASE_DIR,
+ 'django_airavata',
+ 'apps',
+ 'workspace',
+ 'static',
+ 'django_airavata_workspace',
+ 'dist',
+ 'webpack-stats.json'),
+ },
+}
LOGGING = {
'version': 1,
diff --git a/django_airavata/webpack_loader_util.py b/django_airavata/webpack_loader_util.py
deleted file mode 100644
index 8d30375..0000000
--- a/django_airavata/webpack_loader_util.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Utilities for working with webpack_loader."""
-import os
-
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-
-def create_webpack_loader_config(static_root=None):
- return {
- 'COMMON': {
- 'BUNDLE_DIR_NAME': 'common/dist/',
- 'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'static',
- ),
- 'common',
- 'dist',
- 'webpack-stats.json'),
- },
- 'ADMIN': {
- 'BUNDLE_DIR_NAME': 'django_airavata_admin/dist/',
- 'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'apps',
- 'admin',
- 'static',
- ),
- 'django_airavata_admin',
- 'dist',
- 'webpack-stats.json'),
- },
- 'DATAPARSERS': {
- 'BUNDLE_DIR_NAME': 'django_airavata_dataparsers/dist/',
- 'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'apps',
- 'dataparsers',
- 'static',
- ),
- 'django_airavata_dataparsers',
- 'dist',
- 'webpack-stats.json'),
- },
- 'GROUPS': {
- 'BUNDLE_DIR_NAME': 'django_airavata_groups/dist/',
- 'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'apps',
- 'groups',
- 'static',
- ),
- 'django_airavata_groups',
- 'dist',
- 'webpack-stats.json'),
- },
- 'WORKSPACE': {
- 'BUNDLE_DIR_NAME': 'django_airavata_workspace/dist/',
- 'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'apps',
- 'workspace',
- 'static',
- ),
- 'django_airavata_workspace',
- 'dist',
- 'webpack-stats.json'),
- },
- }
diff --git a/docs/dev/new_django_app.md b/docs/dev/new_django_app.md
index e8b289c..f17d465 100644
--- a/docs/dev/new_django_app.md
+++ b/docs/dev/new_django_app.md
@@ -92,21 +92,18 @@ INSTALLED_APPS = [
### Add Webpack bundle loader config to settings.py
If the new app has Webpack built frontend, then add the following configuration
-to webpack_loader_util.py:
+to WEBPACK_LOADER in settings.py:
```python
...
'MYAPP': {
'BUNDLE_DIR_NAME': 'django_airavata_myapp/dist/',
'STATS_FILE': os.path.join(
- static_root if static_root else
- os.path.join(
- BASE_DIR,
- 'django_airavata',
- 'apps',
- 'myapp',
- 'static',
- ),
+ BASE_DIR,
+ 'django_airavata',
+ 'apps',
+ 'myapp',
+ 'static',
'django_airavata_myapp',
'dist',
'webpack-stats.json'),
[airavata-django-portal] 02/06: Dockerfile for building JS code
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit a9caeefeeca051f271f92fd3a90a8cc87b7c8c98
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jul 16 10:24:34 2019 -0400
Dockerfile for building JS code
---
scripts/docker-build/Dockerfile | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/scripts/docker-build/Dockerfile b/scripts/docker-build/Dockerfile
new file mode 100644
index 0000000..0dd1032
--- /dev/null
+++ b/scripts/docker-build/Dockerfile
@@ -0,0 +1,9 @@
+FROM node:10-alpine
+
+RUN apk update && apk add bash
+
+VOLUME /code
+
+WORKDIR /code
+
+CMD ["./build_js.sh"]
[airavata-django-portal] 03/06: Add shebang to build script
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit f72012094657dce10aea586e3e128ce62971bb2f
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jul 16 10:24:58 2019 -0400
Add shebang to build script
---
build_js.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/build_js.sh b/build_js.sh
index 98ac49d..962d73a 100755
--- a/build_js.sh
+++ b/build_js.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# Get the directory that this script is in
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[airavata-django-portal] 01/06: AIRAVATA-3081 Max file upload size
guidance in Uppy component
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit d28e87f1b70ca887351a3c857da77fdf06b66a04
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Oct 2 13:16:13 2019 -0400
AIRAVATA-3081 Max file upload size guidance in Uppy component
---
.../experiment/input-editors/InputFileSelector.vue | 73 ++++------------------
.../components/experiment/input-editors/Uppy.vue | 46 ++++++++++++--
.../js/containers/UserStorageContainer.vue | 64 +++----------------
3 files changed, 60 insertions(+), 123 deletions(-)
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputFileSelector.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputFileSelector.vue
index 645a198..df3063b 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputFileSelector.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/InputFileSelector.vue
@@ -7,7 +7,7 @@
/>
</div>
<div
- class="d-flex align-items-baseline"
+ class="d-flex align-items-center"
v-else
>
<b-button
@@ -15,27 +15,21 @@
class="input-file-option"
>Select file from storage</b-button>
<span class="text-muted mx-3">OR</span>
- <b-form-group
- :description="maxFileUploadSizeMessage"
- :state="fileUploadState"
- :invalid-feedback="fileUploadInvalidFeedback"
+ <uppy
class="input-file-option"
- >
- <uppy
- ref="uppy"
- xhr-upload-endpoint="/api/upload"
- tus-upload-finish-endpoint="/api/tus-upload-finish"
- @upload-success="uploadSuccess"
- @upload-started="$emit('uploadstart')"
- @upload-finished="uploadFinished"
- :multiple="multiple"
- />
- </b-form-group>
+ ref="uppy"
+ xhr-upload-endpoint="/api/upload"
+ tus-upload-finish-endpoint="/api/tus-upload-finish"
+ @upload-success="uploadSuccess"
+ @upload-started="$emit('uploadstart')"
+ @upload-finished="uploadFinished"
+ :multiple="multiple"
+ />
</div>
</template>
<script>
-import { models, services } from "django-airavata-api";
+import { models } from "django-airavata-api";
import UserStorageFileSelectionContainer from "../../storage/UserStorageFileSelectionContainer";
import Uppy from "./Uppy";
@@ -56,56 +50,13 @@ export default {
Uppy
},
computed: {
- maxFileUploadSizeMB() {
- return this.settings
- ? this.settings.fileUploadMaxFileSize / 1024 / 1024
- : 0;
- },
- maxFileUploadSizeMessage() {
- if (this.maxFileUploadSizeMB) {
- return (
- "Max file upload size is " +
- Math.round(this.maxFileUploadSizeMB) +
- " MB"
- );
- } else {
- return null;
- }
- },
- fileTooLarge() {
- return (
- this.settings &&
- this.settings.fileUploadMaxFileSize &&
- this.file &&
- this.file.size > this.settings.fileUploadMaxFileSize
- );
- },
- fileUploadState() {
- if (this.fileTooLarge) {
- return false;
- } else {
- return null;
- }
- },
- fileUploadInvalidFeedback() {
- if (this.fileTooLarge) {
- return (
- "File selected is larger than " + this.maxFileUploadSizeMB + " MB"
- );
- } else {
- return null;
- }
- }
},
data() {
return {
- file: null,
isSelectingFile: false,
- settings: null
};
},
created() {
- services.SettingsService.get().then(s => (this.settings = s));
},
methods: {
unselect() {
@@ -124,7 +75,7 @@ export default {
this.$emit("selected", dataProduct.productUri, dataProduct);
},
uploadFinished() {
- this.$emit('uploadend');
+ this.$emit("uploadend");
this.$refs.uppy.reset();
}
}
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/Uppy.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/Uppy.vue
index 39cfb2f..16e1966 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/Uppy.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/Uppy.vue
@@ -2,6 +2,11 @@
<div class="custom-Uppy">
<div ref="dragDrop" />
<div ref="statusBar" />
+ <b-alert
+ class="mt-1"
+ :show="restrictionFailed"
+ variant="danger"
+ >{{ restrictionFailedMessage }}</b-alert>
</div>
</template>
@@ -43,26 +48,51 @@ export default {
});
},
destroyed() {
- // TODO: tear down the Uppy instance
+ if (this.uppy) {
+ this.uppy.close();
+ }
},
data() {
return {
- uppy: null
+ uppy: null,
+ restrictionFailedMessage: null
};
},
+ computed: {
+ maxFileUploadSizeMB() {
+ return this.settings
+ ? this.settings.fileUploadMaxFileSize / 1024 / 1024
+ : 0;
+ },
+ maxFileUploadSizeMessage() {
+ if (this.maxFileUploadSizeMB) {
+ return (
+ "Max file upload size is " +
+ Math.round(this.maxFileUploadSizeMB) +
+ " MB"
+ );
+ } else {
+ return null;
+ }
+ },
+ restrictionFailed() {
+ return this.restrictionFailedMessage != null;
+ }
+ },
methods: {
initUppy() {
this.uppy = Uppy({
- // TODO: set id
autoProceed: true,
- // TODO: add maxFileSize restriction
debug: true,
restrictions: {
maxNumberOfFiles: this.multiple ? null : 1,
+ maxFileSize: this.settings.fileUploadMaxFileSize
}
});
- // TODO: add 'note' here as passed in through prop (Max file upload size is 64MB)
- this.uppy.use(DragDrop, { target: this.$refs.dragDrop });
+ this.uppy.use(DragDrop, {
+ target: this.$refs.dragDrop,
+ note: this.maxFileUploadSizeMessage
+ });
this.uppy.use(StatusBar, {
target: this.$refs.statusBar,
hideUploadButton: true,
@@ -97,6 +127,10 @@ export default {
});
this.uppy.on("complete", () => {
this.$emit("upload-finished");
+ this.restrictionFailedMessage = null;
+ });
+ this.uppy.on("restriction-failed", (file, error) => {
+ this.restrictionFailedMessage = `${file.name}: ${error.message}`;
});
},
reset() {
diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/UserStorageContainer.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/UserStorageContainer.vue
index b7f34ef..d3a2aab 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/UserStorageContainer.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/containers/UserStorageContainer.vue
@@ -12,19 +12,14 @@
</div>
<div class="row">
<div class="col">
- <b-form-group
- :description="maxFileUploadSizeMessage"
- :state="fileUploadState"
- :invalid-feedback="fileUploadInvalidFeedback"
- >
- <uppy
- ref="file-upload"
- :xhr-upload-endpoint="uploadEndpoint"
- :tus-upload-finish-endpoint="uploadEndpoint"
- @upload-success="uploadSuccess"
- multiple
- />
- </b-form-group>
+ <uppy
+ class="mb-1"
+ ref="file-upload"
+ :xhr-upload-endpoint="uploadEndpoint"
+ :tus-upload-finish-endpoint="uploadEndpoint"
+ @upload-success="uploadSuccess"
+ multiple
+ />
</div>
<div class="col">
<b-input-group>
@@ -79,46 +74,6 @@ export default {
username() {
return session.Session.username;
},
- maxFileUploadSizeMB() {
- return this.settings
- ? this.settings.fileUploadMaxFileSize / 1024 / 1024
- : 0;
- },
- maxFileUploadSizeMessage() {
- if (this.maxFileUploadSizeMB) {
- return (
- "Max file upload size is " +
- Math.round(this.maxFileUploadSizeMB) +
- " MB"
- );
- } else {
- return null;
- }
- },
- fileTooLarge() {
- return (
- this.settings &&
- this.settings.fileUploadMaxFileSize &&
- this.file &&
- this.file.size > this.settings.fileUploadMaxFileSize
- );
- },
- fileUploadState() {
- if (this.fileTooLarge) {
- return false;
- } else {
- return null;
- }
- },
- fileUploadInvalidFeedback() {
- if (this.fileTooLarge) {
- return (
- "File selected is larger than " + this.maxFileUploadSizeMB + " MB"
- );
- } else {
- return null;
- }
- },
uploadEndpoint() {
// This endpoint can handle XHR upload or a TUS uploadURL
return "/api/user-storage/" + this.storagePath;
@@ -127,9 +82,7 @@ export default {
data() {
return {
userStoragePath: null,
- file: null,
dirName: null,
- settings: null
};
},
methods: {
@@ -214,7 +167,6 @@ export default {
} else {
this.loadUserStoragePath(this.storagePath);
}
- services.SettingsService.get().then(s => (this.settings = s));
},
watch: {
$route() {
[airavata-django-portal] 05/06: Revert "AIRAVATA-2984 Generate
webpack files in STATIC_ROOT dir"
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 6e2cc65eaaf2ebfee1fc081a3a996199533babad
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Aug 12 19:45:20 2019 -0400
Revert "AIRAVATA-2984 Generate webpack files in STATIC_ROOT dir"
This reverts commit 22134a0b5b30c09af6d0fdaf2add142beaedf83b.
---
django_airavata/apps/admin/vue.config.js | 5 ++---
django_airavata/apps/dataparsers/vue.config.js | 5 ++---
django_airavata/apps/groups/vue.config.js | 5 ++---
django_airavata/apps/workspace/vue.config.js | 5 ++---
django_airavata/static/common/vue.config.js | 3 +--
docs/dev/new_django_app.md | 7 ++-----
6 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/django_airavata/apps/admin/vue.config.js b/django_airavata/apps/admin/vue.config.js
index 3ca614a..f3e326d 100644
--- a/django_airavata/apps/admin/vue.config.js
+++ b/django_airavata/apps/admin/vue.config.js
@@ -1,13 +1,12 @@
const BundleTracker = require("webpack-bundle-tracker");
const path = require("path");
-const staticDir = process.env.STATIC_ROOT ? process.env.STATIC_ROOT : "./static/";
module.exports = {
publicPath:
process.env.NODE_ENV === "development"
? "http://localhost:9000/static/django_airavata_admin/dist/"
: "/static/django_airavata_admin/dist/",
- outputDir: staticDir + "django_airavata_admin/dist",
+ outputDir: "./static/django_airavata_admin/dist",
css: {
loaderOptions: {
postcss: {
@@ -21,7 +20,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "django_airavata_admin/dist/"
+ path: "./static/django_airavata_admin/dist/"
})
],
optimization: {
diff --git a/django_airavata/apps/dataparsers/vue.config.js b/django_airavata/apps/dataparsers/vue.config.js
index 1b62467..bc51dd7 100644
--- a/django_airavata/apps/dataparsers/vue.config.js
+++ b/django_airavata/apps/dataparsers/vue.config.js
@@ -1,13 +1,12 @@
const BundleTracker = require("webpack-bundle-tracker");
const path = require("path");
-const staticDir = process.env.STATIC_ROOT ? process.env.STATIC_ROOT : "./static/";
module.exports = {
publicPath:
process.env.NODE_ENV === "development"
? "http://localhost:9000/static/django_airavata_dataparsers/dist/"
: "/static/django_airavata_dataparsers/dist/",
- outputDir: staticDir + "django_airavata_dataparsers/dist",
+ outputDir: "./static/django_airavata_dataparsers/dist",
pages: {
'parser-details': './static/django_airavata_dataparsers/js/entry-parser-details',
'parser-list': './static/django_airavata_dataparsers/js/parser-listing-entry-point.js',
@@ -26,7 +25,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "django_airavata_dataparsers/dist/"
+ path: "./static/django_airavata_dataparsers/dist/"
})
],
optimization: {
diff --git a/django_airavata/apps/groups/vue.config.js b/django_airavata/apps/groups/vue.config.js
index ef3b4c3..5fdc24f 100644
--- a/django_airavata/apps/groups/vue.config.js
+++ b/django_airavata/apps/groups/vue.config.js
@@ -1,13 +1,12 @@
const BundleTracker = require("webpack-bundle-tracker");
const path = require("path");
-const staticDir = process.env.STATIC_ROOT ? process.env.STATIC_ROOT : "./static/";
module.exports = {
publicPath:
process.env.NODE_ENV === "development"
? "http://localhost:9000/static/django_airavata_groups/dist/"
: "/static/django_airavata_groups/dist/",
- outputDir: staticDir + "django_airavata_groups/dist",
+ outputDir: "./static/django_airavata_groups/dist",
pages: {
'group-list': './static/django_airavata_groups/js/group-listing-entry-point.js',
'group-create': './static/django_airavata_groups/js/group-create-entry-point.js',
@@ -26,7 +25,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "django_airavata_groups/dist/"
+ path: "./static/django_airavata_groups/dist/"
})
],
optimization: {
diff --git a/django_airavata/apps/workspace/vue.config.js b/django_airavata/apps/workspace/vue.config.js
index 92f8662..deef681 100644
--- a/django_airavata/apps/workspace/vue.config.js
+++ b/django_airavata/apps/workspace/vue.config.js
@@ -1,13 +1,12 @@
const BundleTracker = require("webpack-bundle-tracker");
const path = require("path");
-const staticDir = process.env.STATIC_ROOT ? process.env.STATIC_ROOT : "./static/";
module.exports = {
publicPath:
process.env.NODE_ENV === "development"
? "http://localhost:9000/static/django_airavata_workspace/dist/"
: "/static/django_airavata_workspace/dist/",
- outputDir: staticDir + "django_airavata_workspace/dist",
+ outputDir: "./static/django_airavata_workspace/dist",
pages: {
'project-list': './static/django_airavata_workspace/js/entry-project-list',
'dashboard': './static/django_airavata_workspace/js/entry-dashboard',
@@ -31,7 +30,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "django_airavata_workspace/dist/"
+ path: "./static/django_airavata_workspace/dist/"
})
],
optimization: {
diff --git a/django_airavata/static/common/vue.config.js b/django_airavata/static/common/vue.config.js
index 237b081..82ac222 100644
--- a/django_airavata/static/common/vue.config.js
+++ b/django_airavata/static/common/vue.config.js
@@ -1,5 +1,4 @@
const BundleTracker = require("webpack-bundle-tracker");
-const staticDir = process.env.STATIC_ROOT ? process.env.STATIC_ROOT + "common/" : "./";
module.exports = {
publicPath: "/static/common/dist/",
@@ -12,7 +11,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "dist/"
+ path: "./dist/"
})
]
}
diff --git a/docs/dev/new_django_app.md b/docs/dev/new_django_app.md
index f17d465..8c9118e 100644
--- a/docs/dev/new_django_app.md
+++ b/docs/dev/new_django_app.md
@@ -285,16 +285,13 @@ Now add a `vue.config.js` file too:
```javascript
const BundleTracker = require("webpack-bundle-tracker");
const path = require("path");
-const staticDir = process.env.STATIC_ROOT
- ? process.env.STATIC_ROOT
- : "./static/";
module.exports = {
publicPath:
process.env.NODE_ENV === "development"
? "http://localhost:9000/static/django_airavata_myapp/dist/"
: "/static/django_airavata_myapp/dist/",
- outputDir: staticDir + "django_airavata_myapp/dist",
+ outputDir: "./static/django_airavata_myapp/dist",
pages: {
home: "./static/django_airavata_myapp/js/entry-home"
// additional entry points go here ...
@@ -312,7 +309,7 @@ module.exports = {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: staticDir + "django_airavata_myapp/dist/"
+ path: "./static/django_airavata_myapp/dist/"
})
],
optimization: {