kopia lustrzana https://github.com/OpenDroneMap/WebODM
Upgraded webpack to 4, minor changes to OAM plugin
rodzic
f9ad74cdcb
commit
f8d39f960c
6
.babelrc
6
.babelrc
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"presets": ["es2015", "react"],
|
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
||||||
|
|
||||||
"env": {
|
"env": {
|
||||||
"test": {
|
"test": {
|
||||||
"plugins": ["syntax-class-properties",
|
"plugins": ["@babel/syntax-class-properties",
|
||||||
"transform-class-properties"]
|
"@babel/proposal-class-properties"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ WORKDIR /webodm/nodeodm/external/node-OpenDroneMap
|
||||||
RUN npm install --quiet
|
RUN npm install --quiet
|
||||||
|
|
||||||
WORKDIR /webodm
|
WORKDIR /webodm
|
||||||
RUN npm install --quiet -g webpack@3.11.0 && npm install --quiet && webpack
|
RUN npm install --quiet -g webpack webpack-cli && npm install --quiet && webpack
|
||||||
RUN python manage.py collectstatic --noinput
|
RUN python manage.py collectstatic --noinput
|
||||||
|
|
||||||
RUN rm /webodm/webodm/secret_key.py
|
RUN rm /webodm/webodm/secret_key.py
|
||||||
|
|
|
@ -355,7 +355,7 @@ Then:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
sudo npm install -g webpack@3.11.0
|
sudo npm install -g webpack webpack-cli
|
||||||
npm install
|
npm install
|
||||||
webpack
|
webpack
|
||||||
python manage.py collectstatic --noinput
|
python manage.py collectstatic --noinput
|
||||||
|
|
|
@ -276,9 +276,6 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="/api/"><i class="fa fa-book fa-fw"></i> {% trans 'API' %}</a>
|
<a href="/api/"><i class="fa fa-book fa-fw"></i> {% trans 'API' %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a href="http://docs.webodm.org" target="_blank"><i class="fa fa-life-saver fa-fw"></i> {% trans 'Documentation' %}</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% if user.is_staff %}
|
{% if user.is_staff %}
|
||||||
<li>
|
<li>
|
||||||
|
|
27
package.json
27
package.json
|
@ -21,29 +21,31 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/OpenDroneMap/WebODM#readme",
|
"homepage": "https://github.com/OpenDroneMap/WebODM#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@babel/core": "^7.0.0-beta.54",
|
||||||
|
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.54",
|
||||||
|
"@babel/plugin-syntax-class-properties": "^7.0.0-beta.54",
|
||||||
|
"@babel/preset-env": "^7.0.0-beta.54",
|
||||||
|
"@babel/preset-react": "^7.0.0-beta.54",
|
||||||
"async": "^2.1.2",
|
"async": "^2.1.2",
|
||||||
"babel-core": "^6.17.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-jest": "^21.0.0",
|
"babel-jest": "^23.4.0",
|
||||||
"babel-loader": "^6.2.5",
|
"babel-loader": "^8.0.0-beta.4",
|
||||||
"babel-plugin-syntax-class-properties": "^6.13.0",
|
"canvas": "^1.6.11",
|
||||||
"babel-plugin-transform-class-properties": "^6.18.0",
|
|
||||||
"babel-preset-es2015": "^6.24.1",
|
|
||||||
"babel-preset-react": "^6.24.1",
|
|
||||||
"clipboard": "^1.7.1",
|
"clipboard": "^1.7.1",
|
||||||
"css-loader": "^0.25.0",
|
"css-loader": "^0.25.0",
|
||||||
"d3": "^3.5.5",
|
"d3": "^3.5.5",
|
||||||
"enzyme": "^3.3.0",
|
"enzyme": "^3.3.0",
|
||||||
"enzyme-adapter-react-16": "^1.1.1",
|
"enzyme-adapter-react-16": "^1.1.1",
|
||||||
"extract-text-webpack-plugin": "^3.0.0",
|
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||||
"fbemitter": "^2.1.1",
|
"fbemitter": "^2.1.1",
|
||||||
"file-loader": "^0.9.0",
|
"file-loader": "^0.9.0",
|
||||||
"gl-matrix": "^2.3.2",
|
"gl-matrix": "^2.3.2",
|
||||||
"history": "^4.7.2",
|
"history": "^4.7.2",
|
||||||
"immutability-helper": "^2.0.0",
|
"immutability-helper": "^2.0.0",
|
||||||
"jest": "^21.0.1",
|
"jest": "^23.4.1",
|
||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"leaflet": "^1.3.1",
|
"leaflet": "^1.3.1",
|
||||||
"node-sass": "^3.10.1",
|
"node-sass": "^4.9.2",
|
||||||
"object.values": "^1.0.3",
|
"object.values": "^1.0.3",
|
||||||
"proj4": "^2.4.3",
|
"proj4": "^2.4.3",
|
||||||
"qrcode.react": "^0.7.2",
|
"qrcode.react": "^0.7.2",
|
||||||
|
@ -54,13 +56,14 @@
|
||||||
"react-router-dom": "^4.1.1",
|
"react-router-dom": "^4.1.1",
|
||||||
"react-test-renderer": "^15.6.1",
|
"react-test-renderer": "^15.6.1",
|
||||||
"regenerator-runtime": "^0.11.0",
|
"regenerator-runtime": "^0.11.0",
|
||||||
"sass-loader": "^4.0.2",
|
"sass-loader": "^7.0.3",
|
||||||
"sinon": "^4.0.0",
|
"sinon": "^4.0.0",
|
||||||
"statuses": "^1.3.1",
|
"statuses": "^1.3.1",
|
||||||
"style-loader": "^0.13.1",
|
"style-loader": "^0.13.1",
|
||||||
"tween.js": "^16.6.0",
|
"tween.js": "^16.6.0",
|
||||||
|
"uglifyjs-webpack-plugin": "^1.2.7",
|
||||||
"url-loader": "^0.5.7",
|
"url-loader": "^0.5.7",
|
||||||
"webpack": "^3.3.0",
|
"webpack": "^4.16.2",
|
||||||
"webpack-bundle-tracker": "0.0.93",
|
"webpack-bundle-tracker": "0.0.93",
|
||||||
"webpack-livereload-plugin": "^0.9.0"
|
"webpack-livereload-plugin": "^0.9.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Plugin(PluginBase):
|
||||||
form = TokenForm(request.POST)
|
form = TokenForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
ds.set_string('token', form.cleaned_data['token'])
|
ds.set_string('token', form.cleaned_data['token'])
|
||||||
messages.success(request, 'Token updated. Tasks can now be shared to OpenAerialMap.')
|
messages.success(request, 'Token updated.')
|
||||||
|
|
||||||
form = TokenForm(initial={'token': ds.get_string('token', default="")})
|
form = TokenForm(initial={'token': ds.get_string('token', default="")})
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3><i class="oam-icon fa"></i> OpenAerialMap</h3>
|
<h3><i class="oam-icon fa"></i> OpenAerialMap</h3>
|
||||||
<p>OpenAerialMap (OAM) is a set of tools for searching, sharing, and using openly licensed satellite and unmanned aerial vehicle (UAV) imagery.</p>
|
|
||||||
|
|
||||||
{% if not form.token.value %}
|
|
||||||
|
|
||||||
|
{% if not form.token.value %}
|
||||||
|
<p>OpenAerialMap (OAM) is a set of tools for searching, sharing, and using openly licensed satellite and unmanned aerial vehicle (UAV) imagery.</p>
|
||||||
<p>To share your results with OAM:</p>
|
<p>To share your results with OAM:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Sign-in from <a href="https://map.openaerialmap.org" target="_blank">map.openaerialmap.org</a>.</li>
|
<li>Sign-in from <a href="https://map.openaerialmap.org" target="_blank">map.openaerialmap.org</a>.</li>
|
||||||
|
@ -13,6 +15,8 @@
|
||||||
<li>Copy and paste the token in the form below.</li>
|
<li>Copy and paste the token in the form below.</li>
|
||||||
</ol>
|
</ol>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<p><b>You are all set!</b> To share a task, select it from the <a href="/dashboard/">dashboard</a> and press the <b>Share to OAM</b> button.</p>
|
||||||
|
<p>Your submissions can be managed from your OAM profile page.</p>
|
||||||
<p><a class="btn btn-sm btn-default" href="https://map.openaerialmap.org" target="_blank"><i class="fa fa-external-link"></i> Go To OpenAerialMap</a></p>
|
<p><a class="btn btn-sm btn-default" href="https://map.openaerialmap.org" target="_blank"><i class="fa fa-external-link"></i> Go To OpenAerialMap</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
let path = require("path");
|
let path = require("path");
|
||||||
let webpack = require('webpack');
|
|
||||||
let BundleTracker = require('webpack-bundle-tracker');
|
let BundleTracker = require('webpack-bundle-tracker');
|
||||||
let ExtractTextPlugin = require('extract-text-webpack-plugin');
|
let ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
let LiveReloadPlugin = require('webpack-livereload-plugin');
|
let LiveReloadPlugin = require('webpack-livereload-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
mode: 'production',
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
|
@ -37,11 +37,14 @@ module.exports = {
|
||||||
{
|
{
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
query: {
|
query: {
|
||||||
"plugins": [
|
plugins: [
|
||||||
'syntax-class-properties',
|
'@babel/syntax-class-properties',
|
||||||
'transform-class-properties'
|
'@babel/proposal-class-properties'
|
||||||
],
|
],
|
||||||
presets: ['es2015', 'react']
|
presets: [
|
||||||
|
'@babel/preset-env',
|
||||||
|
'@babel/preset-react'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Ładowanie…
Reference in New Issue