Change Dashboard and Agnet UI

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Change Dashboard and Agnet UI

linux168
We like to make the dashboard not showing entries with 'Status' == "NOT deployed" and
Agent (web page) not showing 'Hostname' == "--".
Which area in the source we should look into?
Is any way to control this in the config files?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

frenchyan
Administrator
You should be able to achieve the dashboard view you want by having the proper filter on status (you can check this: http://pongasoft.github.io/glu/docs/latest/html/console.html#customization)

In regards to the agent page, no it is not configurable at this time. The source code is there: https://github.com/pongasoft/glu/blob/master/console/org.linkedin.glu.console-webapp/grails-app/views/agents/list.gsp

Yan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

linux168
On my Dashboard, I have three rows. One 'ERROR', one 'running', and one 'Not deployed'.
When I change "source":"status" to "source":"status='running'",  click on _Save changes_ button,
and the Dashboard shows no entry at all.
How do I specify if I want to display only a specific source?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

linux168
In reply to this post by frenchyan
Does  "Filter" work with 'state', 'status', and 'statusInfo'?
I use dashboard to click on the 'ERROR' or 'OK' but dashboard show no entry.
What do I do wrong?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

frenchyan
Administrator
This is how you do it: in the customize section you add one more entry:

,
    {
      "groupBy": "uniqueCountOrUniqueVal",
      "linkable": true,
      "name": "metadata.currentState",
      "orderBy": "asc",
      "source": "metadata.currentState",
      "visible": false
    }

(do not forget to add a comma before the entry!) and a customFilter:

  "customFilter": "or{metadata.currentState='running';metadata.currentState='stopped';metadata.currentState='installed'}",

That will do the trick (there is no "shorter" filter as there is no way to currently express: metadata.currentState is undefined).


Yan


Screen Shot 2014-02-22 at 8.18.12 AM.png (62K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

linux168
1st of, thanks for the tip, it works.

So I follow this thread:
http://glu.977617.n3.nabble.com/customize-dashboard-td4025205.html;cid=1393263417250-921
to add the customized section to glu-console-webapp.groovy and restart glu console.

But the <default> behavior still remains the same.
I even change dashboardAgentLinksToAgent: from (default) 'false' to 'true'
to see if I modify the right file. It seems I modify the right file because
clicking on the agent name behaves differently.
I also change "summary" from 'true' to 'false'. But after I restart glu console,
the default dashboard still displays using 'summary: true'.
Did the behavior change since 2012? Or I forgot to do something?

-- before (or default) ---
  dashboard:
    [
      [ name: "mountPoint", source: "mountPoint" ],
      [ name: "agent",      source: "agent"],
      [ name: "tags",       source: "tags",       groupBy: "uniqueVals"],
      [ name: "container",  source: "metadata.container.name"],
      [ name: "version",    source: "metadata.version"],
      [ name: "product",    source: "metadata.product"],
      [ name: "cluster",    source: "metadata.cluster"],
      [ name: "status",     source: "status" ],
      [ name: "statusInfo", source: "statusInfo", groupBy: "vals", visible: false],
      [ name: "state",      source: "state",                       visible: false]
    ],
    tags:
---- AFTER ---

  dashboard:
"""
{
  "columnsDefinition": [
    {
      "groupBy": "uniqueCountOrUniqueVal",
      "linkable": true,
      "name": "mountPoint",
      "orderBy": "asc",
      "source": "mountPoint",
      "visible": true
    },
         …….
    },
    {
      "groupBy": "uniqueCountOrUniqueVal",
      "linkable": true,
      "name": "metadata.currentState",
      "orderBy": "asc",
      "source": "metadata.currentState",
      "visible": false
    }
  ],
  "customFilter": "metadata.currentState='running'",
  "errorsOnly": false,
  "name": "<default>",
  "summary": false
}
""",
   tags:
------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

frenchyan
Administrator
The <default> dashboard is copied to a new user. Once copied it does not change. In order to see the changes, simply select <default> in the UI then Customize, then delete. This will force to load the one you changed in the configuration file.

On another note, the entry:

,
    {
      "groupBy": "uniqueCountOrUniqueVal",
      "linkable": true,
      "name": "metadata.currentState",
      "orderBy": "asc",
      "source": "metadata.currentState",
      "visible": false
    }

is actually not required. Only the customerFilter is required to achieve what you want to do.

Yan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

linux168
In order to achieve the different <default> dashboard,
which file should I modify before I run:
$GLU_HOME/bin/setup.sh -D -o dists models/glu-meta-model.json.groovy

Basically what I like to achieve is after the console/agent/zk are generated,
the <default> dashboard already contains "summary:false" and "customFilter:…" attributes.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change Dashboard and Agnet UI

frenchyan
Administrator
The file: https://github.com/pongasoft/glu/blob/master/packaging/org.linkedin.glu.packaging-setup/src/cmdline/resources/config-templates/console-server/conf/glu-console-webapp.groovy.gtmpl is the template that gets processed during the setup process.

The easiest way for you to change the default dashboard during setup is to add the following entry to your meta model (glu-meta-model.json.groovy) (this is described here: http://pongasoft.github.io/glu/docs/latest/html/console.html#ui-configuration)

consoles << [
   name: 'xxx',
   ...,
   configTokens: [
     'console.defaults.override': """
console.defaults.dashboard = <your new definition goes here>
     """
   ]
],

Yan
Loading...