activity monitor, sfa services monitor, statistics
[myslice.git] / portal / templates / onelab / onelab_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 <div class="container dashboard">
10         <div class="row">
11                 {%if 'is_pi'  in pi %}
12                 <div class="col-md-3">
13                         <h3>
14                                 EXPERIMENT
15                         </h3>
16                         <div>
17                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
18                         </div>
19                         <div>
20                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
21                         </div>
22                         <div>
23                                 <p><strong>Your slices </strong>
24                                         <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
25                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
26                                         However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
27                                         such as on the PlanetLab Europe portal, those slices will not appear here."
28                                         class="glyphicon glyphicon-info-sign">
29                                 </span>
30
31                                 </p>
32                         </div>
33                         <div>   
34                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
35                         </div>
36                 </div>
37                 <div class="col-md-3">
38                         <h3>MANAGEMENT</h3>
39                         <div>
40                                 <a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a>
41                         </div>
42                         <div>
43                                 <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
44                         </div>
45                 </div>
46                 <div class="col-md-3">
47                         <h3>
48                                 SUPPORT
49                         </h3>
50                         <div>
51                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
52                         </div>
53                         <div>
54                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
55                         </div>
56                 </div>
57                 
58                 <div class="col-md-3">
59                         <h3>
60                                 ACCOUNT
61                         </h3>
62                         <div>
63                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
64                         </div>
65                         <div>
66                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
67                         </div>
68                         <div>
69                                 {% if person.last_name %}
70                                         {{person.first_name}} {{person.last_name}}<br />
71                                 {% endif %}
72                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
73                 </div>
74                 </div>
75         </div>
76         {%else%}
77         <div class="row">
78                 <div class="col-md-4">
79                         <h3>
80                                 EXPERIMENT
81                         </h3>
82                         <div>
83                                 <a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a>
84                         </div>
85                         <div>
86                                 <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
87                         </div>
88                         <div>
89                                 <p><strong>Your slices </strong>
90                                 <span title="A slice is a set of testbed resources on which you can conduct an experiment. 
91                                         Either ask your colleagues to give you access to an existing slice or request a new slice by clicking 'Request Slice'. 
92                                         However, on the OneLab portal, you will only see slices that you have created through OneLab. If you have created slices elsewhere, 
93                                         such as on the PlanetLab Europe portal, those slices will not appear here."
94                                         class="glyphicon glyphicon-info-sign">
95                                 </span>
96                                 </p>
97                         </div>
98                         <div>   
99                                 <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
100                         </div>
101                 </div>
102                 <div class="col-md-4">
103                         <h3>
104                                 SUPPORT
105                         </h3>
106                         <div>
107                                 <a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a>
108                         </div>
109                         <div>
110                                 <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-envelope"></span> Contact</button>
111                         </div>
112                 </div>
113                 
114                 <div class="col-md-4">
115                         <h3>
116                                 ACCOUNT
117                         </h3>
118                         <div>
119                                 <a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a>
120                         </div>
121                         <div>
122                                 <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
123                         </div>
124                         <div>
125                                 {% if person.last_name %}
126                                         {{person.first_name}} {{person.last_name}}<br />
127                                 {% endif %}
128                         <span class="label">Username:</span> <a href='/portal/account/' title="Click here to see and edit your account details.">{{person.email}}</a>
129                 </div>
130                 </div>
131         </div>
132         {%endif%}
133
134 </div>
135 {% else %}
136 <div class="container-fluid home">
137         <div class="">
138                 <div class="col-sm-2"></div>
139                 <div class="col-sm-4 slogan">
140                         <h2>
141                                 Your Easy Access to Computer Networking Testbeds:
142                         </h2>
143                         <h3>
144                                 A wide variety of world class testbeds available through your one account
145                         </h3>
146                 </div>
147                 <div class="col-sm-5 col-sm-offset-1">
148                         <div class="row">
149                                 {% widget '_widget-login-user.html' %}
150                         </div>
151                 </div>
152                 <div class="col-sm-1"></div>
153         </div>
154 </div>
155 {% endif %}
156
157
158 <script type="text/javascript">
159         $(document).ready(function() {
160                 $('a.home-tab').click(function() {
161                         $('ul.nav-tabs li').removeClass('active');
162                         $(this).parent().addClass('active');
163                         $('div.home-panel').hide();
164                         $('div#'+$(this).data('panel')).show();
165                 });
166                 $('button#validaterequestbtn').click(function() {
167                         window.location="/portal/institution#requests";
168                 });
169                 $('button#ticketbtn').click(function() {
170                         window.location="/portal/contact/";
171                 });
172                 $('button#signupbtn').click(function() {
173                         window.location="/portal/register/";
174                 });
175                 $('button#slicerequestbtn').click(function() {
176                         window.location="/portal/slice_request/";
177                 });
178 /*-------
179 List of slices has been moved in 
180 portal/templates/base.html
181 This should go into session
182 --------*/
183 });
184 </script>
185 {% widget "_widget-monitor.html" %}
186 {% widget "_widget-stats-top-slices.html" %}
187
188 {% endblock %}