|
|
| Author |
Message |
JustinHoMi
Joined: 07 Oct 2002 Posts: 17
|
Posted: Wed Oct 09, 2002 8:56 pm Post subject: more feedback when deleting items |
|
|
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 |
|
| Back to top |
|
 |
bulek Cacti Pro User
Joined: 20 May 2002 Posts: 852 Location: Poland
|
Posted: Thu Oct 10, 2002 2:03 am Post subject: |
|
|
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: | | 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: | $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 |
|
| Back to top |
|
 |
raX Lead Developer
Joined: 13 Oct 2001 Posts: 2234 Location: Carlisle, PA
|
Posted: Fri Oct 11, 2002 9:28 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|