This is a translation of the original English documentation page. Help us make it better.

15 Texte brut

Description

Ces paramètres et les valeurs de propriété possibles pour les objets de champ du widget de tableau de bord respectifs permettent de configurer le widget Texte brut dans les méthodes dashboard.create et dashboard.update.

Parameters

The following parameters are supported for the Plain text widget.

Parameter type name value
Refresh interval 0 rf_rate 0 - No refresh;
10 - 10 seconds;
30 - 30 seconds;
60 - (default) 1 minute;
120 - 2 minutes;
600 - 10 minutes;
900 - 15 minutes.
Items
(required)
4 itemids Item ID.

Note: To configure multiple items, create a dashboard widget field object for each item.
Items location 0 style 0 - (default) Left;
1 - Top.
Show lines 0 show_lines Valid values range from 1-100.

Default: 25.
Show text as HTML 0 show_as_html 0 - (default) Disabled;
1 - Enabled.
Enable host selection 0 dynamic 0 - (default) Disabled;
1 - Enabled.

Exemples

Les exemples suivants visent à décrire uniquement la configuration des objets de champ du widget de tableau de bord pour le widget Texte brut. Pour plus d'informations sur la configuration d'un tableau de bord, consultez dashboard.create.

Configuring a Plain text widget

Configure a Plain text widget that displays latest data for items "42269" and "42253". In addition, configure the item names to be located at the top of the data columns, and only 15 lines of data to be displayed.

Request:

{
           "jsonrpc": "2.0",
           "method": "dashboard.create",
           "params": {
               "name": "My dashboard",
               "display_period": 30,
               "auto_start": 1,
               "pages": [
                   {
                       "widgets": [
                           {
                               "type": "plaintext",
                               "name": "Plain text",
                               "x": 0,
                               "y": 0,
                               "width": 6,
                               "height": 3,
                               "view_mode": 0,
                               "fields": [
                                   {
                                       "type": 4,
                                       "name": "itemids",
                                       "value": 42269
                                   },
                                   {
                                       "type": 4,
                                       "name": "itemids",
                                       "value": 42253
                                   },
                                   {
                                       "type": 0,
                                       "name": "style",
                                       "value": 1
                                   },
                                   {
                                       "type": 0,
                                       "name": "show_lines",
                                       "value": 15
                                   }
                               ]
                           }
                       ]
                   }
               ],
               "userGroups": [
                   {
                       "usrgrpid": 7,
                       "permission": 2
                   }
               ],
               "users": [
                   {
                       "userid": 1,
                       "permission": 3
                   }
               ]
           },
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "dashboardids": [
                   "3"
               ]
           },
           "id": 1
       }

Voir également