-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
87 lines (67 loc) · 2.94 KB
/
app.R
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
76
77
78
79
80
81
82
83
84
85
86
87
# load libraries ----------------------------------------------------------
library(package = "jsonlite", character.only = TRUE)
library(package = "DT", character.only = TRUE)
library(package = "shinyFeedback", character.only = TRUE)
library(package = "shinytoastr", character.only = TRUE)
library(package = "shinycssloaders", character.only = TRUE)
library(package = "shinyWidgets", character.only = TRUE)
library(package = "shinyjs", character.only = TRUE)
library(package = "dplyr", character.only = TRUE)
library(package = "gt", character.only = TRUE)
library(package = "stringi", character.only = TRUE)
# library(package = "future", character.only = TRUE)
# library(package = "promises", character.only = TRUE)
library(package = "pool", character.only = TRUE)
library(package = "DBI", character.only = TRUE)
library(package = "data.table", character.only = TRUE)
library(package = "plotly", character.only = TRUE)
library(package = "bs4Dash", character.only = TRUE)
library(package = "shiny", character.only = TRUE)
# library(bootstraplib)
# set defaults ------------------------------------------------------------
# plan(multisession)
setDTthreads(1L)
options(scipen = 999)
options(spinner.type = 8)
shiny::onStop(function() {
poolClose(conn)
})
# bs_theme_new(version = "4", bootswatch = NULL)
# bs_theme_base_colors(bg = "salmon", fg = "white")
# getData -----------------------------------------------------------------
source(file = "globals.R")
source(file = "R/functions.R")
# source files ------------------------------------------------------------
source(file = "Modules/edit_modules/defects/defects_table_module.R")
source(file = "Modules/edit_modules/defects/defects_edit_module.R")
source(file = "Modules/edit_modules/cars/cars_table_module.R")
source(file = "Modules/edit_modules/cars/cars_edit_module.R")
source(file = "Modules/edit_modules/zones/zones_table_module.R")
source(file = "Modules/edit_modules/zones/zones_edit_module.R")
source(file = "Modules/edit_modules/mapping/mapping_table_module.R")
source(file = "Modules/edit_modules/mapping/mapping_edit_module.R")
source(file = "Modules/edit_modules/edit_modules.R")
source(file = "Modules/delete_module.R")
source(file = "Modules/Entry/dailyfeed_module.R")
source(file = "Modules/Others/maintable.R")
source(file = "Modules/UI/controlbar_module.R")
source(file = "Modules/UI/footer_module.R")
source(file = "Modules/UI/navbar_module.R")
source(file = "Modules/UI/sidebar_module.R")
source(file = "Modules/UI/mainbody_module.R")
source(file = "Modules/main_app.R")
# ui ----------------------------------------------------------------------
ui <- main_ui("main_app")
# server ------------------------------------------------------------------
server <- function(input, output, session) {
callModule(main_server, "main_app")
}
# shinyApp ----------------------------------------------------------------
shinyApp(
ui = ui,
server = server,
options = list(
port = 9002,
host = "127.0.0.1"
)
)