-
Notifications
You must be signed in to change notification settings - Fork 23
/
app.R
65 lines (52 loc) · 1.69 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
# Install packages if necessary
packs <- c("shiny", "dplyr", "tidyr", "maps", "scales", "ggplot2")
packs_toinstall <- packs[!(packs %in% installed.packages())]
if(length(packs_toinstall) > 0){
install.packages(packs_toinstall)
}
library(shiny)
source("visualize.R")
# Define UI for WebGuard
ui <- fixedPage(
# CSS
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "bootstrap.min.css"),
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
),
fixedRow(
column(4,
tags$div(class="explainer",
img(src="https://algorit.ma/wp-content/uploads/2017/10/dvr-666x705.png", width="200px"),
h3("WebGuard Monitoring System"),
p("WebGuard is powered by AlienVault's IP Reputation and scoring database. Its intended use is to
aid the cybersecurity analysts in the company to identify potential threats from incoming traffic
and mitigate any possible risks.")
)
),
column(7, offset=1,
plotOutput("showPlot1")
)
),
hr(),
fixedRow(
column(10, offset=1,
# table
dataTableOutput("showTable1")
)
)
)
# Define server logic to render the table and plot
server <- function(input, output) {
output$showPlot1<- renderPlot({
plot1
})
output$showTable1 <- renderDataTable(
data_sample,
options = list(
pageLength = 15
# initComplete = I("function(settings, json) {alert('WebGuard is Ready');}")
)
)
}
# Run the application
shinyApp(ui = ui, server = server)