-
Notifications
You must be signed in to change notification settings - Fork 19
Plugins
Dariusz Jarosz edited this page Nov 4, 2019
·
12 revisions
The purpose of this wiki is to show how some plugins are configured to work with ComponentDB.
- cd into CDB installation directory.
- cd into etc/plugins-(deployment-name)
- Two approaches
rm -rf (plugin-name)
-
cd (plugin-name)
and edit configuration files.
- Redeploy the plugin
- cd into CDB distribution directory.
- run
source setup.sh
- run
make deploy-cdb-plugin
- If the plugin config was removed you will be prompted to configure it again.
- Otherwise the new configuration will be applied.
- redeploy the cdb
- make deploy-web-portal
The orgLinks plugin allows each facility to define a set of useful links to be displayed on about page, for example a link to the development deployment of the application and the production deployment, facility home page, etc. Please follow the steps below to define your orgLinks plugin.
- cd into CDB distribution directory.
- run
source setup.sh
- run
make deploy-cdb-plugin
- use the default directory
- type the number that corresponds to orgLinks plugin
- follow prompts to configure the plugin
- The utility will prompt you for configuration of your links. They are defined in json format. Example is provided with plugin (default value).
- Format is: [{ name: text, href[optional]: text, children[optional]: [links] }]
# JSON example in pretty print. Use single line for configuration.
[
{
"name": "Help Tools",
"children": [
{
"name": "CDB User Manual",
"href": "https://confluence.aps.anl.gov/x/fYB3AQ"
}
]
},
{
"name": "CDB Development",
"href": "https://cdb-dev.aps.anl.gov/"
}
]
- run
make deploy-web-portal
- Navigate to about page and you should see the configured links.
The ComponentDB can integrate with the traveler system by allowing the user to create and link traveler forms, instances, and binders to components. This section will outline the steps needed for connecting the two applications together.
- Deploy the traveler system: https://github.com/AdvancedPhotonSource/traveler (follow instructions in the readme or utilize docker configurations)
- Edit service.json configuration of the traveler system to have information for CDB.
{
"device_application": "cdb",
"cdb" : {
"web_portal_url": "https://cdburl/cdb",
"web_service_url":"http://webserviceurl:10232/cdb"
}
}
- NOTE: Traveler configuration directory is: travelerInstallDir/etc/traveler-config
- cd into CDB distribution directory.
- run
source setup.sh
- run
make deploy-cdb-plugin
- use the default directory
- type the number that corresponds to traveler plugin
- follow prompts to configure the plugin
- Prompt descriptions
- WebService.url: api port was configured in the api.json file
- webService.basicAuth.username: (keep default - api_write implies permission in traveler app)
- webService.basicAuth.password: configured in the api.json file the value of api_write
- webApp.url: Used for generating URL to the traveler, enter URL that you would use to access traveler.
- webApp.TemplatePath: Likely keep default
- webApp.TravelerPath: Likely keep default
- webApp.BinderPath: Likely keep default
- webApp.TravelerConfigPath: Likely keep default
- Prompt descriptions
- run
make deploy-web-portal
- Add the property for traveler instance, traveler binder, and traveler template.
- Navigate the the portal
- Log in as administrative account
- On navigation bar expand administrative and click on Property Types
- Create Traveler instance, traveler template, and traveler binder properties.
- Click Add
- Fill in the property name, select internal
- Select handler for the corresponding traveler instance/binder/template
- Click Save
- Repeat until all traveler properties are added
- [Optionally] for traveler template property, you can add traveler template ids as an 'allowed value' to allow any inventory item to create corresponding instance.
- You should now find a section for traveler template on a catalog item details. You need to add some templates for its inventory items to have selection to create traveler instances from.