Переглянути джерело

auto update script executed

Toby Chui 1 рік тому
батько
коміт
1b76e1a443

+ 1 - 1
web/components/gan.html

@@ -126,7 +126,7 @@
                 var nodeCount = 0;
                 data.forEach(function(gan){
                     $("#GANetList").append(`<tr class="ganetEntry" addr="${gan.nwid}">
-                        <td>${gan.nwid}</td>
+                        <td><a href="#" onclick="event.preventDefault(); openGANetDetails('${gan.nwid}');">${gan.nwid}</a></td>
                         <td>${gan.name}</td>
                         <td class="gandesc" addr="${gan.nwid}"></td>
                         <td class="ganetSubnet"></td>

+ 5 - 5
web/components/networktools.html

@@ -11,7 +11,7 @@
         <a class="nettools item bluefont" data-tab="tab3">Interface</a>
     </div>
 
-    <div class="ui bottom attached tab segment active" data-tab="tab1">
+    <div class="ui bottom attached tab segment nettoolstab active" data-tab="tab1">
         <h2>Multicast DNS (mDNS) Scanner</h2>
         <p>Discover mDNS enabled service in this gateway forwarded network</p>
         <button class="ui basic larger circular button" onclick="launchToolWithSize('./tools/mdns.html',1000, 640);">View Discovery</button>
@@ -21,7 +21,7 @@
         <button class="ui basic larger circular button" onclick="launchToolWithSize('./tools/ipscan.html',1000, 640);">Start Scanner</button>
     </div>
 
-    <div class="ui bottom attached tab segment" data-tab="tab2">
+    <div class="ui bottom attached tab segment nettoolstab" data-tab="tab2">
         <div id="websshTool" style="position: relative;">
             <h2>Web SSH</h2>
             <p>Connect to a network node within the local area network of the gateway</p>
@@ -101,7 +101,7 @@
         <button class="ui basic button" onclick="listWoL();"><i class="ui green refresh icon"></i> Refresh</button>
     </div>
 
-    <div class="ui bottom attached tab segment" data-tab="tab3">
+    <div class="ui bottom attached tab segment nettoolstab" data-tab="tab3">
         <h2>Network Interfaces</h2>
         <p>Network Interface Card (NIC) currently installed on this host</p>
         <table id="network-interfaces-table" class="ui selectable inverted striped celled table">
@@ -125,10 +125,10 @@
 
     // Switch tabs when clicking on the menu items
     $('.menu .nettools.item').on('click', function() {
-        $('.menu .item').removeClass('active');
+        $('.menu .nettools.item').removeClass('active');
         $(this).addClass('active');
         var tab = $(this).attr('data-tab');
-        $('.tab.segment').removeClass('active');
+        $('.nettoolstab.tab.segment').removeClass('active');
         $('div[data-tab="' + tab + '"]').addClass('active');
     }); 
 

+ 1 - 9
web/components/status.html

@@ -547,10 +547,7 @@
     //Bind event to tab switch
     tabSwitchEventBind["status"] = function(){
         //On switch over to this page, resize the chart
-        $("#networkActivityPlaceHolder").hide();
-        $("#networkActivity").show().delay(100, function(){
-            updateChartSize();
-        });
+        handleChartAccumulateResize();
         
     }
 
@@ -558,11 +555,6 @@
         handleChartAccumulateResize();
     });
 
-    document.addEventListener("visibilitychange", () => {
-        // it could be either hidden or visible
-        //handleChartAccumulateResize();
-    });
-
 
     //Initialize chart data
     initChart();

+ 19 - 1
web/components/tcpprox.html

@@ -41,7 +41,7 @@
             </div>
             <button id="addTcpProxyButton" class="ui basic button" type="submit"><i class="ui blue add icon"></i> Create</button>  
             <button id="editTcpProxyButton" class="ui basic button" onclick="confirmEditTCPProxyConfig(event);"><i class="ui blue save icon"></i> Update</button>  
-            
+            <button class="ui basic red button" onclick="event.preventDefault(); cancelTCPProxyEdit(event);"><i class="ui red remove icon"></i> Cancel</button>  
             
         </form>
         <div class="ui divider"></div>
@@ -180,9 +180,27 @@
             $('#tcpProxyForm select').dropdown('clear');
         }
 
+        function cancelTCPProxyEdit(event) {
+            clearTCPProxyAddEditForm();
+            $('#addproxyConfig').slideUp('fast');
+        }
+
         function validateTCPProxyConfig(form){
+            //Check if name is filled. If not, generate a random name for it
+            var name = form.find('input[name="name"]').val()
+            if (name == ""){
+                let randomName = "Proxy Rule (#" + Math.round(Date.now()/1000) + ")";
+                form.find('input[name="name"]').val(randomName);
+            }
+
             // Validate timeout is an integer
             var timeout = parseInt(form.find('input[name="timeout"]').val());
+            if (form.find('input[name="timeout"]').val() == ""){
+                //Not set. Assign a random one to it
+                form.find('input[name="timeout"]').val("10");
+                timeout = 10;
+            }
+            
             if (isNaN(timeout)) {
                 form.find('input[name="timeout"]').parent().addClass("error");
                 msgbox('Timeout must be a valid integer', false, 5000);

+ 3 - 0
web/snippet/intermediateCertConv.html

@@ -49,6 +49,9 @@
                     return;
                 }
                 var filename = $("#exportFilename").val().trim();
+                if (filename == ""){
+                    filename = "export.pem";
+                }
                 //Basically just concat both together. See https://github.com/tobychui/zoraxy/wiki/Import-your-own-certificate
                 generateAndDownload(certificatesArray[0] + '\n' + certificatesArray[1], filename);   
             }