Archived community.zenoss.org | full text search
Skip navigation
1474 Views 0 Replies Latest reply: Oct 7, 2011 11:45 AM by jcurry RSS
jcurry ZenossMaster 1,021 posts since
Apr 15, 2008
Currently Being Moderated

Oct 7, 2011 11:45 AM

ZenPack example template

There is an excellent BLOG post by Chet with a VERY WELL DOCUMENTED example ZenPack that will become the standard template for all ZenPacks.  Sometimes BLOG posts don't get seen so well as forum posts, so this is an extra heads-up.  Go to blogs/zenossblog/2011/09/23/zenpacktemplate-self-documented-zenpack-example#comments .

 

I have posted a couple of comments - one of which cost me lots of time - I append it here.

 

LARGE warning on one element of this example ZenPack.

 

The ExampleDevice.js file defines javascript for the component grid panel for a new component called ExampleComponent:

 

ZC.ExampleComponentGridPanel = Ext.extend(ZC.ComponentGridPanel, {

 

and at the end...

Ext.reg('ExampleComponentGridPanel', ZC.ExampleComponentGridPanel);

 

Unfortunately, to get this to work and see anything other than the default compnent grid panel, the name has to be the component name (ExampleComponent) catenated with Panel ie. ExampleComponentPanel NOT Example ComponentGrid Panel, so those lines should be:

 

ZC.ExampleComponentPanel = Ext.extend(ZC.ComponentGridPanel, {

 

and

 

Ext.reg('ExampleComponentPanel', ZC.ExampleComponentPanel);

 

I would strongly suggest changing the samples and hope that this will save anyone else spending quite so long trying to debug this one!

 

Cheers,

Jane

More Like This

  • Retrieving data ...

Incoming Links

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points