dashboard redesign
[unfold.git] / portal / templates / fed4fire / fed4fire_home-view.html
1 {% extends "layout_base.html" %}
2 {% load portal_filters %}
3
4 {% block content %}
5 <!-- <div class="row">
6 {% widget '_widget-news.html' %}
7 </div> -->
8 {% if username %}
9
10 {% block head %} 
11 <script type="text/javascript" src="https://java.com/js/dtjava.js"></script>
12 {% endblock head %}
13
14 {% widget "_widget-no_credentials.html" %}
15 <div class="container dashboard">
16         <div class="row">
17             <div class="col-md-12">
18         {%if 'no_creds'  in user_cred %}
19         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
20         {%endif%}
21         {%if 'creds_expired'  in user_cred %}
22         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">EXPIRED CREDENTIALS</a> Please delegate again your credentials to the portal!</p>
23     {%endif%}
24         </div>
25     </div>
26     <div class="row">
27         <div class="col-sm-4">
28             <h3>
29                 <a href="/portal/slice_request"><img src="{{ STATIC_URL }}img/icon_slices_small.png" alt="" /></a>EXPERIMENT
30             </h3>
31             
32             <div>
33                 Your projects and slices
34                 <span title="A <b>slice</b> is a set of testbed resources on which you can conduct an experiment. 
35                 Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
36                 However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
37                 those slices will not appear here. <br /><br /> A <b>project</b> is a sub-authority under the responsability of your institution gathering users, 
38                 who will be able to create slices for their experiments." class="glyphicon glyphicon-info-sign">&nbsp;</span> 
39             </div>
40             
41             <div>   
42                 <div id="home-project-tree"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
43             </div>
44             <div>
45                 <span class="glyphicon glyphicon-plus"></span> <a href="/portal/slice_request/">Create slice</a>
46                 <span class="glyphicon glyphicon-cog"></span> <a href="/portal/project_request/">Create/Join project</a>
47             </div>
48             
49             <div>
50                 <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
51                     <a class="btn btn-primary" id="webstart-button" style="width: 150px;" 
52                     href='http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp'
53                     title="Click here to start your experiment with jFed">
54                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>
55             </div>
56         </div>
57         <div class="col-sm-4">
58             <div class="row">
59                 <h3>
60                     <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="" /></a>ACCOUNT
61                 </h3>
62                 
63                 <div>
64                     <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
65                 </div>
66             <div>
67                 {% if person.last_name %}
68                     {{person.first_name}} {{person.last_name}}<br />
69                 {% endif %}
70                 <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
71             </div>
72             </div>
73             <div class="row">
74                 <h3>
75                     <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /></a>MANAGEMENT
76                 </h3>
77                
78                 <div>
79                     <span class="glyphicon glyphicon-ok"></span> <a href="/portal/institution#requests">Validate Requests</a>
80                 </div>
81             </div>
82         </div>
83         <div class="col-sm-4">
84             <div class="row">
85                 <h3>
86                     <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="" /></a>SUPPORT 
87                 </h3>
88                 <p>
89                     <span class="glyphicon glyphicon-envelope"></span> <a href="/portal/contact/">Contact</a>
90                 </p>
91                 <p>
92                     <span class="glyphicon glyphicon-stats"></span> <a target="_blank" href="https://flsmonitor.fed4fire.eu">Testbeds' status</a>
93                     </br />
94                     <span class="glyphicon glyphicon-stats"></span> <a href="/portal/reputation">Testbeds' reputation</a>
95                 </p>
96            
97             </div>
98             
99             
100         </div>
101     </div>
102 </div>
103 {% else %}
104 <div class="container-fluid home">
105         <div class="">
106                 <div class="col-sm-2"></div>
107                 <div class="col-sm-4 slogan">
108                         <h2>
109                                 Fed4FIRE Portal
110                         </h2>
111                         <h3>
112                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the Fed4FIRE federation.
113                         </h3>
114                         <h3>
115                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
116                         </h3>
117                 </div>
118                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
119                         <div class="row">
120                                 {% widget '_widget-login-user.html' %}
121                         </div>
122                 </div>
123                 <div class="col-sm-1"></div>
124         </div>
125 </div>
126 {% endif %}
127
128
129 <script type="text/javascript">
130         $(document).ready(function() {
131         $('#webstart-button').click(function(){
132             var platform8 = new dtjava.Platform({javafx: '8+', jvm: '1.8+'});
133             var config = {
134                 java8_jnlp: 'http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp',
135                 java7_jnlp: 'http://jfed.iminds.be/releases/r2269/webstart/experimenter/jfed-experimenter.jnlp'
136             };
137             var certkey = "{{jfed_identity}}";
138
139             dtjava.launch({url: config.java8_jnlp, params: {'login-certificate-string' : certkey } } , platform8, {});
140             //launchjFed();
141         });
142             {%if 'no_creds' in user_cred or 'creds_expired' in user_cred %}
143         localStorage.clear();
144         $.post("/cache/clear/", function( data ) {
145         });
146         {% endif %}
147                 $('a.home-tab').click(function() {
148                         $('ul.nav-tabs li').removeClass('active');
149                         $(this).parent().addClass('active');
150                         $('div.home-panel').hide();
151                         $('div#'+$(this).data('panel')).show();
152                 });
153                 
154 });
155 </script>
156
157 <!--
158 for jfed tool
159 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
160 <script>
161         function launchApplication(jnlpfile) {
162         dtjava.launch(
163                 { url : jnlpfile },
164             {
165                 javafx : '2.2+',
166                 toolkit: 'swing'
167                 },
168                 {}
169         );
170         return false;
171      }
172 </script>
173 -->
174
175 {% endblock %}