Skip to content

Commit

Permalink
global: small fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Dinos Kousidis <[email protected]>
  • Loading branch information
Dinos Kousidis committed Jan 17, 2018
1 parent 80f64fc commit 91c95bb
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 44 deletions.
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

2 changes: 0 additions & 2 deletions b2share/modules/files/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from __future__ import absolute_import, print_function

from .cli import files as files_cmd
# from .views import blueprint


class B2ShareFiles(object):
Expand All @@ -41,7 +40,6 @@ def init_app(self, app):
"""Flask application initialization."""
self.init_config(app)
app.cli.add_command(files_cmd)
# app.register_blueprint(blueprint)
app.extensions['b2share-files'] = self

def init_config(self, app):
Expand Down
2 changes: 1 addition & 1 deletion b2share/modules/files/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


class B2ShareFileStorage(PyFSFileStorage):
"""Base class for B2Share file storage interface to files."""
"""Class for B2Share file storage interface to files."""
def send_file(self, filename, mimetype=None, restricted=True,
checksum=None, trusted=False, chunk_size=None):
"""Redirect to the actual pid of the file."""
Expand Down
10 changes: 0 additions & 10 deletions tests/b2share_unit_tests/files/test_b2share_storage.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# create new storage class for invenio-files-rest
# which disables almost everything but redirects when getting a file
# (send_file)

# create the FileInstance with the planted PID
# - and the required ObjectVersion

# then add the REST API enable the blueprints
# - > access it and see if it redirects

# -*- coding: utf-8 -*-
#
# This file is part of EUDAT B2Share.
Expand Down
4 changes: 0 additions & 4 deletions webui/src/components/editfiles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,9 @@ export const EditFiles = React.createClass({
var external_pids = metadata.external_pids;
for(var i=0; i < this.props.files.length; i++){
var _file = this.props.files[i];
console.log('_file:', _file);
if(Boolean(external_pids)){
for(var j=0; j < external_pids.length; j++){
var external_pid = external_pids[j];
console.log('file key match: ', _file.key);
console.log('external_pid key match: ', external_pid.key);
if(_file.key == external_pid.key){
_file.b2safe = true;
}
Expand Down Expand Up @@ -697,7 +694,6 @@ export const FileRecordRow = React.createClass({
render() {
let file = this.props.file;
file = file.toJS ? file.toJS() : file;
// const downloads = this.state.downloads[file.key || file.name] || 0;
const allowDetails = file.checksum || file.ePIC_PID;
const stateMark = allowDetails ? (this.state.open ? "down":"right") : "";

Expand Down
2 changes: 1 addition & 1 deletion webui/src/components/editrecord.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ const EditRecord = React.createClass({
const plugins = schema.getIn(['b2share', 'plugins']);

function renderBigFieldTree([pid, pschema]) {
const datapath = schemaID ? ['community_specific', schemaID, pid] : [pid];
const datapath = schemaID ? ['community_specific', schemaID, pid] : [pid];
const f = this.renderFieldTree(pid, pschema, datapath);
if (!f) {
return false;
Expand Down
19 changes: 0 additions & 19 deletions webui/src/data/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -889,25 +889,6 @@ class ServerCache {
});
}

// Get the number of downloads for each file
getFileStatistics(bucketID, successFn) {
var data = {
"fileDownloads": {
"stat": "bucket-file-download-total",
"params": {
"bucket_id": bucketID,
}
}
};
ajaxPost({
url: apiUrls.statistics(),
params: data,
successFn: response => {
successFn(response.fileDownloads);
},
});
}

getB2HandlePidInfo(file_pid, successFn){
ajaxGet({
url: apiUrls.b2handle_pid_info(file_pid),
Expand Down

0 comments on commit 91c95bb

Please sign in to comment.