Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.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 <!-- Modal- No credentials -->
10 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
11             <div class="modal-dialog">
12                 <div class="modal-content">
13                     <div class="modal-header">
14                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
15                             <h4 class="modal-title" id="myModalLabel">No credentials are delegated to the portal</h4>
16                     </div>
17                     <div class="modal-body" style="text-align:justify;">
18                                         <p>You are getting this message for any of the following reasons:</p>
19                                         <ul>
20                                                 <li>If your account is still pending for validation</li>
21                                                 <li>If you press the "Clear Credentials" button</li>
22                                                 <li>If you "Generate a new key pair"</li>
23                                                 <li>If a new slice is added to your account</li>
24                                         </ul>
25                                         <p>Unless your account has not yet been validated, it is sufficient to refresh the page or go back to the home page. 
26                                                 The portal will then regenerate your credentials. In some cases it may take more time than usual. If nothing works, 
27                                                 then please logout and login back into to the portal.
28                                         </p>
29                                         <h3>Manual delegation of credentials</h3>
30                                                 <p>
31                                                         You have selected upon sign-up to upload your public key. As you have uploaded your own public key, 
32                                                         the portal can no longer generate your credentials automatically. In order to have your credentials 
33                                                         delegated to the portal, please follow these instructions:
34                                                 </p>
35                                                 <ul>
36                                                         <li>Your account must first be validated by the manager of your organization.</li>
37                                                         <li>In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to
38                                                                 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a></li>
39                                                 </ul>
40                                         </p>
41                                         <h3>Contact support</h3>
42                                         <p>If you don't have the above mentioned cases and still have this message, please  <a href="/contact/" target="_blank">contact us</a>.</p>
43                     </div>
44                     <div class="modal-footer">
45                         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
46                     </div>
47                 </div>
48             </div>
49 </div>
50 <div class="container dashboard">
51         <div class="row">
52         {%if 'no_creds'  in user_cred %}
53         <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
54         {%endif%}
55         {%if 'creds_expired'  in user_cred %}
56         <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>
57     {%endif%}
58                 {% if pi %}
59                 <div class="col-md-3">
60                         <h3>
61                                 EXPERIMENT
62                         </h3>
63                         <div>
64                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
65                         </div>
66                         <div>
67                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
68                         </div>
69                         <div>
70                                 <p><strong>Your slices </strong>
71                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
72                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
73                                         However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
74                                         those slices will not appear here."
75                                         class="glyphicon glyphicon-info-sign">
76                                 </span>
77
78                                 </p>
79                         </div>
80                         <div>   
81                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
82                         </div>
83                         <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
84                         <a class="btn btn-primary" style="width: 150px;" 
85                     href='http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp'
86                                         title="Click here to start your experiment with jFed" 
87                                         onclick="return  launchApplication('http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp');">
88                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>
89                 </div>
90                 <div class="col-md-3">
91                         <h3>MANAGEMENT</h3>
92                         <div>
93                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
94                         </div>
95                         <div>
96                                 <button id="projectrequestbtn" type="button" class="btn btn-default" style="width:165px;"><span class="glyphicon glyphicon-plus"></span> Join Project</button>
97                         </div>
98                         <div>
99                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
100                         </div>
101                         <div>
102                                 <p><strong>Your projects </strong>
103                                         <span title="A project is a sub-authority under the responsability of your institution gathering users, who will be able to create slices for their experiments."
104                                         class="glyphicon glyphicon-info-sign">
105                                 </span>
106                                 </p>
107                         </div>
108                         <div>   
109                                 <div id="home-project-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
110                         </div>
111
112                 </div>
113                 <div class="col-md-3">
114                         <h3>
115                                 SUPPORT
116                         </h3>
117                         <div>
118                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
119                         </div>
120                         <div>
121                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
122                         </div>
123                         <p></p>
124                         <div>
125                         <button id="statbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats" style="margin-right: 10px;"></span>Testbeds' status</button>
126                         </div>
127                         <div>
128                         <button id="repbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' reputation</button>
129                         </div>
130                 </div>
131                 
132                 <div class="col-md-3">
133                         <h3>
134                                 ACCOUNT
135                         </h3>
136                         <div>
137                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
138                         </div>
139                         <div>
140                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
141                         </div>
142                         <div>
143                                 {% if person.last_name %}
144                                         {{person.first_name}} {{person.last_name}}<br />
145                                 {% endif %}
146                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
147                 </div>
148                 </div>
149         </div>
150         {%else%}
151         <div class="row">
152                 <div class="col-md-4">
153                         <h3>
154                                 EXPERIMENT
155                         </h3>
156                         <div>
157                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
158                         </div>
159                         <div>
160                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
161                         </div>
162                         <div>
163                                 <p><strong>Your slices </strong>
164                                 <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
165                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
166                                         However, on the Fed4FIRE portal, you will only see slices that you have created through Fed4FIRE. If you have created slices elsewhere, 
167                                         those slices will not appear here."
168                                         class="glyphicon glyphicon-info-sign">
169                                 </span>
170                                 </p>
171                         </div>
172                         <div>   
173                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
174                         </div>
175                         {% if pending_slices %}
176                         <p><strong>Pending slices</strong>
177                         <span title="Slices that you have requested and are pending for validation by the contact person of your organization."
178                                 class="glyphicon glyphicon-info-sign">
179                         <ul>
180                         {% for slices in pending_slices %}
181                         <li>{{slices}}</li>
182                         {% endfor %}
183                         </ul>
184                         </span>
185                         </p>
186                         {%endif%}
187                         <h3 title="Some tools do their own slice creation and management.">Experiment now</h3>
188                         <a class="btn btn-primary" style="width: 150px;" 
189                     href='http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp'
190                                         title="Click here to start your experiment with jFed" 
191                                         onclick="return  launchApplication('http://jfed.iminds.be/releases/5.4-dev/r2289/webstart/experimenter/jfed-experimenter.jnlp');">
192                     <span class="glyphicon glyphicon-cloud"></span> jFed</a>    
193                 </div>
194                 <div class="col-md-4">
195                         <h3>
196                                 SUPPORT
197                         </h3>
198                         <div>
199                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
200                         </div>
201                         <div>
202                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
203                         </div>
204                         <p></p>
205                         <div>
206                         <button id="statbtn" type="button" style="width: 150px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' status</button>
207                         </div>
208                         <div>
209                         <button id="repbtn" type="button" style="width: 170px;" class="btn btn-default"><span class="glyphicon glyphicon-stats"></span>Testbeds' reputation</button>
210                         </div>
211                 </div>
212                 
213                 <div class="col-md-4">
214                         <h3>
215                                 ACCOUNT
216                         </h3>
217                         <div>
218                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
219                         </div>
220                         <div>
221                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
222                         </div>
223                         <div>
224                                 {% if person.last_name %}
225                                         {{person.first_name}} {{person.last_name}}<br />
226                                 {% endif %}
227                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
228                 </div>
229                 </div>
230         </div>
231         {%endif%}
232
233 </div>
234 {% else %}
235 <div class="container-fluid home">
236         <div class="">
237                 <div class="col-sm-2"></div>
238                 <div class="col-sm-4 slogan">
239                         <h2>
240                                 Fed4FIRE Portal
241                         </h2>
242                         <h3>
243                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the Fed4FIRE federation.
244                         </h3>
245                         <h3>
246                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
247                         </h3>
248                 </div>
249                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
250                         <div class="row">
251                                 {% widget '_widget-login-user.html' %}
252                         </div>
253                 </div>
254                 <div class="col-sm-1"></div>
255         </div>
256 </div>
257 {% endif %}
258
259
260 <script type="text/javascript">
261         $(document).ready(function() {
262                 $('a.home-tab').click(function() {
263                         $('ul.nav-tabs li').removeClass('active');
264                         $(this).parent().addClass('active');
265                         $('div.home-panel').hide();
266                         $('div#'+$(this).data('panel')).show();
267                 });
268                 $('button#validaterequestbtn').click(function() {
269                         window.location="/portal/institution#requests";
270                 });
271                 $('button#ticketbtn').click(function() {
272                         window.location="/portal/contact/";
273                 });
274                 $('button#statbtn').click(function() {
275                 window.location="https://flsmonitor.fed4fire.eu";
276                 });
277                  $('button#repbtn').click(function() {
278                 window.location="/portal/reputation";
279                  });
280                 $('button#signupbtn').click(function() {
281                         window.location="/portal/register/";
282                 });
283                 $('button#slicerequestbtn').click(function() {
284                         window.location="/portal/slice_request/";
285                 });
286                 $('button#projectrequestbtn').click(function() {
287                         window.location="/portal/project_request/";
288                 });
289
290         myslice.loadSlices();
291 });
292 </script>
293
294 <!--for jfed tool-->
295 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
296 <script>
297         function launchApplication(jnlpfile) {
298         dtjava.launch(
299                 { url : jnlpfile },
300             {
301                 javafx : '2.2+',
302                 toolkit: 'swing'
303                 },
304                 {}
305         );
306         return false;
307      }
308 </script>
309 {# widget "_widget-monitor.html" #}
310 {# widget "_widget-stats-top-slices.html" #}
311
312 {% endblock %}