Managing Scripts in Applications
Huawei Cloud Astro Zero allows you to develop TypeScript scripts online to implement flexible and complex service logic. In the Huawei Cloud Astro Zero environment configuration page, you can manage all scripts of the current account, including viewing, enabling, disabling, and running scripts.
Constraints
This menu is displayed only in the sandbox environment and production environment. Operations in the sandbox environment are identical to those in the production environment. This section uses the production environment as an example.
Managing a Script
- On the Huawei Cloud Astro Zero console, click Manage Runtime Environment of the purchased commercial instance to access the production environment.
- Choose Maintenance from the main menu.
- In the navigation pane, choose Global Elements > Scripts.
- On the script management page, you can view all scripts created by the account in the current environment.
- Click
next to the table heading to sort scripts. In the Operation column, you can disable, enable, or delete a script.
Table 1 Description of the script management page Parameter
Description
Name
Name of a script, that is, the name configured when the script is created.
Type
Script type.
- Global: scripts preconfigured in the system.
- Custom: custom script.
Enable
Whether a script is activated.
- If this parameter is selected, the script is activated.
- If this parameter is not selected, the script is deactivated.
Last Modified By
User who last modified the script.
Last Modified Date
Time when the script was last modified.
Operation
- Click
to enable the script.
- You can click
to disable the script. After the script is enabled, the script can be called by service orchestration and frontend pages.
- You can click
to delete a script. When this button is dimmed, it cannot be deleted. Preconfigured scripts cannot be deleted.
- On the script management tab page, click a script name to view details about the script.
Table 2 Description of the script details page Parameter
Description
Click this button to execute a script. If the script has multiple versions, the script in the enabled state is executed. If multiple versions are not enabled, the script of the latest version is executed.
Name
Name of a script, that is, the name configured when the script is created.
Enable
Whether a script is activated.
Belonging App/BO
App or BO to which a script belongs.
Version
Version of a script. If the script has multiple versions, the version of the script that is enabled is displayed. If multiple versions are not enabled, the latest version is displayed.
Method
Method name of a script.
Visibility
Whether a script is visible.
Overridable
Whether a resource can be customized as a new version, imported to an add-on application, or saved as a new version if it already exists in an add-on application.
This parameter is selected by default. When it is not selected, the description is as follows:
- When you customize a new version based on the resource, the following error message is displayed: XXX
does not support the customization of a new version. Check the basic properties and confirm whether the asset can be overwritten.
- The resource cannot be imported to the add-on application.
- If the resource has been imported to the add-on application, the new version cannot be customized.
Description.
Description of a script.
Click Edit to modify the script. You are advised to enter the function of the script.
Input Parameters
Input parameters of the script, including the parameter name, data type, whether the parameter is a set, whether the parameter is mandatory, and description.
If the script has multiple versions, the parameters of the script in the enabled state are displayed. If multiple versions are not enabled, the parameters of the script of the latest version are displayed.
Output Parameters
Output parameters of the script, including the parameter name, data type, whether the parameter is a set, whether the parameter is mandatory, and description.
If the script has multiple versions, the parameters of the script in the enabled state are displayed. If multiple versions are not enabled, the parameters of the script of the latest version are displayed.
Version
All versions of the script. In the Version Operation column, you can switch the script version, run the script, or delete the script.
- When you customize a new version based on the resource, the following error message is displayed: XXX
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot