Skip to content

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

Closed
@frontierliu

Description

@frontierliu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions