From d3ae93aba7e0b067b950c7faaa36f205f1500803 Mon Sep 17 00:00:00 2001
From: Stefano Alberto Russo <stefano.russo@gmail.com>
Date: Mon, 29 Mar 2021 23:47:22 +0200
Subject: [PATCH] Integrated file manager with the platform.

---
 .../rosetta/core_app/templates/files.html     | 27 +++++++++++++++++++
 .../core_app/templates/navigation.html        |  4 ++-
 .../webapp/code/rosetta/core_app/views.py     | 11 +++++++-
 services/webapp/code/rosetta/urls.py          |  1 +
 4 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 services/webapp/code/rosetta/core_app/templates/files.html

diff --git a/services/webapp/code/rosetta/core_app/templates/files.html b/services/webapp/code/rosetta/core_app/templates/files.html
new file mode 100644
index 0000000..6790061
--- /dev/null
+++ b/services/webapp/code/rosetta/core_app/templates/files.html
@@ -0,0 +1,27 @@
+{% load static %} 
+{% include "header.html" %}
+{% include "navigation.html" with main_path='/main/' %}
+
+<br/>
+<br/>
+
+<div class="container" style="height:75%;">
+  <div class="dashboard" style="height:100%;">
+    <div class="span8 offset2" style="height:100%;">
+      
+
+      <h1>Files</h1>
+
+      <hr/>
+
+
+      <iframe src="/static/RichFilemanager/index.html" style="overflow:hidden;height:100%;width:100%; border: 1px solid #c0c0c0" height="100%" width="100%"></iframe>
+    
+    
+    </div>
+  </div>
+</div>
+
+{% include "footer.html" %}
+
+
diff --git a/services/webapp/code/rosetta/core_app/templates/navigation.html b/services/webapp/code/rosetta/core_app/templates/navigation.html
index f8885d2..4696610 100644
--- a/services/webapp/code/rosetta/core_app/templates/navigation.html
+++ b/services/webapp/code/rosetta/core_app/templates/navigation.html
@@ -33,7 +33,9 @@
             <li>
                 <a href="/tasks" onclick = $("#menu-close").click(); >Tasks</a>
             </li>
-
+            <li>
+                <a href="/files" onclick = $("#menu-close").click(); >Files</a>
+            </li>
        
             {% else %}
             <li>
diff --git a/services/webapp/code/rosetta/core_app/views.py b/services/webapp/code/rosetta/core_app/views.py
index 1b2014e..1939a4b 100644
--- a/services/webapp/code/rosetta/core_app/views.py
+++ b/services/webapp/code/rosetta/core_app/views.py
@@ -179,11 +179,12 @@ def register_view(request):
 
 
 
-
 @public_view
 def entrypoint(request):
     return HttpResponseRedirect('/main/')
 
+
+
 @public_view
 def main_view(request):
 
@@ -919,7 +920,15 @@ def sharable_link_handler(request, id):
     
 
 
+#=========================
+#  File manager
+#=========================
+@public_view
+def files_view(request):
 
+    # Set data & render
+    data = {}
+    return render(request, 'files.html', {'data': data})
 
 
 
diff --git a/services/webapp/code/rosetta/urls.py b/services/webapp/code/rosetta/urls.py
index f6f48da..cd995c3 100644
--- a/services/webapp/code/rosetta/urls.py
+++ b/services/webapp/code/rosetta/urls.py
@@ -54,6 +54,7 @@ urlpatterns = [
     url(r'^edit_computing_conf/$', core_app_views.edit_computing_conf),
     url(r'^containers/$', core_app_views.containers),
     url(r'^add_container/$', core_app_views.add_container),
+    url(r'^files/$', core_app_views.files_view),
 
     # Sharable link for tasks
     url(r'^t/(?P<id>\w{0,36})/$', core_app_views.sharable_link_handler),
-- 
GitLab