-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
43 lines (37 loc) · 1.26 KB
/
ui.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
library(shiny)
library(visNetwork)
library(shinycssloaders)
shinyUI(fluidPage(
# Application title
titlePanel("Config visualizer for exercism.io"),
fluidRow(
sidebarLayout(
sidebarPanel(
# Specify config.json file
radioButtons("config_mode", "Mode",
choiceNames = c("File upload", "View example"),
choiceValues = c("file", "example")
),
helpText("Upload config.json or select one of the example configs"),
conditionalPanel(
condition = "input.config_mode == 'file'",
fileInput("config_file", label = "Upload file")
),
conditionalPanel(
condition = "input.config_mode == 'example'",
selectInput("config_example", label = "Choose example config",
choices = c("none", "javascript", "r"))
),
radioButtons("node_shape", "Node shape",
choiceNames = c("box (no scaling)", "circle (scaled by difficulty)"),
choiceValues = c("box", "dot")
)
),
# Render visualization of the track config
mainPanel(
visNetworkOutput("track_view", width = "100%", height = "800px") %>%
withSpinner()
)
)
)
))