mysliceMessage() js function can be used to display a message
[unfold.git] / portal / static / js / myslice-ui.js
index ef95e46..e2e8ad9 100644 (file)
@@ -1,28 +1,21 @@
 
+/*
+ * Call it with level: success, info, warning, danger
+ */
+function mysliceAlert(msg, level = 'warning') {
+       var el = $('#myslice-message')
+       el.find('.message').text(msg);
+       el.addClass('alert-' + level);
+       el.fadeIn('fast');
+}
 /* Table initialisation */
 $(document).ready(function() {
        
        var platformParameters = {};
        
-               
        
        
-       /* Testbeds list */
-       $("table#testbedList").load("/table/network/", { "fields" : ["network_hrn","description"], "options": ["checkbox"] }, function() {
-                       $(this).dataTable( {
-                       "sScrollY": window.innerHeight - 275,
-                       "sDom": "frtiS",
-               "bScrollCollapse": true,
-               "bStateSave": true,
-               "bPaginate": false,
-               "bLengthChange": false,
-               "bFilter": false,
-               "bSort": true,
-               "bInfo": false,
-               "bAutoWidth": true,
-               "bAutoHeight": false
-               } );
-       });
+       
        
        $("#objectList").load("/table/resource/", {"fields" : ["hostname","hrn","country","type"], "options": ["checkbox"] }, function(data) {
                $(this).dataTable( {