-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from flask-dashboard/development
Development
- Loading branch information
Showing
13 changed files
with
163 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"author": "Patrick Vogel, Thijs Klooster & Bogdan Petre", | ||
"email": "patrickvogel@live.nl" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
function format_time(time){ | ||
// ms is a float or int | ||
//ms = Math.round(parseFloat(ms) / 10) * 10; | ||
var ms = Math.round(parseFloat(time) * 10) / 10; | ||
var s = ms / 1000; | ||
var min = Math.floor(s / 60); | ||
var hr = Math.floor(s / 3600); | ||
var day = Math.floor(hr / 24); | ||
var value = ""; | ||
if (ms < 100.5) { | ||
value = ms + " ms"; | ||
} else if (ms < 999.5) { | ||
value = Math.round(ms) + " ms"; | ||
} else if (s < 60) { | ||
s = Math.round(ms / 100) / 10; | ||
value = s + " sec"; | ||
} else if (hr === 0) { | ||
s = Math.round(s % 60); | ||
value = min + " min"; | ||
if (s > 0) { | ||
value += ", " + s + " sec"; | ||
} | ||
} else if (day === 0) { | ||
value = hr + " hr"; | ||
min = Math.round(min % 60); | ||
if (min > 0) { | ||
value += ", " + min + " min"; | ||
} | ||
} else { | ||
value = day + " d"; | ||
hr = Math.round(hr % 24); | ||
if (hr > 0) { | ||
value += ", " + hr + " hr"; | ||
} | ||
} | ||
return value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters