VMware Cloud Community
krajamani
Contributor
Contributor

views

There are default views for top,df etc.
But, how to create a custom view?
0 Kudos
5 Replies
excowboy
Virtuoso
Virtuoso

0 Kudos
krajamani
Contributor
Contributor

Hi,

Following the document, I have created a cool plugin and attached it to masthead.

Now I want to edit app/FreezerController.groovy to display the contents of a file
like cat <filename>. Is it possible? How to do this?

My FreezerContriller.groovy looks like

import org.hyperic.hq.hqu.rendit.BaseController

class FreezerController
extends BaseController
{
protected void init() {
onlyAllowSuperUsers()
}

def index(params) {
// By default, this sends views/freezer/index.gsp to
// the browser, providing 'plugin' and 'userName' locals to it
//
// The name of the currently-executed action dictates which .gsp file
// to render (in this case, index.gsp).
//
// If you want to render AJAX, read RenderFrame.groovy for parameters.
render(locals:[ plugin : getPlugin(),
userName: user.name])
}
}

Thanks,
Rajamani
0 Kudos
krajamani
Contributor
Contributor

Can anybody help?

How to edit the files
index.gsp and plugini18n.properties
to include shell script in it.

I want to display the output of a shell script in hyperic within a view.

Thanks,
Rajamani
0 Kudos
krajamani
Contributor
Contributor

Hello,

Top is a default view which displys the output for top command.
Like this, I want to disply output of any linux command in my custom view.
How to do this?

Thanks,
Rajamani
0 Kudos
krajamani
Contributor
Contributor

Hello,

How to use php code in index.gsp file to view the contents of a file.

I used php code to read a file, but showing no output and no error.

Thanks,
Rajamani
0 Kudos