|
|
| Author |
Message |
monideth Cacti User
Joined: 03 Apr 2003 Posts: 91
|
Posted: Fri Apr 11, 2003 10:29 am Post subject: Cacti 0.8 (pre20030411) - Suggested Values - ordering |
|
|
Is anybody else experiencing problems with moving "Suggested Values" entries up and down?!
For example, the link of the movedown icon is:
snmp.php?action=item_movedown_dssv&snmp_query_graph_id=13&id=76&snmp_query_id=1&data_template_id=1&field_name=title
Deleting the entries seems to be OK.
Regards,
Mon |
|
| Back to top |
|
 |
monideth Cacti User
Joined: 03 Apr 2003 Posts: 91
|
Posted: Sun Apr 13, 2003 9:11 am Post subject: |
|
|
I'm still trying to work out why the ordering is not working!
Does anybody know what the "snmp_query_id=1" value is used for?
I have tried manually re-order the entries mysql database tables itself - it seems to work.
for example, the original table for entries 15 and 16 are:
| Code: | +----+---------------------+----------+------------+------------------------------------------------------------------------------+
| id | snmp_query_graph_id | sequence | field_name | text |
+----+---------------------+----------+------------+------------------------------------------------------------------------------+
| 15 | 13 | 1 | title | |host_description| - Traffic - |squery_ifAlias| |
| 16 | 13 | 2 | title | |host_description| - Traffic - |squery_ifIP| (|squery_ifDesc|) | |
I then use the following mySQL commands:
| Code: | update snmp_query_graph_sv set sequence=2 where id=15;
update snmp_query_graph_sv set sequence=1 where id=16; |
Now the table shows correctly the new order:
| Code: | +----+---------------------+----------+------------+------------------------------------------------------------------------------+
| id | snmp_query_graph_id | sequence | field_name | text |
+----+---------------------+----------+------------+------------------------------------------------------------------------------+
| 15 | 13 | 2 | title | |host_description| - Traffic - |squery_ifAlias| |
| 16 | 13 | 1 | title | |host_description| - Traffic - |squery_ifIP| (|squery_ifDesc|) | |
When I refresh the page view the order is shown correctly!
Can anybody help?!
Regards,
Mon |
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2234 Location: Carlisle, PA
|
Posted: Sun Apr 13, 2003 11:58 pm Post subject: |
|
|
I'm sorry that I did not get to this sooner so you would not have had to waist so much time on this problem. The problem basically boiled down to me not putting quotes around a string value in an SQL query. It has been fixed in CVS and in the latest release that I just pushed out.
Let me know if you run into any other problems.
-Ian |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Apr 14, 2003 3:14 am Post subject: |
|
|
RaX / Ian
Brilliant! I'll try the CVS today and will let you know.
Hey, at least I'm learning how to use PHP and mySQL! This is probably the best way to learn!
Regards,
Mon |
|
| Back to top |
|
 |
monideth Cacti User
Joined: 03 Apr 2003 Posts: 91
|
Posted: Mon Apr 14, 2003 3:41 am Post subject: |
|
|
RaX,
Ok I have tried it....it works! Hoorah!
I did notice something after I had made a mistake and entered "title" instead of "name" for the "Data Template" section of "Suggest Vlaues". The "title" entry came after the "rrd_maximum" entry and I was not able to move it up; or move the "rrd_maximum" entry up or down. This is probably by design and similar Field Names are group together and cannot be mixed - correct?!
Regards,
Mon |
|
| Back to top |
|
 |
|