FunApp is the main user interaction interface with the database. It is a web application that works on both large screens and mobile devices. FunApp is configured in the same way as FunDB through tables.
FunApp supports PWA technology, that is, you can place a shortcut on the desktop of your computer or phone directly on it bypassing the browser. More info (It is similar on other devices and browsers, somewhere in the browser's context menu there should be an item "Add to desktop").
FunApp is an interface for viewing mappings defined in FunDB. At the same time, the results returned in the form of a table can be displayed by FunApp in several different ways. Each type has its own attributes that affect the result. All attributes have default values, i.e. there are no required attributes. The display type is specified by a string in the request attributetype
, for example @"type" = 'menu'
. The default view is table
.
All displays support arguments and argument editor, which can be used, for example, for advanced filters in tables.
table
)Displays the result as a table.
form
)Displays the result as a form with blocks. If there is more than one line in the result, then a separate form will be drawn for each.
Form is useful as a container for other views - nested tables, kanban boards, timelines, as well as to display graphs, maps and other components using iframes.
menu
)Displays the result from one column, which is JSON - an array of objects that describes the menu.
The menu can be nested at any level, but note that the text size will decrease with each nesting level.
board
) Displays a kanban board consisting of cards grouped in columns.
Displays a multiple choice field where the possible values are taken from a link table. It is possible to select or delete multiple values - the corresponding entries will be added or removed in the table.
Displays the result as a table with a hierarchical structure if the entity has a field of type "reference" (reference(schema.entity)
) to itself.
timeline
)Displays the result as comments and events (as in Trello) with the ability to add new comments.
For editing, FunApp selects the bean appropriate for the field's data type.
Component | Description |
---|---|
Text field | Used for simple text editing |
Numeric field | Used to enter integers |
Multiline field | Used to enter large amounts of text |
Boolean field | Displayed as a yes/no list |
Value selection field | Used for fields like enum |
Relationship selection field | Used for fields of type reference |
Code editor | Used to edit language queries FunQL |
These cell attributes allow you to specify which component should be used to edit the cell. As a special case, they allow you to specify a nested display associated with a given field.
Attribute | Type | Description |
---|---|---|
control |
'user_view' | 'iframe' |
Indicates the component to use. With a value user_view instead of the cell, a submap is displayed corresponding to the value of the cell, interpreted as reference with id.If the value is iframe , an iframe is displayed instead of a cell, see iframes, and the value is passed to it. |
text_type |
Line | Indicates the component type for the string value. Possible types of components |
Attribute | Type | Description |
---|---|---|
link |
Action with relation-id | The action that is performed when the associated entity is clicked |
select_view |
Link with id | A special case of extra_select_views , a button for selecting a related entity from the display - convenient when customization of the button caption is not required and there is only one button |
extra_select_views |
Array of links with id | Links to mappings that allow you to select or create related values for this entity. Displays can be called up via the button at the bottom of the list for field values. Required optional attribute "name": 'Action name' |
options_view |
Cсылка | Limits the list of possible entities to only those that are in the view by reference. View must have columns value (the values in which are equal id entities that can be selected) and pun , containing label strings that will be used to display options instead of the entity's main column. More |
Composite attribute types used for different purposes.
The attribute value is:
&"foo"
, см. extension FunQL);{
"ref": &"foo" | { "schema": "schema_name", "name": "uv_name" },
[ "args": { "argument_name": value, ... }, ]
[ "new": true | false, ]
[ "default_values": { "result_column_name": value, ... }, ]
}
, where:
ref
: display link from FunQL;args
: display arguments that are substituted into the request;new
: use the mode of creating new records (without viewing existing ones);default_values
: default values for new records created in this query. Takes precedence over attribute default_value
.Same as type "link", but automatically adds id
argument to the arguments, equal to the ID of the record to which the current cell belongs.
Same as type "reference", but automatically adds the id
argument to the arguments, equal to the identifier of the record to which refers current cell.
The attribute value can be ссылка, however, additional attributes are supported:
target
: controls how the link is opened. Options:
top
: full screen;modal
: in a new modal window;blank
: in a new tab;root
: in the current active space (if the link is at the top level, a new view will open; if in a modal window, its content will change);modal-auto
: in the modal window if none are open, otherwise in the currently active modal window.By default: modal-auto
everywhere, root
on the menu.
The following actions are also supported:
{
"action": { "schema": "schema_name", "name": "action_name" },
[ "args": { "argument_name": value, ... }, ]
}
Same as action type, but automatically adds the id
argument to the arguments, equal to the ID of the record that owns the current cell.
Same as "action", but automatically adds the id
argument to the arguments, equal to the id of the record the current cell references to.
funapp
The table data is stored in the funapp
schema. They describe the current settings of the web application.
Contains general application settings. A list of settings can be found in their reference.
Setting | Type | Nullable | Description |
---|---|---|---|
name |
string |
false |
Setting name |
value |
string |
false |
Setting value |
Contains user settings. A list of settings can be found in their reference.
Setting | Type | Nullable | Description |
---|---|---|---|
user_id |
reference( public.users ) |
false |
User |
name |
string |
false |
Setting name |
value |
string |
false |
Setting value |
Sets translations for captions, headings, and any other messages. More about translations
Setting | Type | Nullable | Description |
---|---|---|---|
language |
string |
false |
ISO language code |
message |
string |
false |
Message for translation |
schema_id |
reference( public.schemas ) |
false |
Reference to schema |
translation |
string |
false |
Translation |
Specifies a list of color schemes.
Setting | Type | Nullable | Description |
---|---|---|---|
localized_name |
json |
false |
Localized color scheme name (example: {"en":"Light","ru":"Light"} ) |
name |
string |
false |
Color scheme system name |
schema_id |
reference( public.schemas ) |
false |
Link to database schema |
List of color options for each color scheme
Setting | Type | Nullable | Description |
---|---|---|---|
background |
string |
true |
HEX-code or cell/plate background color name |
border |
string |
true |
HEX-code or frame color name |
foreground |
string |
true |
HEX code or text color name |
name |
string |
false |
Color option name |
theme_id |
reference( funapp.color_themes ) |
false |
Link to color theme |
Pages that can be embedded in iframes. Most often used as help page. They differ from iframe markups in that they do not imply interaction with the database data.
Setting | Type | Nullable | Description |
---|---|---|---|
markup |
string |
false |
HTML-code of the page displayed in the iframe-е |
name |
string |
false |
Page title |
schema_id |
reference( public.schemas ) |
false |
Link to database schema |
Pages that can be embedded in iframes. Learn more about using here
Setting | Type | Nullable | Description |
---|---|---|---|
markup |
string |
false |
HTML-code of the page displayed in the iframe-е |
name |
string |
false |
Page title |
schema_id |
reference( public.schemas ) |
false |
Link to database schema |