|
From: creedon <icr...@us...> - 2005-06-16 22:31:22
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20572 Modified Files: maintenance Log Message: de-Manilazation Index: maintenance =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/adminSite/website/maintenance,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** maintenance 26 Mar 2005 21:45:17 -0000 1.1.1.1 --- maintenance 16 Jun 2005 22:31:12 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.adminSite.website.maintenance ! on maintenance () { ÇChanges Ç9/8/02; 4:46:12 PM by JES ÇFixed a typo. Implemented the Reset search enging index function, with a confirmation page. Ç8/18/02; 10:08:53 PM by JES ÇCreated. Render a page of server maintenance functions. local (pta = html.getPageTableAddress ()); pta^.title = "Maintenance"; local (htmltext); on add (s) { htmltext = htmltext + (s + "\r");}; local (backupConfirmText = "", searchConfirmText = ""); if pta^.method == "POST" { local (adrargs = @pta^.postArgs); case true { //figure out which button the user clicked defined (adrargs^.backupNow) { thread.callScript (@manilaSuite.backups.backupAllSites, {}); local (notificationlist = config.manila.backups.notifyList); if typeOf (notificationlist) == listType { notificationlist = ""; local (oneaddr); for oneaddr in config.manila.backups.notifyList { notificationlist = notificationlist + oneaddr + ", "}; notificationlist = string.delete (notificationlist, sizeOf (notificationlist) - 1, 2)}; backupConfirmText = "Manila site backups have been started. When the backups are complete, an email notification will be sent to " + notificationlist + " when the backup operation is complete."}; defined (adrargs^.indexNow) { local (adr); for adr in @config.manila.sites { local (adrsite = adr^); try {adrsite^.["#newsSite"].search.indexQueue.flRunning = true}}; searchConfirmText = "All Manila sites on this server have been scheduled to be re-indexed by the Search Engine Server."}; defined (adrargs^.resetIndex) { add ("<form method=\"POST\">"); add ("<p>Are you sure you want to completely reset the entire search engine index?</p><p>This operation cannot be undone.</p>"); add ("<p><br /><input type=\"submit\" name=\"cancel\" value=\"Cancel\" /> <input type=\"submit\" name=\"resetIndexConfirm\" value=\"Reset Index\" /></p>"); add ("</form>"); return (htmltext)}; defined (adrargs^.resetIndexConfirm) { mainResponder.search.utilities.assureIndex (); local (indexpath = mainResponder.search.utilities.getIndexPath ()); local (adrindex = @[indexpath].index); local (adrpageinfo = @[indexpath].pageInfo); new (tableType, adrindex); new (tableType, adrpageinfo); fileMenu.saveMyRoot (adrindex); searchConfirmText = "The search engine index has been completely reset. Sites for which indexing is enabled will have new or changed pages indexed."}}}; bundle { //explanatory text add ("<p>This page provides access to server-wide maintenance functions like Backups, Search Engine Indexing options.</p>")}; bundle { //database update options add ("<h4><a name=\"updates\"></a>Updates</h4>"); add ("<form method=\"POST\">"); bundle { //explanatory text add ("<p>Frontier can automatically connect to a server at UserLand, to get new features and bug fixes. Only those parts that have changed since the last update will be installed. To update your databases now, click the Update Now button.</p>")}; add (mainResponder.adminSite.prefs.updateNowButton (false)); add ("</form>")}; add ("<br /><hr size=\"1\">"); bundle { //backup options add ("<h4><a name=\"manilaBackups\"></a>Backup Manila Sites</h4>"); add ("<form method=\"POST\">"); bundle { //explanatory text add ("<p>To make an immediate backup of all sites which have automatic backups enabled, click the Backup Now button.</p>")}; bundle { //Backup Now and Backup All Sites buttons add ("<p><br /><input type=\"submit\" name=\"backupNow\" value=\"Backup Now\" /></p>")}; if backupConfirmText == "" { add ("<p><br />You can enable backups for any site by clicking the site's name on the <a href=\"" + mainResponder.adminSite.urls.home + "\">home page</a>, and then clicking the enable link, in the Backups section.</p>")} else { add ("<br /><b>" + backupConfirmText + "</b></p>")}; add ("</form>")}; add ("<br /><hr size=\"1\">"); bundle { //search engine indexing options add ("<h4><a name=\"searchEngine\"></a>Search Engine</h4>"); if config.mainResponder.prefs.flSearchEngine { add ("<form method=\"POST\">"); bundle { //explanatory text add ("<p>To re-index all Manila sites for which Search Engine Indexing is enabled, click the Index Now button. To clear the Search Engine index completely, click the Reset Index button.</p>")}; bundle { //Index Now and Reset Index buttons add ("<p><br /><input type=\"submit\" name=\"indexNow\" value=\"Index Now\" /> <input type=\"submit\" name=\"resetIndex\" value=\"Reset Index\" /></p>")}; add ("</form>"); if searchConfirmText != "" { add ("<b><br /><b>" + searchConfirmText + "</b></p>")}} else { //disabled -- let the admin know add ("<p>Search Engine Indexing options are unavailable because the Search Engine is currently disabled. To turn on the Search Engine, use the Search Engine settings page.</p>")}}; return (htmltext)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.adminSite.website.maintenance ! on maintenance () { ÇChanges Ç6/16/05; 2:53:00 PM by TAC Çde-Manilaize Ç9/8/02; 4:46:12 PM by JES ÇFixed a typo. Implemented the Reset search enging index function, with a confirmation page. Ç8/18/02; 10:08:53 PM by JES ÇCreated. Render a page of server maintenance functions. local (pta = html.getPageTableAddress ()); pta^.title = "Maintenance"; local (htmltext); on add (s) { htmltext = htmltext + (s + "\r");}; local (backupConfirmText = "", searchConfirmText = ""); if pta^.method == "POST" { local (adrargs = @pta^.postArgs); case true { //figure out which button the user clicked Çdefined (adrargs^.backupNow) // 6/16/05; 2:52:33 PM by TAC - disabled, Manila specific code, eventually remove? Çthread.callScript (@manilaSuite.backups.backupAllSites, {}) Çlocal (notificationlist = config.manila.backups.notifyList) Çif typeOf (notificationlist) == listType Çnotificationlist = "" Çlocal (oneaddr) Çfor oneaddr in config.manila.backups.notifyList Çnotificationlist = notificationlist + oneaddr + ", " Çnotificationlist = string.delete (notificationlist, sizeOf (notificationlist) - 1, 2) ÇbackupConfirmText = "Manila site backups have been started. When the backups are complete, an email notification will be sent to " + notificationlist + " when the backup operation is complete." defined (adrargs^.indexNow) { local (adr); for adr in @config.manila.sites { local (adrsite = adr^); try {adrsite^.["#newsSite"].search.indexQueue.flRunning = true}}; searchConfirmText = "All Manila sites on this server have been scheduled to be re-indexed by the Search Engine Server."}; defined (adrargs^.resetIndex) { add ("<form method=\"POST\">"); add ("<p>Are you sure you want to completely reset the entire search engine index?</p><p>This operation cannot be undone.</p>"); add ("<p><br /><input type=\"submit\" name=\"cancel\" value=\"Cancel\" /> <input type=\"submit\" name=\"resetIndexConfirm\" value=\"Reset Index\" /></p>"); add ("</form>"); return (htmltext)}; defined (adrargs^.resetIndexConfirm) { mainResponder.search.utilities.assureIndex (); local (indexpath = mainResponder.search.utilities.getIndexPath ()); local (adrindex = @[indexpath].index); local (adrpageinfo = @[indexpath].pageInfo); new (tableType, adrindex); new (tableType, adrpageinfo); fileMenu.saveMyRoot (adrindex); searchConfirmText = "The search engine index has been completely reset. Sites for which indexing is enabled will have new or changed pages indexed."}}}; bundle { //explanatory text add ("<p>This page provides access to server-wide maintenance functions like Backups, Search Engine Indexing options.</p>")}; bundle { //database update options add ("<h4><a name=\"updates\"></a>Updates</h4>"); add ("<form method=\"POST\">"); bundle { //explanatory text add ("<p>Frontier can automatically connect to a server at UserLand, to get new features and bug fixes. Only those parts that have changed since the last update will be installed. To update your databases now, click the Update Now button.</p>")}; add (mainResponder.adminSite.prefs.updateNowButton (false)); add ("</form>")}; Ç6/16/05; 2:52:33 PM by TAC - disabled, Manila specific code, eventually remove? Çadd ("<br /><hr size=\"1\">") Çbundle //backup options Çadd ("<h4><a name=\"manilaBackups\"></a>Backup Manila Sites</h4>") Çadd ("<form method=\"POST\">") Çbundle //explanatory text Çadd ("<p>To make an immediate backup of all sites which have automatic backups enabled, click the Backup Now button.</p>") Çbundle //Backup Now and Backup All Sites buttons Çadd ("<p><br /><input type=\"submit\" name=\"backupNow\" value=\"Backup Now\" /></p>") Çif backupConfirmText == "" Çadd ("<p><br />You can enable backups for any site by clicking the site's name on the <a href=\"" + mainResponder.adminSite.urls.home + "\">home page</a>, and then clicking the enable link, in the Backups section.</p>") Çelse Çadd ("<br /><b>" + backupConfirmText + "</b></p>") Çadd ("</form>") add ("<br /><hr size=\"1\">"); bundle { //search engine indexing options add ("<h4><a name=\"searchEngine\"></a>Search Engine</h4>"); if config.mainResponder.prefs.flSearchEngine { add ("<form method=\"POST\">"); bundle { //explanatory text add ("<p>To re-index all Manila sites for which Search Engine Indexing is enabled, click the Index Now button. To clear the Search Engine index completely, click the Reset Index button.</p>")}; bundle { //Index Now and Reset Index buttons add ("<p><br /><input type=\"submit\" name=\"indexNow\" value=\"Index Now\" /> <input type=\"submit\" name=\"resetIndex\" value=\"Reset Index\" /></p>")}; add ("</form>"); if searchConfirmText != "" { add ("<b><br /><b>" + searchConfirmText + "</b></p>")}} else { //disabled -- let the admin know add ("<p>Search Engine Indexing options are unavailable because the Search Engine is currently disabled. To turn on the Search Engine, use the Search Engine settings page.</p>")}}; return (htmltext)} \ No newline at end of file |