Order of Data Input Fields (parameters input)

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
ottob
Cacti User
Posts: 51
Joined: Tue Apr 27, 2004 11:43 am
Location: Duesseldorf, Germany
Contact:

Order of Data Input Fields (parameters input)

Post by ottob »

Hi,

is it possible to order the textfields while creating a graph by the "field order" value in the 'data input method'?

For example: i use the fields "username" and "password" inside a input method - but they are displayed while graph creation ordered by name (password, username) which sometimes confuses users...

Any ideas? Maybe simply order the textfields by the field order, or give the ability to choose the ordering method?

otto
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please provide an example. I am confusing...

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Brashquido
Cacti User
Posts: 99
Joined: Sat Feb 28, 2004 10:16 pm
Location: Melbourne, Australia
Contact:

Post by Brashquido »

I might be a little confused here too, but isn't field order dictated by the order in which you place your input fields in the input string section?
Dominic Ryan
www.iis-aid.com
ottob
Cacti User
Posts: 51
Joined: Tue Apr 27, 2004 11:43 am
Location: Duesseldorf, Germany
Contact:

Post by ottob »

here's an example:

(I know its only a small "problem" but sometimes confusing...)
Attachments
screenshot
screenshot
cacti.gif (22.48 KiB) Viewed 3592 times
ottob
Cacti User
Posts: 51
Joined: Tue Apr 27, 2004 11:43 am
Location: Duesseldorf, Germany
Contact:

Post by ottob »

Hi developers,

is it possible to change the sorting ability of the custom-fields output in further releases regarding to the described "problem"?

i found out, that changing the line 406 in lib/html_form_template.php

from

Code: Select all

	$fields = db_fetch_assoc("select * from data_input_fields where data_input_id=" . $data["data_input_id"] . " and input_output='in' order by  name");
to

Code: Select all

	$fields = db_fetch_assoc("select * from data_input_fields where data_input_id=" . $data["data_input_id"] . " and input_output='in' order by sequence, name");
will fix this issue...

Thanks,
O
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, but that has the possible implication of breaking, or screwing up other stuff. I would have to check, but generally playing around in the lib files will affect more then one section of cacti.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests