more feedback when deleting items

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
JustinHoMi
Posts: 17
Joined: Mon Oct 07, 2002 3:42 pm

more feedback when deleting items

Post by JustinHoMi »

Howdy. Could we get some more feedback when deleting items? It would be nice if it said what graph/data source/etc we're removing in the confirmation box. On a hi-res monitor it can be hard to line up the "remove" link with the proper item. Having alternating colors (maybe a very light gray) in the rows wouldn't hurt either.

Thanks !

Justin
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

It's quite easy to improve. I can't give you exact line numbers to change because I have heavily modified cacti on my server. Let's take as an example removing DS. In ds.php you need to find line "case 'remove':". Here starts removal procedure. There is the following line inside:

Code: Select all

DrawConfirmForm("Are You Sure?", "Are you sure you want to delete this data source?", $current_script_name, "?action=remove&id=$id");
You need to retrieve a name of DS before displaying the question and put it inside. So the above line should be changed like this:

Code: Select all

$sql_id = mysql_query("select name from rrd_ds where id=$id", $cnn_id);
$rem_name = mysql_result($sql_id, 0, "name");
DrawConfirmForm("Are You Sure?", "Are you sure you want to delete \"" . $rem_name . "\"?", $current_script_name, "?action=remove&id=$id");
Similar changes should be applied for other sections like removing graphs, data inputs, etc. You only need to use proper table name and column name.

- bulek
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Like bulek said, this is one change that is not too difficult to make. However I do understand why it makes sense to do this since it gives you that *extra* confirmation when deleting something. The next version will do this.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest