Message if success or failure on rest/update slice with list of users
authorLoic Baron <loic.baron@lip6.fr>
Tue, 6 May 2014 16:17:15 +0000 (18:17 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Tue, 6 May 2014 16:17:15 +0000 (18:17 +0200)
portal/templates/slice-tab-users-view.html

index e1b0618..fb49615 100644 (file)
@@ -31,6 +31,9 @@
                        <th>Enabled</th>
                        </tr>
                </table>
+
+                <!-- XXX TODO: for the moment only PIs have access to Update but users that have slice credentials should also have access to that -->
+
                                {% if 'is_pi'  in pi %}
                                <button id="addusers" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Update users</button>
                                {%endif%}
                 });
            
                }); // post rest/user
-
                $('button#addusers').click(function() {
                 $.post("/update/slice/",{'filters':{'slice_hrn':'{{slice}}'},'params':{'users':slice_users}}, function(data) {
                     console.log(data);
                        if(data.success){
                        // TODO: highlight row after success
                        //$('tr[id="'+record_id+'"]').highlight();
+                       mysliceAlert("Success: slice updated",'success');
                        }else{
-                       alert("Rest Error for: "+data.error);
+                       mysliceAlert("Rest Error for: "+data.error,'warning');
                        }
                 }); // post update slice