Quantcast
Viewing all articles
Browse latest Browse all 853

Add the "Related XX" like the rabbitmq zenpack

Hi everyone, I want to add the "Related XX" like rabbitmq zenpack. But I know I should add the code as following in a js file:

Zenoss.nav.appendTo('Component', [{

    id: 'component_rabbitmq_vhosts',

    text: _t('Related VHosts'),

    xtype: 'RabbitMQVHostPanel',

    subComponentGridPanel: true,

    filterNav: function(navpanel) {

        if (navpanel.refOwner.componentType == 'RabbitMQNode') {

            return true;

        } else {

            return false;

        }

    },

    setContext: function(uid) {

        ZC.RabbitMQVHostPanel.superclass.setContext.apply(this, [uid]);

    }

}]);

 

But what's the key? Only adding the coding like this can't display the related things. Who knows the key problem? Thanks in advance!

Image may be NSFW.
Clik here to view.
2013-05-13_141008.jpg

 

-----

James


Viewing all articles
Browse latest Browse all 853

Trending Articles