Re: PCP Updates: RHBZ 1348349: pmchart(1): Table of metrics, instances and values

"Dave Brolley" <[email protected]>
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
On 10/18/2016 07:37 PM, Nathan Scott wrote:
> I think this should do it:
> - you can find the tab at the top of the stack via PmChart::activeTab()
> - with that, you can find the active chart using Tab::currentGadget()
> - the Chart class inherits from Gadget, so can test on equality with the
>    current gadget to find the selected chart I think.
>
> You might need to take special care with the order of event handling,
> since you're also working with the same event that changes the current
> selected chart, maybe (i.e. clicking on a chart).  Or it might Just Work,
> as-is.
Nope --- didn't work. The chart always seems to be the current one when 
the "selected" signal is received. I left the code to test for this in 
so that you can have a look.
> Looks good to me.  Resizing working nicely too - one thing that might
> help with the final row (and its values) being "oversized" could be to
> insert an extra, empty row at the end?  That way the vertical resize
> (which isn't helpful for this dialog really) resizes that empty row
> while all the data rows would look consistently sized.
Done.
> Not sure why, but the Hostname column is always reporting "unknown" for
> me for all values.  Gadget::hosts() might be worth perusing in terms of
> other code that extracts hostnames from individual metrics.
I was able to extract the host name directly from the each chart item by 
making the ChartItem::hostname() method public.

Dave

------------------------------------------

Changes committed to ssh://git.pcp.io/oss/git/brolley/pcp master

Dave Brolley (1):
       pmchart(1): Improvements to metric details window.

src/pmchart/chart.cpp |   27 ++++++++++++---------------
  src/pmchart/chart.h   |    2 +-
2 files changed, 13 insertions(+), 16 deletions(-)

Details ...

commit 0954e7c9d9f7b1e1d374dfbc8a6b95335b304b76
Author: Dave Brolley <[email protected]>
Date:   Thu Oct 20 17:36:09 2016 -0400

     pmchart(1): Improvements to metric details window.

     - Add an empty row to the end of the table, which will get stretched
       when the indow is stretched vertically.
     - Obtain the hostname directly from each chart item.


-=-=-=-=-=-=-=-=-=-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#14564): https://groups.io/g/pcp/message/14564
View All Messages In Topic (7): https://groups.io/g/pcp/topic/2881991
Mute This Topic: https://groups.io/mt/2881991?uid=174580
New Topic: https://groups.io/g/pcp/post

Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580

Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]

Terms of Service: https://groups.io/static/tos

Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.