You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2016/06/23 08:53:18 UTC
[04/14] incubator-taverna-databundle-viewer git commit: Add files via
upload
Add files via upload
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/commit/043417a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/tree/043417a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/diff/043417a9
Branch: refs/heads/master
Commit: 043417a9318fdc6848f4a33b3621c61742791240
Parents: 6721942
Author: PCStefan <pa...@gmail.com>
Authored: Mon Jun 6 12:52:23 2016 +0100
Committer: PCStefan <pa...@gmail.com>
Committed: Mon Jun 6 12:52:23 2016 +0100
----------------------------------------------------------------------
app/controllers/data_bundles_controller.rb | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/043417a9/app/controllers/data_bundles_controller.rb
----------------------------------------------------------------------
diff --git a/app/controllers/data_bundles_controller.rb b/app/controllers/data_bundles_controller.rb
index a1939d1..55adff6 100644
--- a/app/controllers/data_bundles_controller.rb
+++ b/app/controllers/data_bundles_controller.rb
@@ -34,12 +34,15 @@ class DataBundlesController < ApplicationController
@data_bundle = @data_bundle.decorate
respond_to do |format|
format.html
- format.json { render json: @data_bundle.to_json }
+ # format.json { render json: @data_bundle.to_json }
+ format.json { render :json => {:workflow => @data_bundle.to_dataHashObject,
+ :provenance => @data_bundle.provenanceMain } }
end
end
# GET /data_bundles/1/edit
def edit
+ redirect_to data_bundles_path, notice: "Success"
end
# POST /data_bundles
@@ -68,6 +71,11 @@ class DataBundlesController < ApplicationController
redirect_to data_bundles_url, notice: 'Data bundle was successfully destroyed.'
end
+ def redirectToLogin
+ redirect_to new_user_session_path, notice: 'Data bundle was successfully created.'
+ end
+ helper_method :redirectToLogin
+
private
# Use callbacks to share common setup or constraints between actions.
def set_data_bundle
@@ -77,5 +85,5 @@ class DataBundlesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def data_bundle_params
params.require(:data_bundle).permit(:file, :name)
- end
+ end
end