Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

gui.json File

Updated on 2022-02-22 GMT+08:00

The gui.json file is the configuration file of a component. This section describes the fields in the gui.json file. You can modify the gui.json file and customize the component configuration panel based on the field description in this document.

The following is a gui.json file example:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "name": "newCom",
  "attr": {
    "w": 650,
    "h": 378
  },
  "style": [...],
  "data": {...},
  "event": {...}
}
Table 1 Description of parameters in gui.json

Parameter

Mandatory

Type

Description

name

Yes

String

Name of the component.

attr

No

attr object

Basic configuration of the component width and height (unit: pixel).

style

Yes

Array of Style object

Configuration of the pattern panel.

data

Yes

Object

Configuration of the data panel. For details, see Configuring Component Data.

event

Yes

Object

Configuration of the interaction panel. For details, see Configuring Component Interaction.

Table 2 Description of the attr parameters

Parameter

Mandatory

Type

Description

w

No

Number

Component width (unit: pixel).

h

No

Number

Component height (unit: pixel).

Configuring the Component Style

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
"style": [
  {
     "label": "global",
     "isExpand": true,
     "children": [
        {
          "label": "Font",
          "name": "font",
          "type": "fontfamily",
          "value": "YouYuan"
        },
        {
          "label": "Color",
          "name": "color",
          "type": "color",
          "value": "rgba(70, 94, 212, 1)"
        }
     ]
  }
]

The Style parameter is in array format. Each data element forms a style configuration item, and can contain related sub-configuration items. A maximum of three levels are supported. The parameter is described as follows:

Table 3 Description of the Style parameters

Parameter

Mandatory

Type

Description

label

Yes

String

Label name of the configuration item.

isExpand

No

Boolean

Indicates whether sub-configuration items can be collapsed or expanded. true: yes; false: no

type

Yes

String

UI type of the configuration item. For details about the UI types supported by DLV, see Supported Types.

name

Yes

String

Key value of the configuration item. The value must be unique.

Other

No

-

Different UI types have different attribute parameters. For details, see UI Types.

children

No

Array of children object

Sub-configuration items of the configuration item. As shown in the following figure, the Global style contains Font and Color.

Table 4 Description of the children parameters

Parameter

Mandatory

Type

Description

label

Yes

String

Label name of the configuration item.

type

Yes

String

UI type of the configuration item. For details about the UI types supported by DLV, see UI Types.

name

Yes

String

Key value of the configuration item. The value must be unique.

Other

Yes

-

Different UI types have different attribute parameters. For details, see UI Types.

Configuring Component Data

data: data panel configuration of the component.

The following provides an example:
1
2
3
4
"data": {
  "fields": {...},
  "config": {...}
}
Table 5 Description of the data parameters

Parameter

Mandatory

Type

Description

fields

Yes

Object

Field mapping area. For details about the field mapping area on the data panel, see fields.

config

Yes

Object

Static data area on the data panel. For details, see config.

  • fields

    In the example, the fields parameter is as follows:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    "fields": {
      "x": {
        "value": "", 
        "desc": "x"  
      },  
      "y": {
        "value": "",    
        "desc": "y"  
       },  
       "s": {
         "value": "",    
         "desc": "s",    
         "type": "series",    
         "gui": [      
           {
              "label": "",        
              "isCheck": true,        
              "children": [          
                 {
                    "label": "Name",            
                    "name": "series.name",            
                    "type": "input",            
                    "value": ""          
                 },          
                 {
                    "label": "Color",            
                    "name": "series.color",            
                    "type": "color",            
                    "value": "rgba(195,53,53,1)"          
                 }        
               ]      
             }    
          ]  
       }
    }
    

    The fields parameter contains multiple objects in the key:value format. The value of key is the field name. The value of value corresponding to the key value is defined as follows:

    Table 6 Description of the Fields value parameters

    Parameter

    Mandatory

    Type

    Description

    value

    Yes

    String

    Field name in the mapped source data.

    desc

    Yes

    String

    Field name description, which is the same as the key value.

    type

    No

    String

    The value is fixed to series. If the type parameter exists, the field is a series field (indicating that the field is used to distinguish two or more groups of data displayed in the same chart). Each series can map the value of the field. In the example, the s field contains a default series and a series corresponding to value 1. Each series contains some component style configurations.

    gui

    No

    Array

    The gui parameter is available only when type is set to series. This parameter lists the style configuration required by the series.

  • config

    In the example, the config parameter is as follows:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    "config": {
      "data": [    
        {  
          "x": "2018",      
          "y": 78,      
          "s": 1    
        },    
       {
          "x": "2016",      
          "y": 55,      
          "s": 1    
       },    
      {
          "x": "2017",      
          "y": 68,      
          "s": 1    
      },    
      {
          "x": "2018",      
          "y": 48,      
          "s": 1    
      },    
      {
          "x": "2019",      
          "y": 70,      
          "s": 1    
       },     
      {
          "x": "2020",      
          "y": 85,      
          "s": 1    
       }  
     ]
    }
    

    The data parameter in the Config parameter corresponds to the static data displayed on the data panel. The dynamic data source can be connected after the component package is uploaded. The data format needs to be defined based on the source data of the user.

Configuring Component Interaction

event: component interaction configuration.

The following provides an example:

1
2
3
4
5
6
7
8
"event": {
   "Data change": {
     "enable": false,    
     "fields": {
       "value": ""    
      }  
   }
}

The event parameter is an object in the key: value format. The value of key is the event name, and the value of value is the configuration of the event. The details are as follows:

Table 7 Description of the event value parameters

Parameter

Mandatory

Type

Description

Enable

Yes

Boolean

Indicates whether to enable the event. true: enable, false: disable

Fields

Yes

Object

Field mapping relationship corresponding to the interaction event, including one key:value at least. The value of key is the parameter name transferred during interaction, and the value of value is the transferred value that is obtained from the component data.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback