Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions source/Styles/xb3/jst/network_setup.jst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?%
/*
If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 3 in source/Styles/xb3/jst/network_setup.jst

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'source/Styles/xb3/jst/network_setup.jst' (Match: rdkb/components/opensource/ccsp/webui/rdkb/components/opensource/ccsp/webui/1, 930 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/webui/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/Styles/xb3/code/network_setup.php)
following copyright and licenses apply:

Copyright 2018 RDK Management
Expand Down Expand Up @@ -94,6 +94,16 @@
$tmp = div_mod($tmp[1], 60);
$min = $tmp[0];
return "D:" +$day+ " H:" +$hor+ " M:" +$min+ " S:" +$tmp[1];
}
function sec2dhm($sec)
{
$tmp = div_mod($sec, 24*60*60);
$day = $tmp[0];
$tmp = div_mod($tmp[1], 60*60);
$hor = $tmp[0];
$tmp = div_mod($tmp[1], 60);
$min = $tmp[0];
return $day+"d:"+$hor+"h:"+$min+"m";
}
$partnerId = getStr("Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.PartnerId");
$fistUSif = getFirstUpstreamIpInterface();
Expand All @@ -112,13 +122,7 @@
//DHCP Lease Expire Time (IPv6):
// echo $fistUSif."IPv6Address.$i.X_Comcast_com_LeaseTime";
$sec = getStr($fistDSif+"IPv6Address."+$i+".X_CISCO_COM_PreferredLifetime");
$tmp = div_mod($sec, 24*60*60);
$day = $tmp[0];
$tmp = div_mod($tmp[1], 60*60);
$hor = $tmp[0];
$tmp = div_mod($tmp[1], 60);
$min = $tmp[0];
$DHCP_LET_IPv6=$day+"d:"+$hor+"h:"+$min+"m";
$DHCP_LET_IPv6 = sec2dhm($sec);
}
if (strstr($val, "fe80::")){
$WANIPv6LinkLocal = $val;
Expand All @@ -134,19 +138,26 @@
//DHCP Lease Expire Time (IPv6):
// echo $fistUSif."IPv6Address."+$i+".X_Comcast_com_LeaseTime";
$sec = getStr($fistUSif+"IPv6Address."+$i+".X_CISCO_COM_PreferredLifetime");
$tmp = div_mod($sec, 24*60*60);
$day = $tmp[0];
$tmp = div_mod($tmp[1], 60*60);
$hor = $tmp[0];
$tmp = div_mod($tmp[1], 60);
$min = $tmp[0];
$DHCP_LET_IPv6 = $day+"d:"+$hor+"h:"+$min+"m";
$DHCP_LET_IPv6 = sec2dhm($sec);
}
if (strstr($val, "fe80::")){
$WANIPv6LinkLocal = $val;
}
}
}
$dhcpv6_server_type = getStr("Device.DHCPv6.Server.X_CISCO_COM_Type");
if(strpos($partnerId, "sky-") !== false && $dhcpv6_server_type == "Stateless") {
$ids = explode(",", getInstanceIds($fistUSif+"IPv6Prefix."));
for(var $keytmp in $ids) {
$i=$ids[$keytmp];
$val = getStr($fistUSif+"IPv6Prefix."+$i+".Prefix");
if (!strstr($val, "fe80::")) {
//DHCP Lease Expire Time (IPv6): Stateless
$sec = getStr($fistUSif+"IPv6Prefix."+$i+".X_CISCO_COM_PreferredLifetime");
$DHCP_LET_IPv6=sec2dhm($sec);
}
}
}
$sta_inet = (getStr("Device.DeviceInfo.X_RDKCENTRAL-COM.InternetStatus")=="true") ? "true" : "false";
//in Bridge mode > Internet connectivity status is always active
$sta_inet = ($_SESSION["lanMode"] == "bridge-static") ? "true" : $sta_inet ;
Expand Down
Loading