Repository navigation
Expand file tree
/
Copy pathapp_shinydashboard.R
More file actions
66 lines (61 loc) · 2.5 KB
/
Copy pathapp_shinydashboard.R
File metadata and controls
66 lines (61 loc) · 2.5 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
######### OLD ###########
# This is the main app page, which will run and read in all the other pages
# and modules, and render the dashboard
# Note: not necessary to load packages here: this all happens in global.R
source("global.R")
source("functions.R")
source("modules/main_page.R")
source("modules/waterquality.R")
source("modules/algae.R")
#source("modules/win.R")
ui <- dashboardPage(
dashboardHeader(title = "Guana Estuary Data Dashboard"),
dashboardSidebar(
sidebarMenu(id = "tabs",
menuItem("MAIN PAGE", tabName = "main_page", icon = icon("home")),
menuItem("Water Quality Data", tabName = "waterquality",
icon = icon("flask-vial", lib="font-awesome"),
badgeLabel = "UPDATED!", badgeColor = "fuchsia"),
menuItem("Harmful Algal Bloom Data", tabName = "algae",
icon = icon("microscope", lib = "font-awesome"),
badgeLabel = "NEW!", badgeColor = "green"),
menuItem("Water Level Data", tabName = "waterlevel",
icon = icon("water", lib="font-awesome"),
badgeLabel = "Under construction", badgeColor = "light-blue"),
menuItem("Fish and Shellfish", tabName = "shellfish",
icon = icon("fish", lib="font-awesome"),
badgeLabel = "Coming soon", badgeColor = "yellow"),
menuItem("Terrestrial Animal Data", tabName = "animal",
icon = icon("paw", lib="font-awesome"),
badgeLabel = "Under construction", badgeColor = "light-blue"),
menuItem("Vegetation Data", tabName = "animal",
icon = icon("seedling", lib="font-awesome"),
badgeLabel = "Under construction", badgeColor = "light-blue")
),
# Custom CSS to adjust the vertical position of the menu items
tags$style(HTML("
.main-sidebar {
display: flex;
flex-direction: column;
}
.sidebar-menu > li {
margin-top: 10px;
margin-bottom: 10px;
}
"))
),
dashboardBody(
tabItems(
tabItem(tabName = "main_page", mainPageUI(id = "main_page")),
tabItem(tabName = "algae", HABPageUI(id = "algae")),
tabItem(tabName = "waterquality", WINPageUI(id = "waterquality"))
)
)
)
server <- function(input, output, session) {
moduleServer(module = mainPageServer, id = "main_page", session = session)
#WQPageServer("waterquality", parentSession = session)
HABPageServer("algae", parentSession = session)
WINPageServer("waterquality", parentSession = session)
}
shinyApp(ui, server)