Setting Properties of the Login Widget
The platform provides a default login page for portal users to low-code applications. For a custom login page, use the login widget.

Constraints
The login widget does not support the password resetting function. Therefore, before using this widget, ensure that Mandatory password change for the first login on the Configuration Center > Security Settings page is set to false.

Basic
- Widget Label: Label of a widget, which is displayed on the advanced page.
- Widget Name: Name of a widget, which is the unique identifier of the widget on the page.
Position
- Left: Left margin of the widget in the canvas. Unit: px.
- Top: Top margin of the widget in the canvas. Unit: px.
- Layout Width: Width of the widget. Unit: px.
- Layout Height: Height of the widget. Unit: px.
- Stacking Order: Order of the widget among others. The default value is 1. The widget with the largest value is on the top. If you want to move a widget to the bottom of a stack, set the parameter to 0.
- Auto Height: whether the widget height changes with the width.
- open: If this option is selected, the page adaptation function is displayed in the lower part.
- Page Adapter: Select open to enable height adaptation for the widget. This property enables the position of other widgets below the page to be automatically adjusted based on the height of the widget. One page supports only one widget.
Border
Border of the widget. Options: Full and Corner.
- Full border
- Style: Style of the widget border. Options: Solid, Dotted, Dashed, and Double.
- Width: Border width, in pixels.
- Color: color of the widget border.
- Radius: radian of the four corners of the widget border, in pixels.
- Corner
- Width: Border width, in pixels.
- Length: Border length, in pixels.
- Color: color of the widget border.
- Radius: radian of the four corners of the widget border, in pixels.
- Padding: Spacing between the widget border and the chart, in pixels.
Background
- Style: Background style. Options: Normal, Center, and Stretch.
- Image URL: Change the background image. The image can be in JPG, JPEG, PNG, or GIF format, and the image size cannot exceed 50 MB. The suggested image size is 800 x 800.
Events
On the Events tab page of the widget, set the go Homepage event to implement page redirection after login.
- On the Events tab page, click
next to go Homepage.
- On the event editing page, click Create Action to add a page redirection action or custom action for the event.
- Page redirection
- Page Type: The options are Advanced Page, Standard Page, and External Page.
- Advanced Page: Select the target advanced page that is redirected to after a user successfully logs in. Only advanced pages in the current application can be selected.
- Standard Page: Select the target standard page that is redirected to after a user successfully logs in. Only standard pages in the current application can be selected.
- External Page: Page of a third-party website. The value must start with http:// or https://.
- Action Parameter: Parameters transferred to other pages. You do not need to set this parameter for this widget.
- How does it open: Select the mode in which the target page is opened after a user successfully logs in. The target page can be opened in the current window or a new window.
- Custom Action: Use the built-in function window.open() in JavaScript to define the custom action. The window.open() function is used to open a new window or tab page, and can also specify the attributes and loaded content of the new window.
For example, after a user successfully logs in, the survey page of the questionnaire application is opened. The custom action is configured as follows:Figure 3 Customizing an action
window.open(window.location.origin + 'Page_URL','Page_OpenMode')
- window.location.origin is the root domain name of the current application login page.
- Page_URL is the address of the target page to be opened. You can open the page of an application in Huawei Cloud Astro Zero or customize the page. For example, to obtain the URL of the questionnaire page in the questionnaire application, choose Environment Configuration > Application Management > Applications in the Huawei Cloud Astro runtime environment, and click View next to the questionnaire application.
- Page_OpenMode: Specifies the mode for opening the target page. Generally, this parameter is set to _blank (opening the target page in a new window) or self (opening the target page in the current window).
- Page redirection
Related Documents
In addition to using the login widget, you can also customize the login widget. For details, see Developing a Login Page for Portal Users.
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