forked from sbg/bco-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
executable file
·84 lines (71 loc) · 2.61 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
# Copyright (C) 2019 Seven Bridges Genomics Inc. All rights reserved.
#
# This document is the property of Seven Bridges Genomics Inc.
# It is considered confidential and proprietary.
#
# This document may not be reproduced or transmitted in any form,
# in whole or in part, without the express written permission of
# Seven Bridges Genomics Inc.
library("shiny")
library("shinydashboard")
library("bcrypt")
library("shinyBS")
library("shinyjs")
library("shinyFeedback")
library("shinycssloaders")
library("shinyAce")
library("jsonlite")
library("gt")
library("magrittr")
library("stringr")
library("listviewer")
library("visNetwork")
library("tidycwl")
library("biocompute")
# the number of failed attempts allowed before a user is locked out
max_lockout <- 4
# number of pages that needs prev/next buttons
num_pages <- 6
num_pages_basic <- 5
# add variable to control whether login page will be allowed
source(file.path("ui", "interface_variables.R"), local = TRUE)
# define user interface variable
ui <- uiOutput("ui")
server <- function(input, output, session) {
# ui
output$ui <- renderUI({
if (include_ui_login_page == TRUE) {
if (user_input$authenticated == FALSE) {
# login page ui
source(file.path("ui", "ui_login.R"), local = TRUE)$value
} else {
# tabs ui
source(file.path("ui", "ui_main.R"), local = TRUE)$value
}
} else {
# tabs ui
source(file.path("ui", "ui_main.R"), local = TRUE)$value
}
})
# server
# utils for platform options
source(file.path("server", "utils.R"), local = TRUE)$value
# source(file.path("server", "override.R"), local = TRUE)$value
# api for getting workflow from project
source(file.path("server", "api.R"), local = TRUE)$value
# app logic
source(file.path("server", "logic-ui-basic.R"), local = TRUE)$value
source(file.path("server", "logic-import.R"), local = TRUE)$value
source(file.path("server", "logic-import-local.R"), local = TRUE)$value
source(file.path("server", "logic-input.R"), local = TRUE)$value
source(file.path("server", "logic-input-basic.R"), local = TRUE)$value
source(file.path("server", "logic-input-local.R"), local = TRUE)$value
source(file.path("server", "logic-export.R"), local = TRUE)$value
source(file.path("server", "logic-export-basic.R"), local = TRUE)$value
source(file.path("server", "logic-export-local.R"), local = TRUE)$value
source(file.path("server", "logic-help.R"), local = TRUE)$value
source(file.path("server", "pdf-generator.R"), local = TRUE)$value
# authentication logic
source(file.path("server", "auth.R"), local = TRUE)$value
}
shinyApp(ui, server)