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
Help Center/ Data Lake Visualization/ Developer Guide/ Custom Component Development

Custom Component Development

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

Environment Preparation

Go to the Node.js official website and download and install a Node.js version suitable for your operating system. Node.js supports the Windows, macOS, and Linux operating systems.

Installing Developer Tools

  1. Log in to the DLV management console. On the Control Center > Components page, click Download Developer Tools in the upper right corner of the page to download the developer tool package named dlv-cli-x.x.x, where x.x.x indicates the tool version.
  2. Decompress the dlv-cli-x.x.x package to the local host. Open the command prompt window in Windows or open the CLI terminal in Linux or Mac. Run the cd command to go to the dlv-cli-x.x.x directory, and run the npm i command to install dependency packages, and then run the npm link command to install the dlv-cli developer tool.
  3. After the installation is successful, run the dlv command to view information about the current developer tool.
    Figure 1 Running the dlv command
    Table 1 Description of developer tool commands

    Command

    Description

    dlv init

    Quickly initialize component templates.

    dlv start

    Start component packages to preview components.

    dlv package

    Package components.

Generating Component Packages

A component package is a custom component template provided by DLV. You can develop components based on the custom template.

Create a directory, for example, newCom, go to the directory, and run the dlv init command to create a component, as shown in Figure 2. Enter the information about the new component as prompted.

NOTE:

Do not run the dlv init command in the directory of developer tool dlv-cli-x.x.x. Otherwise, the developer tool cannot be used properly.

Figure 2 dlv init
Table 2 Component messages

Message

Description

Please select a language...

Use ↑ and ↓ to select a language.

Please set the component name...

Set a component name, which consists of 1 to 32 characters, including letters, digits, and underscores (_), and must start with a letter or underscore (_). Unless otherwise specified, the names in this document comply with the naming rules.

Please set the component alias...

Set a component alias, which consist of 1 to 32 characters, including Chinese, letters, and special characters. .

Please set the component version number...

Set a component version number. The default version number is 1.0.0.

Please describe the component...

Describe a component.

If the corresponding template file is generated in the new directory, the component package is successfully generated.

├──node_modules # npm dependency package

├──gui.json # Component configuration

├──index.js # Component entry

├──index.less # Component style

└──package.json # npm module description

Developing Components

After a component package is generated, you can customize components based on the generated template. For details, see Component Development Guide.

Previewing Components

Go to the component directory and run the dlv start command to preview a component. If the command output shows that the service is started, the Chrome browser is automatically launched and navigates to the component preview page.

The preview page consists of the central canvas area and the toolbar on the right. The details are as follows:

  • Central canvas area

    The central canvas area displays components and allows you to observe component changes in real time.

    All configurations and data modifications made on the toolbar on the right are displayed on the components of the central canvas in real time.

    The black frame of a component indicates the container size of the component. The black frame can be scaled in each direction to test the scaling performance of the component.

  • Toolbar

    The toolbar on the right consists of the pattern, data, and interaction panels.

Table 3 Panel description

Panel

Description

Pattern

The Pattern panel provides configuration items for components. After you set the configuration items, the corresponding configurations take effect on the components immediately.

Data

The Data panel provides data API configuration items for components. Once the data on the Data panel is changed, the changes are made on the components accordingly.

Interaction

The Interaction panel describes the component interaction.

Publishing Components

Go to the component directory and run the dlv package command. A tar.gz package named in the format of component name-version number is generated outside the component directory. Upload the package to a component package on the Components page of the DLV management console to publish the package.

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