Creates a toggle button to reset application session. Upon pressing on the button, its state is flipped to cancel application reload with application and console warning messages indicating that the application will be reloaded.

appResetButton(id)

Arguments

id

character id for the object

Value

an html div with prettyToggle button

Details

User can either resume reloading application session or cancel reloading process which will also generate application and console messages to indicate reloading status and result.

Button Features

  • Initial state label is "Application Reset" with warning status

  • Reloading state label is "Cancel Application Reset" with danger status

Shiny Usage

Call this function at any place in UI section.

It is paired with a call to appReset(id, ...) in server

Examples

if (interactive()) {
   library(shiny)
   library(periscope2)
   shinyApp(
     ui = fluidPage(fluidRow(column(12, appResetButton(id = "appResetId")))),
     server = function(input, output) {
       appReset(id = "appResetId", logger = "")
   })
}