Device Location Setting

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

Device Location Setting

#1 Post by xdracco » Tue Oct 08, 2019 8:16 pm

Navigate to console -> management -> devices -> new

Under "General Device Options", the option Location is a dropdown with a description reads that "The physical location of the Device. This free form text can be a room, rack location, etc.". This should be a text box, not a drop down menu (see attached image).

As such, in ~/include/global_form.php, I've commented out lines 1143 - 1152:

Code: Select all

//	'location' => array(
//		'method' => 'drop_callback',
//		'friendly_name' => __('Location'),
//		'description' => __('The physical location of the Device.  This free form text can be a room, rack location, etc.'),
//		'none_value' => __('None'),
//		'sql' => 'SELECT DISTINCT location AS id, location AS name FROM host ORDER BY location',
//		'action' => 'ajax_locations',
//		'id' => '|arg1:location|',
//		'value' => '|arg1:location|',
//		),
... and replaced with the following code:

Code: Select all

	'location' => array(
		'method' => 'textbox',
		'friendly_name' => __('Location'),
		'description' => __('The physical location of the Device.  This free form text can be a room, rack location, etc.'),
		'sql' => 'SELECT DISTINCT location AS id, location AS name FROM host ORDER BY location',
		'value' => '|arg1:location|',
		'max_length' => '250',
		'size' => '60',
		),
which replaces the drop down option with a free form text box.

If I'm completely wrong about this setting, I'd appreciate if a developer would correct me. Otherwise, i'm hoping this makes it into the next update.

Thank you for making cacti!!
Attachments
Screen Shot 2019-10-08 at 6.13.48 pm.png
Screen Shot 2019-10-08 at 6.13.48 pm.png (105.8 KiB) Viewed 335 times
The answer to life, the universe and everything is int main() {}


xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

Re: Device Location Setting

#3 Post by xdracco » Sun Oct 13, 2019 10:42 am

current version, 1.2.7 but this has been persistent for many versions.
The answer to life, the universe and everything is int main() {}

netniV
Cacti Guru User
Posts: 2882
Joined: Sun Aug 27, 2017 12:05 am

Re: Device Location Setting

#4 Post by netniV » Sun Oct 13, 2019 2:18 pm

I think this is a drop-down combo that allows you to put what you like in but also to select previous entries.

Post Reply