The application must declare new UI components to manage users.
In this document:
To participate in the user creation process, the application must declare a view plugged into the User Creation wizard following these specifics:
http://www.aps-standard.org/ui/service/suwizard.new/2
.http://www.aps-standard.org/core/package#biz
placeholder
to plug the Biz API module to it.The user manager can present users in two modes, grid or tiles. Respectively, the application should declare two view-plugins, one for each mode. Keynotes:
ui/plugins/
folder.http://www.parallels.com/ccp-users#usersview
- to present the application service in the gridhttp://www.parallels.com/ccp-users#userInfo
- to present the application service in a user profileaps.context.params
object as explained in the Data Components table.To enable service users to see and manage the services assigned to them, the application must declare a navigation tree for the MyCP UI:
http://www.aps-standard.org/ui/user/2
placeholder.Continue the demo project started in the previous step.
In the project workspace, update the APP-META.xml
file in a text editor or in APS IDE as described here.
Create two navigation trees for integration with the User Management system tools and one tree for MyCP.
To make the User Creation wizard add an application view into its process,
declare the suwizard
navigation tree and inside it add a view add-user-service
with the following attributes and elements:
context
that allows the view to link new VPSes with the management context.http://www.aps-standard.org/ui/service/suwizard.new/2
.aps.biz
module supporting the high level busines API -
http://www.aps-standard.org/core/package#biz
.After completion of the above modifications the navigation section must look as follows:
<navigation id="suwizard">
<view id="add-user-service" label="Add VPS" src="ui/add-user-service.js">
<var name="context" type-id="http://aps-standard.org/samples/suwizard1p/context/1.0"/>
<plugs-to id="http://www.aps-standard.org/ui/service/suwizard.new/2" />
<plugin-placeholder id="http://www.aps-standard.org/core/package#biz"/>
</view>
</navigation>
Create a navigation tree with two view-plugins, one to present application resources in the list of users and the other one to manage application resources in a user profile:
<navigation id="plugins">
<view-plugin id="vps-user-list-plugin" src="ui/plugins/vps-user-list-plugin.js">
<plugs-to id="http://www.parallels.com/ccp-users#usersview" />
</view-plugin>
<view-plugin id="vps-user-plugin" src="ui/plugins/vps-user-plugin.js">
<plugs-to id="http://www.parallels.com/ccp-users#userInfo" />
</view-plugin>
</navigation>
Note
Keep source files of the view-plugins in the ui/plugins/
folder.
In the vps-wizard
section, declare the user ID as a parameter accepted by the wizard. After that,
the section will look as follows:
<wizard id="vps-wizard" label="New VPS Step-by-Step"
src="/ui/vps-wizard.js" step-label="VPS Creation">
<placeholder id="vps-wizard"/>
<params spec="version=ge=2.1">
<param name="userId" type="string"/>
</params>
</wizard>
Create a navigation tree plugged into the service user control panel. It must have one view that allows users to manage VPSes assigned to them.
<navigation id="mycp" label="My Virtual Servers">
<plugs-to id="http://www.aps-standard.org/ui/user/2" />
<view id="ownservers" label="My own servers" src="ui/myservers.js"></view>
</navigation>
The project file APP-META.xml
you have created is similar to the respective file in the
sample package
.
You will develop the views included into the navigation trees in the Presentation Logic section.