Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When working with non-templated graphs, it can be difficult to determine what items represent #3233

Closed
frontierliu opened this issue Feb 5, 2020 · 3 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@frontierliu
Copy link
Contributor

Version 1.2.9
When I edit graph items ,the datasource name is less information and hard to verify, as below:
QQ截图20200205103928a

only 'traffic in', no other informations. I think fullname about datasource should be good to editor. as below:
QQ截图20200205105751a

just a little modify to graphs.php
line 1308:
$template_item_list = db_fetch_assoc_prepared('SELECT
gti.id, gti.text_format, gti.value, gti.hard_return, gti.graph_type_id, gti.alpha, gti.textalign,
gti.consolidation_function_id, dtr.data_source_name, cd.name AS cdef_name, c.hex
FROM graph_templates_item AS gti
LEFT JOIN data_template_rrd AS dtr
ON (gti.task_item_id = dtr.id)
LEFT JOIN data_local AS dl
ON (dtr.local_data_id = dl.id)
LEFT JOIN data_template_data AS dtd
ON (dl.id = dtd.local_data_id)
LEFT JOIN cdef AS cd
ON (cdef_id = cd.id)
LEFT JOIN colors AS c
ON (color_id = c.id)
WHERE gti.local_graph_id = ?
ORDER BY gti.sequence', array(get_request_var('id')));

change to:
$template_item_list = db_fetch_assoc_prepared("SELECT
gti.id, gti.text_format, gti.value, gti.hard_return, gti.graph_type_id, gti.alpha, gti.textalign,
gti.consolidation_function_id, CONCAT_WS(' - ', dtd.name_cache, dtr.data_source_name) AS data_source_name, cd.name AS cdef_name, c.hex
FROM graph_templates_item AS gti
LEFT JOIN data_template_rrd AS dtr
ON (gti.task_item_id = dtr.id)
LEFT JOIN data_local AS dl
ON (dtr.local_data_id = dl.id)
LEFT JOIN data_template_data AS dtd
ON (dl.id = dtd.local_data_id)
LEFT JOIN cdef AS cd
ON (cdef_id = cd.id)
LEFT JOIN colors AS c
ON (color_id = c.id)
WHERE gti.local_graph_id = ?
ORDER BY gti.sequence", array(get_request_var('id')));

I have check this code and it work fine. so I request this feature.

@frontierliu frontierliu changed the title graph item edit enhance with item's datasource name display graph item edit enhance with item's datasource full name display Feb 5, 2020
@cigamit
Copy link
Member

cigamit commented Feb 6, 2020

Can you do a pull request against branch 1.2.x? Be quick. We release this weekend.

@frontierliu
Copy link
Contributor Author

OK, I have put a pull request to 1.2.x, please check it.

@netniV
Copy link
Member

netniV commented Feb 6, 2020

Not sure I like the idea of tampering with the datasource right before release... especially as that goes into hooks etc.

@cigamit cigamit added the bug Undesired behaviour label Feb 8, 2020
@cigamit cigamit added this to the v1.2.9 milestone Feb 8, 2020
@cigamit cigamit changed the title graph item edit enhance with item's datasource full name display Its difficult to determine what Graph Items represent when working with a non-templated Graph Feb 8, 2020
cigamit added a commit that referenced this issue Feb 8, 2020
Its difficult to determine what Graph Items represent when working with a non-templated Graph
@cigamit cigamit added the resolved A fixed issue label Feb 8, 2020
@cigamit cigamit closed this as completed Feb 8, 2020
@netniV netniV changed the title Its difficult to determine what Graph Items represent when working with a non-templated Graph When working with non-templated graphs, it can be difficult to determine what items represent Feb 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants