Changing the Landing Page in the Publisher
ES allows you to customize as to which asset type details you wish to view in the landing page when logging into the Publisher. The following are the two scenarios in which the landing page is changed:
Change the landing page in the default ES implementation
Follow the instructions below to change the landing in the Publisher in the default ES implementation:
For more information on app extensions, see Introduction to App Extensions.
- Create the shell of an app extension. For more information, see Creating the Shell of an App Extension.
Define the path to the new landing page using the
app.server
callback method, in the Publisherapp.js
file, which is in the<ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/app/publisher-common
directory.Example:
Add theservicex
page as the landing page as follows:landingPage:'/assets/servicex/list',
For example when changing the landing page together with other customizations it may look as follows:
app.server = function(ctx) { return { endpoints: { pages: [{ title: 'Publisher | Servicex Page', url: 'servicex_global', path: 'servicex_global.jag' }, { title: 'Publisher | Servicex Splash page', url: 'splash', path: 'servicex_splash.jag' }] }, configs:{ landingPage:'/assets/servicex/list', disabledAssets:['gadget'] } } };
Restart ES, so that ES evaluates the changes in the
app.js
file.
Thereafter, you can access the ES console and check if the landing page has changed.
http://<ES_HOST>:<ES_HTTP_PORT>/publisher
https://<ES_HOST>:<ES_HTTPS_PORT>/publisher
Example:
http://localhost:9763/publisher
https://localhost:9443/publisher
Change the landing page via an app extension
This scenario is applicable if you have customized the default ES implementation using an app extension. Follow the instructions below to change the landing in the Publisher via an app extension:
For more information on app extensions, see Introduction to App Extensions.
- Create the shell of an app extension. For more information, see Creating the Shell of an App Extension.
Add a dependency to the default app extension in the Publisher, using the
app.dependencies
property, in theapp.js
file, which is located in the<ES_HOME>/repository/deployment/server/jaggeryapps/publisher/extensions/app/<APP_EXTENSION_NAME>
directory.app.dependencies = ['publisher_common'];
Define the path to the new landing page, using the
app.server
callback method, in the Publisherapp.js
file.Example:
Add theservicex
page as the landing page as follows:landingPage:'/assets/servicex/list',
For example when changing the landing page together with other customizations it may look as follows:
app.dependencies = ['publisher_common']; app.server = function(ctx) { return { endpoints: { pages: [{ title: 'Publisher | Servicex Page', url: 'servicex_global', path: 'servicex_global.jag' }, { title: 'Publisher | Servicex Splash page', url: 'splash', path: 'servicex_splash.jag' }] }, configs:{ landingPage:'/assets/servicex/list', disabledAssets:['gadget'] } } };
Restart the ES server, so that ES evaluates the changes in the
app.js
file.
Thereafter, you can access the Publisher and check if the landing page has changed.
http://<ES_HOST>:<ES_HTTP_PORT>/publisher
https://<ES_HOST>:<ES_HTTPS_PORT>/publisher
Example:
http://localhost:9763/publisher
https://localhost:9443/publisher