cdefd33399b709e67793175d872c2da3ac8661fe
[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 class="projects-tree">
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              
40                 <div id="home-project-tree"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading projects" /></div>
41             </div>
42             <div>
43                 <span class="glyphicon glyphicon-plus"></span> <a href="/portal/slice_request/">Create slice</a>
44                 <br />
45                 <span class="glyphicon glyphicon-cog"></span> <a href="/portal/project_request/">Create/Join project</a>
46             </div>
47             
48             <div class="experiment-tools">
49                 <h4 title="Some tools do their own slice creation and management.">Experiment now</h4>
50                 <p>
51                     <a class="btn btn-primary" id="webstart-button"
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                 </p>
56             </div>
57         </div>
58         <div class="col-sm-4">
59             <div class="row">
60                 <div class="col-sm-12">
61                     <h3>
62                         <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_small.png" alt="" /></a>ACCOUNT
63                     </h3>
64                     {% if person.last_name %}
65                     <p>
66                         {{person.first_name}} {{person.last_name}}
67                     </p>
68                     {% endif %}
69                     <p>
70                         <span class="glyphicon glyphicon-user"></span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
71                     </p>
72                 </div>
73             </div>
74             <div class="row">
75                 <div class="col-sm-12">
76                     <h3>
77                         <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color_small.png" alt="" /></a>MANAGEMENT
78                     </h3>
79                    
80                     <div>
81                         <span class="glyphicon glyphicon-ok"></span> <a href="/portal/institution#requests">Validate Requests</a>
82                     </div>
83                 </div>
84             </div>
85         </div>
86         <div class="col-sm-4">
87             <div class="row">
88                 <div class="col-sm-12">
89                     <h3>
90                         <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support_small.png" alt="" /></a>SUPPORT 
91                     </h3>
92                     <p>
93                         <span class="glyphicon glyphicon-envelope"></span> <a href="/portal/contact/">Contact</a>
94                     </p>
95                     <p>
96                         <span class="glyphicon glyphicon-stats"></span> <a target="_blank" href="https://flsmonitor.fed4fire.eu">Testbeds' status</a>
97                         </br />
98                         <span class="glyphicon glyphicon-stats"></span> <a href="/portal/reputation">Testbeds' reputation</a>
99                         
100                     </p>
101                     <p>
102                         <span class="glyphicon glyphicon-book"></span> <a target="_blank" href="http://doc.fed4fire.eu/">Documentation</a>
103                     </p>
104                 </div>
105             </div>            
106         </div>
107     </div>
108 </div>
109 {% else %}
110 <div class="container home">
111         <div class="">
112                 <div class="col-sm-4 col-sm-offset-1 slogan">
113                         <h1>
114                                 Fed4FIRE Portal
115                         </h1>
116                         <h3>
117                                 Your easy access to Future Internet Research and Experimentation testbeds belonging to the 
118                                 <a target="_blank" href="http://www.fed4fire.eu/">Fed4FIRE</a> federation.
119                         </h3>
120                         <br />
121                         <h4>
122                                  <a href='http://doc.fed4fire.eu'>Want to learn more?</a>
123                         </h4>
124                 </div>
125                 <div class="col-sm-4 col-sm-offset-1" style="width:400px; top:16px; float:left;">
126                         <div class="row">
127                                 {% widget '_widget-login-user.html' %}
128                         </div>
129                 </div>
130         </div>
131 </div>
132 {% endif %}
133
134
135 <script type="text/javascript">
136         $(document).ready(function() {
137         $('#webstart-button').click(function(){
138             var platform8 = new dtjava.Platform({javafx: '8+', jvm: '1.8+'});
139             var config = {
140                 java8_jnlp: 'http://jfed.iminds.be/releases/5.4-dev/r2314/webstart/experimenter/jfed-experimenter.jnlp',
141                 java7_jnlp: 'http://jfed.iminds.be/releases/r2269/webstart/experimenter/jfed-experimenter.jnlp'
142             };
143             var certkey = "{{jfed_identity}}";
144
145             dtjava.launch({url: config.java8_jnlp, params: {'login-certificate-string' : certkey } } , platform8, {});
146             //launchjFed();
147         });
148             {%if 'no_creds' in user_cred or 'creds_expired' in user_cred %}
149         localStorage.clear();
150         $.post("/cache/clear/", function( data ) {
151         });
152         {% endif %}
153                 $('a.home-tab').click(function() {
154                         $('ul.nav-tabs li').removeClass('active');
155                         $(this).parent().addClass('active');
156                         $('div.home-panel').hide();
157                         $('div#'+$(this).data('panel')).show();
158                 });
159                 
160 });
161 </script>
162
163 <!--
164 for jfed tool
165 <script type="text/javascript" src="{{STATIC_URL}}js/fed4fire_dtjava_orig.js"></script>
166 <script>
167         function launchApplication(jnlpfile) {
168         dtjava.launch(
169                 { url : jnlpfile },
170             {
171                 javafx : '2.2+',
172                 toolkit: 'swing'
173                 },
174                 {}
175         );
176         return false;
177      }
178 </script>
179 -->
180
181 {% endblock %}