ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   Plugins (http://forum.ispsystem.com//forumdisplay.php?f=29)
-   -   add new column (http://forum.ispsystem.com//showthread.php?t=2478)

mduh 07-29-2015 02:14 PM

add new column
 
Hello,

I would like to add new column to one of the vemgr tables. I redefined list and added new column (mountpoint).

Code:

  <metadata name="vm.snapshot" type="list" key="id" keyname="name">
    <toolbar>
      <toolbtn func="uh.snapshot" name="mount" img="t-snapshotdisk" type="editlist" level="user"/>
    </toolbar>
    <coldata>
      <col name="id" type="data" sort="digit" hidden="no"/>
      <col name="guid" type="data" sort="digit" hidden="no"/>
      <col name="name" type="data" sort="alpha"/>
      <col name="date" type="data" sort="alpha" sorted="asc"/>
      <col name="status" sort="prop">
        <xprop name="usersnapshot" value="on" img="p-user"/>
        <xprop name="usersnapshot" value="off" img="p-root"/>
        <prop name="description" img="p-note"/>
        <xprop name="memdump" value="on" img="p-attach"/>
      </col>
      <col name="mountpoint" type="data" sort="alpha"/>
    </coldata>
  </metadata>

In the corresponding plugin I defined output as follows:

elem = "<elem><id>2</id><guid>{267ddcf9-49f1-4f49-a5cb-9368b267b74e}</guid><name>test</name><date>10.06.2015</date><status></status><mountpoint>/mnt/date</mountpoint></elem>"

The contens is rendered, however it seems my output is missing something, as the functions are not working. Is there any way to check what is the original <elem> output to verify how it should look like?

Thanks,
-Maciej

fly 08-05-2015 09:26 AM

Hello,

Plugin have to have type=xml. Then you need to change that xml and add your elem mountpoint.


All times are GMT +2. The time now is 03:19 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.