From 295aff52a3da20f8c4cdd7d49bf7bb35d36a5957 Mon Sep 17 00:00:00 2001
From: hydrox
Date: Mon, 31 Oct 2005 12:25:40 +0000
Subject: [PATCH] *)added offline-browsing-support (onlineMode=0) *)online-mode
now can be changed in Status.html
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1010 6c8d7289-2bf4-0310-a012-ef5d649a1542
---
htroot/SettingsAck_p.html | 6 +++++-
htroot/SettingsAck_p.java | 15 +++++++++++++++
htroot/Status.html | 18 +++++++++++++++---
htroot/Status.java | 8 +++++---
source/de/anomic/http/httpdProxyHandler.java | 11 +++++++++--
source/de/anomic/yacy/yacyCore.java | 13 +++++++++++--
yacy.init | 1 +
7 files changed, 61 insertions(+), 11 deletions(-)
diff --git a/htroot/SettingsAck_p.html b/htroot/SettingsAck_p.html
index f8b1fd166..daedbbc1f 100644
--- a/htroot/SettingsAck_p.html
+++ b/htroot/SettingsAck_p.html
@@ -138,7 +138,11 @@ Seed Upload method was changed successfully.
Port Forwarding Settings changed, but something is wrong.
#[errormsg]#
Port Forwarding was deactivated automatically.
-Please return to the settings page and modify the data.
+Please return to the settings page and modify the data.
+::
+You are now event-based online. After a short while you should see the effect on the status page.
+::
+You are now in Cache Mode. Only Proxy-cache ist available in this mode. After a short while you should see the effect on the status page.
#(/info)#
You can now go back to the Settings page if you want to make more changes.
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java
index 39782c651..a0a34314c 100644
--- a/htroot/SettingsAck_p.java
+++ b/htroot/SettingsAck_p.java
@@ -297,10 +297,25 @@ public class SettingsAck_p {
if (post.containsKey("pmode")) {
env.setConfig("onlineMode", "2");
prop.put("info", 11);//permanent online mode
+ yacyCore.setOnlineMode(2);
yacyCore.triggerOnlineAction();
return prop;
}
+ if (post.containsKey("emode")) {
+ env.setConfig("onlineMode", "1");
+ prop.put("info", 24);//event-based online mode
+ yacyCore.setOnlineMode(1);
+ return prop;
+ }
+
+ if (post.containsKey("cmode")) {
+ env.setConfig("onlineMode", "0");
+ prop.put("info", 25);//cache mode
+ yacyCore.setOnlineMode(0);
+ return prop;
+ }
+
if (post.containsKey("generalsettings")) {
/*
// set peer language
diff --git a/htroot/Status.html b/htroot/Status.html
index 474fa400f..07c6fc404 100644
--- a/htroot/Status.html
+++ b/htroot/Status.html
@@ -78,18 +78,30 @@ Last upload: #[lastUpload]# ago.
Online-mode |
#(omode)#
-
+You are in Cache-browsing mode.
+Only Website from the Proxycache are accessable.
+To switch online-mode, press one of the following buttons:
+
::
You are in event-based online mode.
The YaCy p2p network will boot when you start using the proxy or you switch to permanent mode.
Attention: Using the proxy in permanent mode will keep your internet connection online as long as YaCy runs.
Use this only if you have a flatrate or you have an always-on connection.
-To start permanent mode, press this button:
+To switch online-mode, press one of the following buttons:
::
You are in permanent mode. Attention: If you don't have a flatrate or are always-on, you must switch off the proxy to go off-line.
+To switch online-mode, press one of the following buttons:
+
#(/omode)#
|
@@ -100,4 +112,4 @@ You are in permanent mode. Attention: If you don't have a flatrate or are
#[footer]#