KeboolaAppConfig-class: This is the configuration component library for managing app...

Description Methods

Description

This is the configuration component library for managing app configurations

Methods

clearForm(input)

Clear all form elements. Triggered on form load or exit

Parameters

  • input TODO

Return Value

TODO

configChoices()

This returns a list of 'config name – date created' with key configId the returned list is used to populate the options for the config select input

Return Value

array of configId -> 'configname – date'

configSelectorUI()

The config select element.

Return Value

select input with id=kb_config

configSettingsUI()

The main UI modal form

Return Value

The config settings modal form

configs()

reactive wrapper around our config fetcher

Return Value

list of app input configurations

deleteConfig(rowId)

Delete the configuration

Parameters

  • rowId id of the configuration row

Return Value

resp will be TRUE if successful. otherwise an error will be thrown.

deleteConfigResultUI()

Actually performs the delete and returns a DOM element indicating operation status

Return Value

DOM

getConfigs()

Get app configurations from the Shiny Bundle.

Return Value

List of app configurations.

initialize(sapiClient, component, configId, session = getDefaultReactiveDomain())

Constructor.

Parameters

  • sapiClient Storage API client.

  • bucket Bucket where config table is stored.

  • shinyUrl Shiny Bundle API home URL. It will be read from command line argument.

loadConfigResultUI(callback)

Returns DOM element depending on the success/failure of the config load

Parameters

  • callback The method to be executed with the loaded config. This method will generally be tasked with updating input elements with the values which were stored in the config.

Return Value

DOM element

saveConfig()

This method stores the entire session$input object as a row in the app configuration. Note that inputs with prefix kb_ will be omitted because they are system elements.

Return Value

TRUE, will throw an error if something goes wrong.

saveConfigResultUI()

Saves the app input configuration returns the UI depending on the success of the operation

Return Value

list(UI elements)

saveConfigUI()

sets DOM for the save configuration form. text input and button

Return Value

DOM

selectedConfig()

Uses the configId from the configuration select input to return the currently selected configuration

Return Value

Currently selected app configuration

settingsModalButton()

the toolbar button that brings up the configuration settings modal dialog

Return Value

list(button)


keboola/shiny-lib documentation built on May 20, 2019, 8:34 a.m.