Skip to content

Commit 6dffd62

Browse files
author
Matt Wilson
committed
Rename uptime to uptimeMinutes to make the units clearer
1 parent 329530d commit 6dffd62

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Feel free to ask questions or Google things at any point.
2525

2626
4. Show the uptime on the server card
2727
- If the server has been up for less than one day, show "Up for < 1 day"
28-
- Otherwise, show "Up for n days", with n rounded to an integer
28+
- Otherwise, show "Up for n days", with n rounded down to an integer
2929
- There is no need to worry about showing fractions, or weeks/months/years etc.
3030

3131

src/app/models/server.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export interface IServer {
33
name: string;
44
description: string;
55
isUp: boolean;
6-
uptime: number; // in seconds
6+
uptimeMinutes: number;
77
}
88

99
export const MOCK_SERVERS: IServer[] = [
@@ -12,25 +12,25 @@ export const MOCK_SERVERS: IServer[] = [
1212
name: `Web-001`,
1313
description: `Main web server`,
1414
isUp: true,
15-
uptime: 345600
15+
uptimeMinutes: 345600
1616
}, {
1717
id: `w002`,
1818
name: `Web-002`,
1919
description: `Secondary web server`,
2020
isUp: true,
21-
uptime: 604800
21+
uptimeMinutes: 604800
2222
}, {
2323
id: `db001`,
2424
name: `DB-001`,
2525
description: `Database server`,
2626
isUp: false,
27-
uptime: 0
27+
uptimeMinutes: 0
2828
},
2929
{
3030
id: `db002`,
3131
name: `DB-002`,
3232
description: `Secondary database server`,
3333
isUp: true,
34-
uptime: 240
34+
uptimeMinutes: 240
3535
},
3636
];

0 commit comments

Comments
 (0)