AppsSettings Documentation
Overview
AppsSettings is a feature designed for managing the settings of installed applications within the Vantage analytics and data platform. This component facilitates configuration and operations for various app types, including integration with database providers and cloud storage solutions. The main functions of AppsSettings include loading configurations from the API, allowing users to switch data storage providers, manage pending settings, and save configurations.
Settings
1. App Types
- Name:
appTypes - Input Type: Array of objects
- Description: Contains a list of app types currently installed. Each object includes details such as
key,label, andstatus. Modifying this setting influences which apps are displayed to the user and their respective settings. - Default Value: An empty array
[](initially loaded from an API call).
2. Configurations
- Name:
configs - Input Type: Object
- Description: Stores configuration settings for each installed app type. Each specific app type can have its own set of configurations that dictate how it behaves and appears. This directly affects user configurations across different app integrations.
- Default Value: An empty object
{}(initially loaded from an API call).
3. Loading State
- Name:
loading - Input Type: Boolean
- Description: Represents whether configurations are currently being loaded. A true value indicates that loading is in progress, affecting the UI by potentially displaying loading indicators.
- Default Value:
true(the component starts in a loading state).
4. Saving State
- Name:
saving - Input Type: Nullable String
- Description: Holds the key of the app type currently being saved. This is used to conditionally render a saving message in the UI while a save operation is in progress.
- Default Value:
null.
5. Switching Provider State
- Name:
switchingProvider - Input Type: Nullable String
- Description: Keeps track of the app type key when switching data storage providers. This is important for notifying users if they are in the process of switching storage options.
- Default Value:
null.
6. Error State
- Name:
error - Input Type: Nullable String
- Description: Captures any error messages resulting from API calls or configuration processes. This allows the UI to display error states to the user, preventing ambiguity.
- Default Value:
null.
7. Saved State
- Name:
saved - Input Type: Boolean
- Description: Indicates whether recent configuration changes have been successfully saved. It affects UI elements by displaying confirmation messages when settings are saved.
- Default Value:
false.
8. Expanded Apps
- Name:
expandedApps - Input Type: Object
- Description: Tracks which apps are expanded in the UI for user interaction. This enables collapsible behavior for settings associated with each app type.
- Default Value: An empty object
{}.
9. Pending Settings
- Name:
pendingSettings - Input Type: Object
- Description: Holds temporarily modified settings for each app until they are saved. This allows for real-time updates in the UI without immediately affecting the saved configuration.
- Default Value: An empty object
{}.
10. Database Credentials
- Name:
dbCredentials - Input Type: Array of objects
- Description: Maintains a list of database credentials retrieved from API calls. These are utilized to dynamically populate options for database storage providers.
- Default Value: An empty array
[].
11. Database Tables
- Name:
dbTables - Input Type: Array of objects
- Description: Contains a list of tables corresponding to the selected database provider. This is used to display options for users when they define their data schema.
- Default Value: An empty array
[].
12. Database Columns
- Name:
dbColumns - Input Type: Array of objects
- Description: Stores the columns of a selected database table, allowing users to create specific mappings when configuring apps that require data from the databases.
- Default Value: An empty array
[].
13. Database Tables Loading State
- Name:
dbTablesLoading - Input Type: Boolean
- Description: Indicates whether the application is currently in the process of loading the database tables from the selected credential. Used to manage user feedback during loading.
- Default Value:
false.
14. Database Columns Loading State
- Name:
dbColumnsLoading - Input Type: Boolean
- Description: Indicates whether the application is currently in the process of loading column data for a selected table. Supports user experience by managing loading indicators.
- Default Value:
false.
15. Database Table Builder State
- Name:
showDbTableBuilder - Input Type: Nullable String
- Description: Invoked to display a user interface for building database tables. This is critical for schema definitions in data storage contexts.
- Default Value:
null.
Use Cases & Examples
Use Case 1: Project Management
A project manager at a company uses the AppsSettings component to configure the "Project Tracker" app. They can select a storage provider to house project data, switch settings without loss of data, and manage data pertaining to deadlines, assignments, and project timelines.
Use Case 2: Invoice Tracking
An accountant leverages the "Invoice Manager" app to manage client billing. They use AppsSettings to configure which database to fetch data from, ensuring that all invoice-related data is readily accessible and can be easily managed.
Example Configuration for Project Tracker
To configure the "Project Tracker" with Google Sheets as the storage provider, an administrator can set the following:
{
"appType": "projects",
"tileSettings": {
"storageProvider": "googledrive",
"dbCredentialId": null,
"dbServiceKey": null,
"dbTable": "",
"dbFieldMapping": {},
"initialized": true
}
}In this configuration, the project manager has selected to store the project data in Google Sheets. They can access the app immediately without database overhead, allowing for easy oversight and management of all projects.