From: Carsten <car...@fo...> - 2003-10-23 22:34:09
|
Hello, i currently write a Usermin/Webmin module with the python-webmin api from http://www.cendio.se/~peter/python-webmin/ I had to make some changes in mscstyle3/theme.py to use it in Usermin, but not very much, so it can be simply used in Usermin and Webmin, by changing one var (for one if/else case) Is there way of (auto) detecting if the theme file (or a module) is used in Webmin or in Usermin? (I know, that there is the programname in the language files, but i that might not always work) bye, Carsten |
From: Carsten <car...@fo...> - 2003-10-24 03:33:34
|
Hello, i currently write a Usermin/Webmin module with the python-webmin api from http://www.cendio.se/~peter/python-webmin/ I had to make some changes in mscstyle3/theme.py to use it in Usermin, but not very much, so it can be simply used in Usermin and Webmin, by changing one var (for one if/else case) Is there way of (auto) detecting if the theme file (or a module) is used in Webmin or in Usermin? (I know, that there is the programname in the language files, but i that might not always work) bye, Carsten |
From: Jamie C. <jca...@we...> - 2003-10-23 22:53:58
|
On Fri, 2003-10-24 at 08:30, Carsten wrote: > Hello, > i currently write a Usermin/Webmin module with the python-webmin api > from http://www.cendio.se/~peter/python-webmin/ > I had to make some changes in mscstyle3/theme.py to use it in Usermin, > but not very much, so it can be simply used in Usermin and Webmin, by > changing one var (for one if/else case) > Is there way of (auto) detecting if the theme file (or a module) is used > in Webmin or in Usermin? > (I know, that there is the programname in the language files, but i that > might not always work) The method I usually use is to have two separate module.info files, one for the webmin module and one for usermin. The usermin file has usermin=1 in it, while the webmin file does not. Your code can then check for this, and behave appropriately. In perl web/usermin modules this is really easy - the global hash %module_info contains all the optoins from module.info for the current module, so you can use code like : if ($module_info{'usermin'}) { # usermin stuff } else { # webmin stuff } - Jamie |
From: Andrew K. <ak...@ra...> - 2003-10-24 08:49:07
|
I recently had the misfortune of making a mistake in my network settings which in turn had the effect of disconnecting me from my server which is at a remote location. Eventually someone was able to manually come in and correct my mistake, but, it occurred to me that a possible soution to this kind of problem would be to have a mechanism by which changes are not permanent unless they are confirmed through a transparent webmin confirmation process. By this I mean, when a change is made it would revert to a previous setting unless one where to confirm by logging in again or by clicking a confirm setting when you login again. So, say I make a drastic mistake in my network configuration. The setting is made, the network restarts, I lose the connection! Ofcourse, if I have no connection, I cannot confirm, thus my ass is saved!! Hurray!! The confirmation might be an interval set by the user. It could be a 10 minute default or something. I know that webmin has a caching mechanism built in, perhaps this would be something like that where it would be used to recover from a mistake? Perhaps this would be useful in other modules as well. Perhaps you might lose you web server or database or something. I don't know, would this be feasible? I can't be the only one that makes this kind of mistake. Since this interface is so dependent on a functioning network, perhaps it would be useful? It could also be an optional feature only. A feature that might save someone from losing their job! Just a thought. -Andrew Kornak |
From: Jamie C. <jca...@we...> - 2003-10-25 02:05:23
|
Andrew Kornak wrote: > I recently had the misfortune of making a mistake in my network settings > which in turn had the effect of disconnecting me from my server which is > at a remote location. Eventually someone was able to manually come in > and correct my mistake, but, it occurred to me that a possible soution to > this kind of problem would be to have a mechanism by which changes > are not permanent unless they are confirmed through a transparent > webmin confirmation process. By this I mean, when a change is made > it would revert to a previous setting unless one where to confirm by > logging in again or by clicking a confirm setting when you login again. > So, say I make a drastic mistake in my network configuration. The setting > is made, the network restarts, I lose the connection! Ofcourse, if I have > no connection, I cannot confirm, thus my ass is saved!! Hurray!! The > confirmation might be an interval set by the user. It could be a 10 minute > default > or something. I know that webmin has a caching mechanism built in, > perhaps this would be something like that where it would be used to > recover from a mistake? Perhaps this would be useful in other modules > as well. Perhaps you might lose you web server or database or something. > I don't know, would this be feasible? I can't be the only one that makes > this > kind of mistake. Since this interface is so dependent on a functioning > network, perhaps it would be useful? It could also be an optional feature > only. A feature that might save someone from losing their job! Just a > thought. Perhaps what is needed is a feature in the Network Configuration module for testing connectivity after changes are applied, and rolling the changes back if the network appears to be down. The test could be performed by pinging some external host, defined in the module's configuration .. and the rollback done by saving the state of all interfaces and routes before applying changes, and restoring them if something went wrong. Implementing it could be a little tricky, but it is worth doing (since I've had the same problems myself!), so I will see about adding it to a future release. - Jamie |
From: Andrew K. <ak...@ra...> - 2003-10-25 02:33:04
|
I had a chance to think about this. It might be too difficult to add a network test specifically for this. I'm thinking something more general and I believe more simple which could be used in any module. For instance, If I make a change and activate it, a variable such as restore=1 is set. After a designated period a confirmation message would appear during a webmin session. This might simply be a button to press to confirm the changes and thus changing the variable restore=0. This would prevent the restoration of previous values. A simple manual click by a user would confirm the changes that were made. If, say a user does not confirm, values would revert back. I can see this as being a useful feature for any module. I think this would be a simpler way of confirming changes. Any module could have a cache or backup directory that would be used to backtrack changes. The changes would simply be keystrokes/web-clicks or field values that are affected during a change, like netmask=255.255.255.0. Then, the module could process the field values using the same script (hopefully) with the text file that holds the values instead of the webmin form. What do you think? -Andrew ----- Original Message ----- From: "Jamie Cameron" <jca...@we...> To: <web...@li...> Sent: Friday, October 24, 2003 8:58 PM Subject: Re: [webmin-devel] Webmin feature enhancement idea to recover from mistakes > Andrew Kornak wrote: > > I recently had the misfortune of making a mistake in my network settings > > which in turn had the effect of disconnecting me from my server which is > > at a remote location. Eventually someone was able to manually come in > > and correct my mistake, but, it occurred to me that a possible soution to > > this kind of problem would be to have a mechanism by which changes > > are not permanent unless they are confirmed through a transparent > > webmin confirmation process. By this I mean, when a change is made > > it would revert to a previous setting unless one where to confirm by > > logging in again or by clicking a confirm setting when you login again. > > So, say I make a drastic mistake in my network configuration. The setting > > is made, the network restarts, I lose the connection! Ofcourse, if I have > > no connection, I cannot confirm, thus my ass is saved!! Hurray!! The > > confirmation might be an interval set by the user. It could be a 10 minute > > default > > or something. I know that webmin has a caching mechanism built in, > > perhaps this would be something like that where it would be used to > > recover from a mistake? Perhaps this would be useful in other modules > > as well. Perhaps you might lose you web server or database or something. > > I don't know, would this be feasible? I can't be the only one that makes > > this > > kind of mistake. Since this interface is so dependent on a functioning > > network, perhaps it would be useful? It could also be an optional feature > > only. A feature that might save someone from losing their job! Just a > > thought. > > Perhaps what is needed is a feature in the Network Configuration > module for testing connectivity after changes are applied, and rolling > the changes back if the network appears to be down. The test could > be performed by pinging some external host, defined in the module's > configuration .. and the rollback done by saving the state of all > interfaces and routes before applying changes, and restoring them if > something went wrong. > > Implementing it could be a little tricky, but it is worth doing (since > I've had the same problems myself!), so I will see about adding it to > a future release. > > - Jamie > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel > |
From: Andrew K. <ak...@co...> - 2004-03-29 23:25:55
|
Jamie, I did it again! I messed up the network settings and lost my server! Are there any plans to add the "revert network settings for idiots" feature any time soon? I am running out of excuses for my screw-ups! ;-) Thanks. -Andrew Jamie Cameron wrote: > Andrew Kornak wrote: > >> I recently had the misfortune of making a mistake in my network settings >> which in turn had the effect of disconnecting me from my server which is >> at a remote location. Eventually someone was able to manually come in >> and correct my mistake, but, it occurred to me that a possible >> soution to >> this kind of problem would be to have a mechanism by which changes >> are not permanent unless they are confirmed through a transparent >> webmin confirmation process. By this I mean, when a change is made >> it would revert to a previous setting unless one where to confirm by >> logging in again or by clicking a confirm setting when you login again. >> So, say I make a drastic mistake in my network configuration. The >> setting >> is made, the network restarts, I lose the connection! Ofcourse, if I >> have >> no connection, I cannot confirm, thus my ass is saved!! Hurray!! The >> confirmation might be an interval set by the user. It could be a 10 >> minute >> default >> or something. I know that webmin has a caching mechanism built in, >> perhaps this would be something like that where it would be used to >> recover from a mistake? Perhaps this would be useful in other modules >> as well. Perhaps you might lose you web server or database or something. >> I don't know, would this be feasible? I can't be the only one that makes >> this >> kind of mistake. Since this interface is so dependent on a functioning >> network, perhaps it would be useful? It could also be an optional >> feature >> only. A feature that might save someone from losing their job! Just a >> thought. > > > Perhaps what is needed is a feature in the Network Configuration > module for testing connectivity after changes are applied, and rolling > the changes back if the network appears to be down. The test could be > performed by pinging some external host, defined in the module's > configuration .. and the rollback done by saving the state of all > interfaces and routes before applying changes, and restoring them if > something went wrong. > > Implementing it could be a little tricky, but it is worth doing (since > I've had the same problems myself!), so I will see about adding it to > a future release. > > - Jamie > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel > |
From: Jamie C. <jca...@we...> - 2004-03-30 11:18:32
|
I haven't been doing any development in that area yet unfortunately.. However, the ideas I have planned wouldn't really help you either, as an error that cuts off access to Webmin would prevent you from hitting the 'undo' button to fix it! - Jamie On Tue, 2004-03-30 at 09:25, Andrew Kornak wrote: > Jamie, > > I did it again! I messed up the network settings and lost my server! > Are there any plans to add the "revert network settings for idiots" > feature any time soon? I am running out of excuses for my screw-ups! ;-) > Thanks. > > -Andrew > > Jamie Cameron wrote: > > > Andrew Kornak wrote: > > > >> I recently had the misfortune of making a mistake in my network settings > >> which in turn had the effect of disconnecting me from my server which is > >> at a remote location. Eventually someone was able to manually come in > >> and correct my mistake, but, it occurred to me that a possible > >> soution to > >> this kind of problem would be to have a mechanism by which changes > >> are not permanent unless they are confirmed through a transparent > >> webmin confirmation process. By this I mean, when a change is made > >> it would revert to a previous setting unless one where to confirm by > >> logging in again or by clicking a confirm setting when you login again. > >> So, say I make a drastic mistake in my network configuration. The > >> setting > >> is made, the network restarts, I lose the connection! Ofcourse, if I > >> have > >> no connection, I cannot confirm, thus my ass is saved!! Hurray!! The > >> confirmation might be an interval set by the user. It could be a 10 > >> minute > >> default > >> or something. I know that webmin has a caching mechanism built in, > >> perhaps this would be something like that where it would be used to > >> recover from a mistake? Perhaps this would be useful in other modules > >> as well. Perhaps you might lose you web server or database or something. > >> I don't know, would this be feasible? I can't be the only one that makes > >> this > >> kind of mistake. Since this interface is so dependent on a functioning > >> network, perhaps it would be useful? It could also be an optional > >> feature > >> only. A feature that might save someone from losing their job! Just a > >> thought. > > > > > > Perhaps what is needed is a feature in the Network Configuration > > module for testing connectivity after changes are applied, and rolling > > the changes back if the network appears to be down. The test could be > > performed by pinging some external host, defined in the module's > > configuration .. and the rollback done by saving the state of all > > interfaces and routes before applying changes, and restoring them if > > something went wrong. > > > > Implementing it could be a little tricky, but it is worth doing (since > > I've had the same problems myself!), so I will see about adding it to > > a future release. > > > > - Jamie > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: The SF.net Donation Program. > > Do you like what SourceForge.net is doing for the Open > > Source Community? Make a contribution, and help us add new > > features and functionality. Click here: http://sourceforge.net/donate/ > > - > > Forwarded by the Webmin development list at web...@we... > > To remove yourself from this list, go to > > http://lists.sourceforge.net/lists/listinfo/webadmin-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel |
From: Andrew K. <ak...@co...> - 2004-03-30 11:56:18
|
I thought your idea was to have a configuration that would test the network (ping or something) on a pre-defined IP and if after a certain period roll-back the changes. This would bring back the network (assuming the previous config is correct). -Andrew Jamie Cameron wrote: >I haven't been doing any development in that area yet unfortunately.. >However, the ideas I have planned wouldn't really help you either, as an >error that cuts off access to Webmin would prevent you from hitting the >'undo' button to fix it! > > - Jamie > >On Tue, 2004-03-30 at 09:25, Andrew Kornak wrote: > > >>Jamie, >> >> I did it again! I messed up the network settings and lost my server! >>Are there any plans to add the "revert network settings for idiots" >>feature any time soon? I am running out of excuses for my screw-ups! ;-) >>Thanks. >> >>-Andrew >> >>Jamie Cameron wrote: >> >> >> >>>Andrew Kornak wrote: >>> >>> >>> >>>>I recently had the misfortune of making a mistake in my network settings >>>>which in turn had the effect of disconnecting me from my server which is >>>>at a remote location. Eventually someone was able to manually come in >>>>and correct my mistake, but, it occurred to me that a possible >>>>soution to >>>>this kind of problem would be to have a mechanism by which changes >>>>are not permanent unless they are confirmed through a transparent >>>>webmin confirmation process. By this I mean, when a change is made >>>>it would revert to a previous setting unless one where to confirm by >>>>logging in again or by clicking a confirm setting when you login again. >>>>So, say I make a drastic mistake in my network configuration. The >>>>setting >>>>is made, the network restarts, I lose the connection! Ofcourse, if I >>>>have >>>>no connection, I cannot confirm, thus my ass is saved!! Hurray!! The >>>>confirmation might be an interval set by the user. It could be a 10 >>>>minute >>>>default >>>>or something. I know that webmin has a caching mechanism built in, >>>>perhaps this would be something like that where it would be used to >>>>recover from a mistake? Perhaps this would be useful in other modules >>>>as well. Perhaps you might lose you web server or database or something. >>>>I don't know, would this be feasible? I can't be the only one that makes >>>>this >>>>kind of mistake. Since this interface is so dependent on a functioning >>>>network, perhaps it would be useful? It could also be an optional >>>>feature >>>>only. A feature that might save someone from losing their job! Just a >>>>thought. >>>> >>>> >>>Perhaps what is needed is a feature in the Network Configuration >>>module for testing connectivity after changes are applied, and rolling >>> the changes back if the network appears to be down. The test could be >>>performed by pinging some external host, defined in the module's >>>configuration .. and the rollback done by saving the state of all >>>interfaces and routes before applying changes, and restoring them if >>>something went wrong. >>> >>>Implementing it could be a little tricky, but it is worth doing (since >>>I've had the same problems myself!), so I will see about adding it to >>>a future release. >>> >>> - Jamie >>> >>> >>> >>> >>>------------------------------------------------------- >>>This SF.net email is sponsored by: The SF.net Donation Program. >>>Do you like what SourceForge.net is doing for the Open >>>Source Community? Make a contribution, and help us add new >>>features and functionality. Click here: http://sourceforge.net/donate/ >>>- >>>Forwarded by the Webmin development list at web...@we... >>>To remove yourself from this list, go to >>>http://lists.sourceforge.net/lists/listinfo/webadmin-devel >>> >>> >>> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IBM Linux Tutorials >>Free Linux tutorial presented by Daniel Robbins, President and CEO of >>GenToo technologies. Learn everything from fundamentals to system >>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >>- >>Forwarded by the Webmin development list at web...@we... >>To remove yourself from this list, go to >>http://lists.sourceforge.net/lists/listinfo/webadmin-devel >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >- >Forwarded by the Webmin development list at web...@we... >To remove yourself from this list, go to >http://lists.sourceforge.net/lists/listinfo/webadmin-devel > > > |
From: Conny B. <ko...@ni...> - 2004-04-01 20:56:53
|
2004-03-30 kl. 13.17 skrev Jamie Cameron: > However, the ideas I have planned wouldn't really help you either, as > an > error that cuts off access to Webmin would prevent you from hitting the > 'undo' button to fix it! Well, AFAIS the earlier suggestion made by Andrew would be better than nothing at the moment - not a generic undo/rollback (well, not yet at least) but a simple "are you still there?" confirmation step after modifying network settings: > > A simple manual click by a user would confirm the changes > > that were made. If, say a user does not confirm, values would revert > > back. Just a second "Confirm" step afterwards.. and, if there was no confirmation, a timer (set to.. 30 seconds) alarms and the previous network settings are restored. //conny |
From: Jamie C. <jca...@we...> - 2003-10-26 03:15:34
|
This sounds quite similar to another feature that people have suggested - the ability to 'undo' changes made using webmin. However, that one is currently way down my TODO list, due to the complexity of tracking changes made to each config file so that they can be reversed properly. And in some cases (like deleting a user's home directory), undoing such a change would be impossible. So unfortunately, a confirmation or undo feature like this is probably not going to appear for a while.. - Jamie Andrew Kornak wrote: > I had a chance to think about this. It might be too difficult to add a > network > test specifically for this. I'm thinking something more general and I > believe > more simple which could be used in any module. For instance, If I make a > change and activate it, a variable such as restore=1 is set. After a > designated > period a confirmation message would appear during a webmin session. > This might simply be a button to press to confirm the changes and thus > changing the variable restore=0. This would prevent the restoration of > previous values. A simple manual click by a user would confirm the changes > that were made. If, say a user does not confirm, values would revert back. > I can see this as being a useful feature for any module. I think this would > be a simpler way of confirming changes. Any module could have a cache > or backup directory that would be used to backtrack changes. The changes > would simply be keystrokes/web-clicks or field values that are affected > during > a change, like netmask=255.255.255.0. Then, the module could process the > field values using the same script (hopefully) with the text file that holds > the values > instead of the webmin form. What do you think? > > -Andrew > ----- Original Message ----- > From: "Jamie Cameron" <jca...@we...> > To: <web...@li...> > Sent: Friday, October 24, 2003 8:58 PM > Subject: Re: [webmin-devel] Webmin feature enhancement idea to recover from > mistakes > > > >>Andrew Kornak wrote: >> >>>I recently had the misfortune of making a mistake in my network settings >>>which in turn had the effect of disconnecting me from my server which is >>>at a remote location. Eventually someone was able to manually come in >>>and correct my mistake, but, it occurred to me that a possible soution >> > to > >>>this kind of problem would be to have a mechanism by which changes >>>are not permanent unless they are confirmed through a transparent >>>webmin confirmation process. By this I mean, when a change is made >>>it would revert to a previous setting unless one where to confirm by >>>logging in again or by clicking a confirm setting when you login again. >>>So, say I make a drastic mistake in my network configuration. The >> > setting > >>>is made, the network restarts, I lose the connection! Ofcourse, if I >> > have > >>>no connection, I cannot confirm, thus my ass is saved!! Hurray!! The >>>confirmation might be an interval set by the user. It could be a 10 >> > minute > >>>default >>>or something. I know that webmin has a caching mechanism built in, >>>perhaps this would be something like that where it would be used to >>>recover from a mistake? Perhaps this would be useful in other modules >>>as well. Perhaps you might lose you web server or database or something. >>>I don't know, would this be feasible? I can't be the only one that makes >>>this >>>kind of mistake. Since this interface is so dependent on a functioning >>>network, perhaps it would be useful? It could also be an optional >> > feature > >>>only. A feature that might save someone from losing their job! Just a >>>thought. >> >>Perhaps what is needed is a feature in the Network Configuration >>module for testing connectivity after changes are applied, and rolling >> the changes back if the network appears to be down. The test could >>be performed by pinging some external host, defined in the module's >>configuration .. and the rollback done by saving the state of all >>interfaces and routes before applying changes, and restoring them if >>something went wrong. >> >>Implementing it could be a little tricky, but it is worth doing (since >>I've had the same problems myself!), so I will see about adding it to >>a future release. >> >> - Jamie |
From: Hugo C. <hug...@ya...> - 2003-10-27 07:55:11
|
You can implement such a feature with a version control tool. Since webmin is mainly dealing with single configuration files having a linear version history, CVS is appropriate (although I like PRCS much more). An undo or redo simply means checking out a particular version from the repository, something that could easily be done by a stand-alone application, without user-intervention, e.g. to automate recovery from a misconfigured system after a time-out. Due to the added complexity for the user, perhaps such a feature should be a webmin option. Hugo --- Jamie Cameron <jca...@we...> wrote: > This sounds quite similar to another feature that > people have > suggested - the ability to 'undo' changes made using > webmin. However, > that one is currently way down my TODO list, due to > the complexity of > tracking changes made to each config file so that > they can be reversed > properly. And in some cases (like deleting a user's > home directory), > undoing such a change would be impossible. > > So unfortunately, a confirmation or undo feature > like this is probably > not going to appear for a while.. __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |