Big changes
This commit is contained in:
parent
f2b4cfdec7
commit
c6d2981b12
15 changed files with 203 additions and 205 deletions
|
|
@ -2,8 +2,8 @@ package wa.server.plugin.apache;
|
|||
|
||||
import wa.server.WAConstants;
|
||||
import wa.server.WAContext;
|
||||
import wa.server.page.WAConfigPage;
|
||||
import wa.server.plugin.WAConfigEntry;
|
||||
import wa.server.plugin.WAServiceConfig;
|
||||
import wa.server.util.ConfigFileUtil;
|
||||
import zutil.db.bean.DBBean;
|
||||
import zutil.db.bean.DBBean.DBTable;
|
||||
|
|
@ -18,8 +18,10 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
|
||||
public class ApacheConfigVirtualHost implements WAServiceConfig{
|
||||
private static final String CONFIG_NAME = "Apache Virtual Host";
|
||||
public class ApacheConfigVirtualHost extends WAConfigPage {
|
||||
private static final String CONFIG_NAME = "vhost";
|
||||
private static final String NAVIGATION_NAME = "Apache Virtual Host";
|
||||
|
||||
private static final String APACHE_MAIN_CONFIG_FILE = "/apache2/apache2.conf";
|
||||
private static final String APACHE_SITE_AVAILABLE_PATH = "/apache2/site-available/";
|
||||
private static final String STATIC_PRE_CONF = "wa/server/plugin/apache/apache_default.config";
|
||||
|
|
@ -28,14 +30,11 @@ public class ApacheConfigVirtualHost implements WAServiceConfig{
|
|||
|
||||
|
||||
public ApacheConfigVirtualHost() throws SQLException {
|
||||
super(ApacheService.NAVIGATION_NAME, CONFIG_NAME, NAVIGATION_NAME);
|
||||
vhosts = DBBean.load(WAContext.getDB(), ApacheVirtualHostEntry.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return CONFIG_NAME;
|
||||
}
|
||||
|
||||
public WAConfigEntry createConfig(){
|
||||
return new ApacheVirtualHostEntry();
|
||||
|
|
|
|||
|
|
@ -24,20 +24,16 @@ package wa.server.plugin.apache;
|
|||
|
||||
import wa.server.page.WAServicePage;
|
||||
import wa.server.plugin.*;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Created by Ziver on 2014-12-23.
|
||||
*/
|
||||
public class ApacheService extends WAServicePage {
|
||||
public static final String SERVICE_NAME = "Apache2";
|
||||
protected static final String SERVICE_NAME = "apache";
|
||||
protected static final String NAVIGATION_NAME = "Apache2";
|
||||
|
||||
public ApacheService() {
|
||||
super("apache", SERVICE_NAME);
|
||||
super(SERVICE_NAME, NAVIGATION_NAME);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -56,4 +52,5 @@ public class ApacheService extends WAServicePage {
|
|||
public WAInstaller getInstaller() {
|
||||
return new ApacheInstaller();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class ApacheStatus extends WAServiceStatus {
|
|||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ApacheService.SERVICE_NAME;
|
||||
return ApacheService.NAVIGATION_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"version": "1.0",
|
||||
"name": "Apache Web Server",
|
||||
"interfaces": [
|
||||
{"wa.server.page.WAServicePage": "wa.server.plugin.apache.ApacheService"},
|
||||
{"wa.server.page.WAPage": "wa.server.plugin.apache.ApacheService"},
|
||||
{"wa.server.plugin.WAServiceStatus": "wa.server.plugin.apache.ApacheStatus"},
|
||||
{"wa.server.page.WAConfigPage": "wa.server.plugin.apache.ApacheConfigVirtualHost"}
|
||||
{"wa.server.page.WAPage": "wa.server.plugin.apache.ApacheConfigVirtualHost"}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue