How to find your custom modules and themes on your Developer Portal
Guidance on how to find what custom modules and themes you installed on your Developer Portal.
Method 1. Developer Portal admin status report (recommended)
- Log in to your Developer Portal as the administrator.
- If the administrator dashboard is not displayed, click Manage to display it.
- Click
- The custom modules and themes are listed in the Custom Modules and Custom Themes sections at the end of the page.
.
- Check which of your custom modules are enabled or disabled by clicking
- The enabled modules are displayed with a selected checkbox, and the disabled ones are not selected as seen in the following example.
.
- Check which of your custom themes are enabled or disabled by clicking
- Find your themes that are categorized into Enabled and Disabled sections.
.
Method 2. Developer Portal toolkit CLI
Use the custom-module:create-export
and
custom-theme:create-export
commands to extract your custom modules and themes into
a compressed file.
The compressed file includes a list of your custom modules and themes. For more information about using the Developer Portal toolkit CLI and all the other features it offers, see Overview of the Developer Portal command-line tool.
- To list your modules, implement the following steps:
- Log in to the Developer Portal toolkit CLI as a provider organization.
- Run the following
custom-module:create-export
command against the Developer Portal.apic custom-module:create-export --mode portaladmin [flags]
- Specify the appropriate
org
andcatalog
name.
For example,
❯ SERVER=myserver.ibm.com ❯ apic login -s $SERVER -r provider/default-idp-2 -u steve Warning: Using default toolkit credentials. Enter your API Connect credentials Password? Logged into myserver.ibm.com successfully ❯ apic -s $SERVER -m portaladmin custom-module:create-export -o ibm -c api-connect-catalog-1 201 CREATED - Task ID: x8jupowmktkf8f2r Response Code - 202: Message(s) - The status of this task is: QUEUED Response Code - 200: Message(s) - The status of this task is: FINISHED and the artifact can now be streamed Saving File (Large files may take a while)... Incoming project saved to custom_module_createExport-20230322143819.tgz
After the command has run, extract your compressed export to see the modules inside. Or usetar
directly as shown in the following example.❯ tar --exclude='*/*' -tvf custom_module_createExport-20230322143819.tgz drwxr-sr-x aegir/aegir 0 2023-03-22 12:05 chosen/ drwxr-sr-x aegir/aegir 0 2023-03-22 12:05 google_tag/ drwxr-sr-x aegir/aegir 0 2023-03-22 12:05 snowflakes/
- To check which one of your custom modules are enabled or disabled, implement the following
steps:
- Run the following
modules:list
command to print the list of installed modules.apic modules:list --mode portaladmin [flags]
- Search for your custom modules from the result.
For example,
❯ SERVER=myserver.ibm.com ❯ apic -s $SERVER -m portaladmin modules:list -o ibm -c api-connect-catalog-1 --no-core . . . chosen: package: 'User interface' display_name: 'Chosen (chosen)' status: Disabled version: 3.0.5 google_tag: package: Statistics display_name: 'Google Tag Manager (google_tag)' status: Enabled version: 8.x-1.6 snowflakes: package: 'User interface' display_name: 'Snowflakes (snowflakes)' status: Enabled version: 2.0.1 . .
- Run the following
- To list your custom themes, implement the following steps:
- Log in to the Developer Portal toolkit CLI as a provider organization.
- Run the following
custom-theme:create-export
command against the Developer Portal.apic custom-theme:create-export --mode portaladmin [flags]
- Specify the appropriate
org
andcatalog
name.For example,
❯ SERVER=myserver.ibm.com ❯ apic login -s $SERVER -r provider/default-idp-2 -u steve Warning: Using default toolkit credentials. Enter your API Connect credentials Password? Logged into api.fyre-ci-136264-master.fyre.ibm.com successfully ❯ apic -s $SERVER -m portaladmin custom-theme:create-export -o ibm -c api-connect-catalog-1 201 CREATED - Task ID: oh595vuywxsz3526 Response Code - 202: Message(s) - The status of this task is: QUEUED Response Code - 200: Message(s) - The status of this task is: FINISHED and the artifact can now be streamed Saving File (Large files may take a while)... Incoming project saved to custom_theme_createExport-20230322143856.tgz
After the command has run, extract your compressed export to see the themes inside. Or usetar
to view the contents directly as shown in the following example.❯ tar --exclude='*/*' -tvf custom_theme_createExport-20230322143856.tgz drwxr-sr-x aegir/aegir 0 2023-03-22 14:36 emerald_theme_css/ drwxr-sr-x aegir/aegir 0 2023-03-22 14:36 ruby_theme_scss/ drwxr-sr-x aegir/aegir 0 2023-03-22 14:36 sapphire_theme_css/
- To check which of your custom themes are enabled or disabled, implement the following steps:
- Run the following
themes:list
command to print the list of installed themes.apic themes:list --mode portaladmin [flags]
- Search for your custom themes from the result.
For example,
❯ SERVER=myserver.ibm.com ❯ apic -s $SERVER -m portaladmin themes:list -o ibm -c api-connect-catalog-1 --no-core bootstrap: package: Bootstrap display_name: 'Bootstrap (bootstrap)' status: Enabled version: 8.x-3.27 . . . emerald_theme_css: package: Bootstrap display_name: 'emerald_theme_css (emerald_theme_css)' status: Disabled version: null ruby_theme_scss: package: Bootstrap display_name: 'ruby_theme_scss (ruby_theme_scss)' status: Disabled version: null sapphire_theme_css: package: Bootstrap display_name: 'sapphire_theme_css (sapphire_theme_css)' status: Disabled version: null
- Run the following
Method 3. Developer Portal container
If you are unable to access the Developer Portal settings or the Developer Portal toolkit CLI, check the Developer Portal container running within your Kubernetes or Red Hat OpenShift environment.
-
Use
kubectl
oroc
for Red Hat OpenShift environment to obtain a shell to the Developer Portal running container.Your Developer Portal sites are located within theportal-www
pod in theadmin
container within the namespace that your Developer Portal subsystem is deployed to as seen in the following example.❯ kubectl get pods -n apic | grep www portal-014179b4-www-0 2/2 Running 0 8d ❯ kubectl exec -n apic -it portal-014179b4-www-0 -c admin -- bash bash-4.4$
-
After you access the container, use the command
list_sites -a
to obtain the site alias for your Developer Portal. For example,bash-4.4$ list_sites -a daae4642-b1e2-4fd8-a5a7-77a68ed812ef.944dce4f-bbad-41ce-b166-aa2c9f8c4b17 => ibm.api-connect-catalog-1.portal.fyre-ci-136264-master.fyre.ibm.com (INSTALLED) daae4642-b1e2-4fd8-a5a7-77a68ed812ef.c560c004-852d-42c3-ae4e-797144a857af => ibm.api-connect-catalog-2.portal.fyre-ci-136264-master.fyre.ibm.com (INSTALLED)
The Developer Portal
portal.fyre-ci-136264-master.fyre.ibm.com/ibm/api-connect-catalog-1
has the site aliasibm.api-connect-catalog-1.portal.fyre-ci-136264-master.fyre.ibm.com
. -
After you identify the Developer Portal that you want to look at, use the alias string within a
find
command to list your modules and themes, as shown in the following example.bash-4.4$ find /web/platforms/devportal*/sites/myserver.ibm.com/modules -mindepth 1 -maxdepth 1 -type d -exec basename {} \; chosen google_tag snowflake bash-4.4$ find /web/platforms/devportal*/sites/ibm.api-connect-catalog-1.portal.fyre-ci-136264-master.fyre.ibm.com/themes -mindepth 1 -maxdepth 1 -type d -exec basename {} \; emerald_theme_css ruby_theme_scss sapphire_theme_css
-
To check which of your custom modules and themes are enabled or disabled, implement the following sub-steps:
- Use the
drush
command-line tool within the container to print the list of installed modules and themes for your Developer Portal. - Then, use the site alias that you obtained earlier to run the following
drush
command and find your custom modules and themes.bash-4.4$ drush @myserver.ibm.com pml --no-core Running: drush -y @daae4642-b1e2-4fd8-a5a7-77a68ed812ef-944dce4f-bbad-41ce-b166-aa2c9f8c4b17 pml --no-core --------------------------------- ----------------------------------------------------------------------------------- ---------- ---------------- Package Name Status Version --------------------------------- ----------------------------------------------------------------------------------- ---------- ---------------- User Account Field Split (account_field_split) Enabled Access control ACL (acl) Enabled . . . User interface Chosen (chosen) Disabled 3.0.5 Statistics Google Tag Manager (google_tag) Disabled 8.x-1.6 User interface Snowflakes (snowflakes) Disabled 2.0.1 Bootstrap Bootstrap (bootstrap) Enabled 8.x-3.27 Bootstrap connect_theme (connect_theme) Enabled 8.x-99.0.15 Bootstrap emerald_theme_css (emerald_theme_css) Disabled Bootstrap ruby_theme_scss (ruby_theme_scss) Disabled Bootstrap sapphire_theme_css (sapphire_theme_css) Disabled
- Use the
Results
Next steps
Ensure that you keep your custom modules and themes up to date, and remove deprecated code within your own written custom modules and themes. If you are not using a custom module or theme, consider removing it. This helps mitigate problems when you want to migrate or upgrade your Developer Portal.