-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for upload speed #7
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,14 @@ function classifySpeed(value) { | |
if (value >= 10) return 2; | ||
return 1; | ||
|
||
} | ||
|
||
function classifySpeedUl(value) { | ||
if (value=="") return 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting |
||
if (value > 20) return 3; | ||
if (value >= 5) return 2; | ||
return 1; | ||
|
||
} | ||
|
||
function updateDlColor(value) { | ||
|
@@ -76,7 +84,7 @@ function updateDlColor(value) { | |
function updateUlColor(value) { | ||
|
||
const ul_text_element = document.getElementById("ulText"); | ||
const speed_classification = classifySpeed(value); | ||
const speed_classification = classifySpeedUl(value); | ||
|
||
switch (speed_classification){ | ||
case 3: ul_text_element.style.color = "#16A34A"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,14 @@ | |
if (value >= 10) return 2; | ||
return 1; | ||
|
||
} | ||
|
||
function classifySpeedUl(value) { | ||
if (value=="") return 0; | ||
if (value > 20) return 3; | ||
if (value >= 5) return 2; | ||
return 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changes are made, kindly validate |
||
|
||
} | ||
|
||
function updateDlColor(value) { | ||
|
@@ -69,7 +77,7 @@ | |
function updateUlColor(value) { | ||
|
||
const ul_text_element = document.getElementById("ulText"); | ||
const speed_classification = classifySpeed(value); | ||
const speed_classification = classifySpeedUl(value); | ||
|
||
switch (speed_classification){ | ||
case 3: ul_text_element.style.color = "#16A34A"; | ||
|
@@ -202,7 +210,6 @@ | |
updateUlColor(uiData.ulStatus); | ||
} | ||
|
||
|
||
updatePingColor(uiData.pingStatus); | ||
updateJitterColor(uiData.jitterStatus); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it
classifySpeedUpload
avoid short formsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are made, kindly validate