5 Replies Latest reply: Mar 2, 2009 6:15 PM by krajamani RSS

    views

    krajamani Hot Shot
      There are default views for top,df etc.
      But, how to create a custom view?
        • 2. Re: views
          krajamani Hot Shot
          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
          • 3. Re: views
            krajamani Hot Shot
            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
            • 4. Re: views
              krajamani Hot Shot
              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
              • 5. Re: views
                krajamani Hot Shot
                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