Skip to content

Commit cc5b2b7

Browse files
committed
UI - remove download option from admin
1 parent 0a750a2 commit cc5b2b7

File tree

3 files changed

+2
-35
lines changed

3 files changed

+2
-35
lines changed

src/client/src/pages/Admin.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import TableRow from '@material-ui/core/TableRow';
1010
import { withStyles } from '@material-ui/core/styles';
1111
import LinearProgress from '@material-ui/core/LinearProgress';
1212
import CircularProgress from '@material-ui/core/CircularProgress';
13-
import { UploadForm, DownloadForm, ExecuteForm } from '../components/Forms';
13+
import { UploadForm, ExecuteForm } from '../components/Forms';
1414
import _ from 'lodash';
1515

1616

@@ -151,9 +151,6 @@ class Admin extends Component {
151151
<UploadForm filesInput={this.state.filesInput} handleUpload={this.handleUpload}/>
152152
</TabPanel>
153153
<TabPanel value={this.state.activeIndex} index={1}>
154-
<DownloadForm />
155-
</TabPanel>
156-
<TabPanel value={this.state.activeIndex} index={2}>
157154
<ExecuteForm handleExecute={this.handleExecute}/>
158155
</TabPanel>
159156
</div>
@@ -197,7 +194,6 @@ class Admin extends Component {
197194
<Paper style={{padding: 5}}>
198195
<Tabs value={this.state.activeIndex} onChange={this.handleIndexChange}>
199196
<Tab label="Upload" />
200-
<Tab label="Download" />
201197
<Tab label="Execute" />
202198
</Tabs>
203199
{currentTabWithState}

src/server/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ COPY . .
1919
RUN mkdir /app/static \
2020
/app/static/raw_data \
2121
/app/static/raw_data/current \
22-
/app/static/output \
23-
/app/static/output/reports \
2422
/app/static/logs \
2523
/app/static/zipped
2624

src/server/api/admin_api.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
from sqlalchemy.sql import text
77
from pipeline import flow_script
88
from config import engine
9-
from flask import send_file, request, redirect, jsonify, current_app, abort
9+
from flask import request, redirect, jsonify, current_app, abort
1010
from api.file_uploader import validate_and_arrange_upload
1111
from config import (
1212
RAW_DATA_PATH,
13-
OUTPUT_PATH,
1413
CURRENT_SOURCE_FILES_PATH,
15-
ZIPPED_FILES,
1614
LOGS_PATH,
1715
)
1816

@@ -41,31 +39,6 @@ def uploadCSV():
4139
return redirect("/")
4240

4341

44-
@admin_api.route("/api/files/<destination>", methods=["GET"])
45-
def files(destination):
46-
current_app.logger.info("Start returning zip of all data")
47-
if request.args.get("download_current_btn"):
48-
source = RAW_DATA_PATH + destination
49-
if request.args.get("download_archived_btn"):
50-
source = RAW_DATA_PATH
51-
if request.args.get("download_output_btn"):
52-
source = OUTPUT_PATH
53-
54-
zip_name = destination + "_data_out"
55-
56-
try:
57-
current_app.logger.info(
58-
shutil.make_archive(ZIPPED_FILES + zip_name, "zip", source)
59-
)
60-
return send_file(
61-
ZIPPED_FILES + zip_name + ".zip",
62-
as_attachment=True,
63-
attachment_filename=zip_name + ".zip",
64-
)
65-
except Exception as e:
66-
return str(e)
67-
68-
6942
@admin_api.route("/api/listCurrentFiles", methods=["GET"])
7043
def list_current_files():
7144
result = None

0 commit comments

Comments
 (0)