TECHZEN Zenoss User Community ARCHIVE  

ZenPackLib - compopnent guid display - remove defaulted Name column

Subject: ZenPackLib - compopnent guid display - remove defaulted Name column
Author: Pheripheral Pheripheral
Posted: 2019-06-17 11:12

I'm adding a new compoent tyope via zenpacklib, using a yaml file
and have got it creating and the relationship to my device setup and working.
Its a fairly simple component with three properties:
vlanName
vlanTag
vlanType

yaml is :
properties:
  vlanName:
  type: string
  label: Vlan Name
  label_width: 150
  order: 1
  vlanTag:
   type: int
                label: Vlan Tag
                order: 2
vlanType:
         type: string
         label: Vlan Type
         label_width: 150
         order: 3

all well and good so far.

my problem is that one it is display in the GUI, the panel showing the components has an exta ciolumn called Name that seems to just show the id of thje componenet (in this case id is just set to the snmpindex in my modeller)

how do i tell the yaml not to show the Name / id column, as its taking up a lot of my screen real estate
????

------------------------------
Pheripheral Pheripheral
------------------------------


Subject: RE: ZenPackLib - compopnent guid display - remove defaulted Name column
Author: Patrick McMahon
Posted: 2019-06-18 08:39

First an alternative
Drop using the vlanName property
and just set the "Name" column to the VLan Name value (which in the modeler is done by setting the "title" property)

If you really want to hide the "Name" column, I think you can get away with the following in the yaml but dont know if there will be unforeseen consequences

properties:
  title:
    type: string
      grid_display: false

------------------------------
Patrick McMahon
Sr. Security and Compliance Specialist
Zenoss
------------------------------


Subject: RE: ZenPackLib - compopnent guid display - remove defaulted Name column
Author: Jay Stanley
Posted: 2019-06-18 09:25

I agree with Patrick. I would drop the extra property and set title to vLan Name. I would never hide the default title field. Since the search box uses that to search and the events will be linked to it (Event component will show the value under Name, instead of what I would assume you would want vLan Name)

------------------------------
jstanley
------------------------------


Subject: RE: ZenPackLib - compopnent guid display - remove defaulted Name column
Author: Pheripheral Pheripheral
Posted: 2019-06-18 09:40

Thanks for the replies.

I've now changed it to set the title field in the modeler as suggested and ditched the seperate vlanName property.

I did have a play with the yaml hiding the title field, but the yaml suggested above seems to have no effect, the Name column still appearing.
If i add
title:
   type: string
   label: Vlan Name

I get another column alongside the defaulted Name column, also showing the title.
can't find any way at all to hide the Name column even if i wanted to! (although now i don't need to)

Thanks

------------------------------
Pheripheral Pheripheral
------------------------------


< Previous
Help with Zenpack monitoring and general upgrade/use questions
  Next
PythonCollector try to access the components with config.datasources (dsplugin.p ...
>