-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigation.java
More file actions
75 lines (59 loc) · 2.15 KB
/
Copy pathNavigation.java
File metadata and controls
75 lines (59 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package dashboard;
import java.util.Scanner;
public class Navigation {
private static Scanner gotoScanner = new Scanner(System.in);
//Navigation that helps move around the whole dashboard:
public static void navbar() {
CodeUtil.clearScreen();
//Server health for quick view while navigating:
System.out.println("\nOverall Server Health: 75%");
System.out.println("\n\n1. Home\n");
System.out.println("2. Queue\n");
System.out.println("3. Reports\n");
System.out.println("4. CI/CD\n");
System.out.println("5. Settings\n");
System.out.println("6. Profile\n");
System.out.println("22. Logout and Exit\n");
int optionSelected = 0;
try {
System.out.print("Go to: ");
optionSelected = Integer.parseInt(gotoScanner.nextLine());
} catch (NumberFormatException e) {
System.out.println("Invalid input. Please enter a valid integer.");
}
switch (optionSelected) {
case 1:
Home.page();
break;
case 2:
Queue.page();
break;
case 3:
Report.page();
break;
case 4:
Integration.page();
break;
case 5:
CodeUtil.clearScreen();
System.out.println("You have chosen the settings option.\nHowever, we have changed it so that the user can edit the files directly.\nPlease open and modify the files as necessary.\n");
CodeUtil.delay(3000);
Navigation.navbar();
break;
case 6:
Profile.page();
break;
case 22:
CodeUtil.clearScreen();
System.out.println("Thankyou for using the application.\nSee you soon!!\nBye!");
CodeUtil.delay(500);
System.exit(0);
break;
default:
System.out.println("Incorrect Input");
CodeUtil.delay(500);
navbar();
break;
}
}
}