Skip to content

Commit

Permalink
Flyttet app fra inst-mappe til R-mappe
Browse files Browse the repository at this point in the history
Closes #23
  • Loading branch information
arnfinn committed Nov 28, 2023
1 parent be4f4ff commit f6204b8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ Imports:
magrittr,
rapbase,
rmarkdown,
shiny,
shinyalert
shiny
Remotes:
Rapporteket/rapbase
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
URL: http://github.com/Rapporteket/rapRegTemplate
BugReports: http://github.com/Rapporteket/rapRegTemplate/issues
Suggests:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
export(getFakeRegData)
export(getRegData)
export(makeHist)
export(run_app)
3 changes: 1 addition & 2 deletions inst/shinyApps/app1/server.R → R/app_server.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
library(shiny)
library(magrittr)
library(rapRegTemplate)

server <- function(input, output, session) {
app_server <- function(input, output, session) {

# Last inn data
# regData <- getFakeRegData()

Check warning on line 7 in R/app_server.R

View workflow job for this annotation

GitHub Actions / lint

file=R/app_server.R,line=7,col=5,[commented_code_linter] Commented code should be removed.
Expand Down
4 changes: 1 addition & 3 deletions inst/shinyApps/app1/ui.R → R/app_ui.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
library(shiny)
library(shinyalert)
library(rapbase)

addResourcePath("rap", system.file("www", package = "rapbase"))
regTitle <- "rapRegTemplate"

ui <- shiny::tagList(
app_ui <- shiny::tagList(
shiny::navbarPage(
title = div(a(includeHTML(system.file("www/logo.svg",
package = "rapbase"))),
Expand All @@ -17,7 +16,6 @@ ui <- shiny::tagList(
shiny::tabPanel("Veiledning",
shiny::mainPanel(width = 12,
shiny::htmlOutput("veiledning", inline = TRUE),
shinyalert::useShinyalert(),
rapbase::appNavbarUserWidget(
user = uiOutput("appUserName"),
organization = uiOutput("appOrgName"),
Expand Down
8 changes: 8 additions & 0 deletions R/run_app.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' Run the imongr Shiny Application
#'
#' @return An object representeing the imongr app
#' @export

run_app <- function() {
shiny::shinyApp(ui = app_ui, server = app_server)

Check warning on line 7 in R/run_app.R

View check run for this annotation

Codecov / codecov/patch

R/run_app.R#L7

Added line #L7 was not covered by tests
}
14 changes: 14 additions & 0 deletions man/run_app.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
library(testthat)
library(rapRegTemplate)

test_check("rapRegTemplate")

0 comments on commit f6204b8

Please sign in to comment.