Skip to content

Commit

Permalink
webui: insert check_is_merlin_fw() function in aimesh_topology.html
Browse files Browse the repository at this point in the history
It's not getting imported from general.js, so copy the
function into the page itself.
  • Loading branch information
RMerl committed Mar 16, 2023
1 parent 1c2bd9d commit bccc32f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions release/src/router/www/aimesh/aimesh_topology.html
@@ -1,4 +1,11 @@
<script>
function _check_is_merlin_fw(_fw) {
var fw_array = _fw.match(/(\d+)\.(\d+)\.(\d+)\.(\d+)\.([^_]+)_(\w+)/);
if (fw_array && (fw_array[5].indexOf('.') > 0) )
return true;
else
return false;
}
var diagnosticApi = {
"db_map": {
"backhaul": "STAINFO",
Expand Down Expand Up @@ -3231,10 +3238,10 @@
var mac = _node_info.mac;
var node_location_text = "Home";
var fwver = _node_info.fwver;
if (check_is_merlin_fw(fwver))
if (_check_is_merlin_fw(fwver))
fwver = fwver.replace("3.0.0.4.", "").replace("_0","");
var newfwver = _node_info.newfwver;
if (check_is_merlin_fw(newfwver))
if (_check_is_merlin_fw(newfwver))
newfwver = newfwver.replace("3.0.0.4.", "").replace("_0","");
var re_path = _node_info.re_path;
var alias = _node_info.alias;
Expand Down

0 comments on commit bccc32f

Please sign in to comment.