[vlma-devel] commit: Make login and password configurable. (Adrien Grand )

git version control git at videolan.org
Mon Oct 27 22:30:59 CET 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Mon Oct 27 22:28:54 2008 +0100| [b38e54d2f4836c4fab30ddbbc2c7ee4d09e1532c] | committer: Adrien Grand 

Make login and password configurable.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=b38e54d2f4836c4fab30ddbbc2c7ee4d09e1532c
---

 .../vlma/web/configuration/ConfigurationEdit.java  |   14 ++++++++++++++
 .../configuration/ConfigurationEditController.java |    4 ++++
 vlma-webapp/src/main/resources/messages.properties |    2 ++
 .../src/main/resources/messages_fr.properties      |    2 ++
 .../jsp/configuration/configurationedit_right.jsp  |   14 ++++++++++++++
 5 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEdit.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEdit.java
index d564fce..74fdfe2 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEdit.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEdit.java
@@ -25,6 +25,8 @@ public class ConfigurationEdit {
     private Integer vlc_telnet_port;
     private String vlc_telnet_password;
     private Integer vlc_monitor_http_port;
+    private String vlc_monitor_http_login;
+    private String vlc_monitor_http_password;
     private String vlma_streaming;
     private String vlma_encapsulation;
     private Integer vlma_streaming_http_port;
@@ -50,6 +52,18 @@ public class ConfigurationEdit {
     public void setVlc_monitor_http_port(Integer vlc_monitor_http_port) {
         this.vlc_monitor_http_port = vlc_monitor_http_port;
     }
+    public String getVlc_monitor_http_login() {
+        return vlc_monitor_http_login;
+    }
+    public void setVlc_monitor_http_login(String vlc_monitor_http_login) {
+        this.vlc_monitor_http_login = vlc_monitor_http_login;
+    }
+    public String getVlc_monitor_http_password() {
+        return vlc_monitor_http_password;
+    }
+    public void setVlc_monitor_http_password(String vlc_monitor_http_password) {
+        this.vlc_monitor_http_password = vlc_monitor_http_password;
+    }
     public Integer getVlc_stream_dvb_bandwidth() {
         return vlc_stream_dvb_bandwidth;
     }
diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEditController.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEditController.java
index ba93a42..a33e19e 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEditController.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/configuration/ConfigurationEditController.java
@@ -47,6 +47,8 @@ public class ConfigurationEditController extends SimpleFormController {
         ConfigurationEdit form = (ConfigurationEdit) command;
         data.setProperty("vlc.telnet.port", form.getVlc_telnet_port());
         data.setProperty("vlc.telnet.password", form.getVlc_telnet_password());
+        data.setProperty("vlc.monitor.http.login", form.getVlc_monitor_http_login());
+        data.setProperty("vlc.monitor.http.password", form.getVlc_monitor_http_password());
         data.setProperty("vlc.monitor.http.port", form.getVlc_monitor_http_port());
         data.setProperty("vlma.streaming", form.getVlma_streaming());
         data.setProperty("vlma.encapsulation", form.getVlma_encapsulation());
@@ -96,6 +98,8 @@ public class ConfigurationEditController extends SimpleFormController {
         form.setVlc_telnet_port(data.getInt("vlc.telnet.port"));
         form.setVlc_telnet_password(data.getString("vlc.telnet.password"));
         form.setVlc_monitor_http_port(data.getInt("vlc.monitor.http.port"));
+        form.setVlc_monitor_http_login(data.getString("vlc.monitor.http.login"));
+        form.setVlc_monitor_http_password(data.getString("vlc.monitor.http.password"));
         form.setVlma_streaming(data.getString("vlma.streaming"));
         form.setVlma_encapsulation(data.getString("vlma.encapsulation"));
         form.setVlma_streaming_http_port(data.getInt("vlma.streaming.http.port"));
diff --git a/vlma-webapp/src/main/resources/messages.properties b/vlma-webapp/src/main/resources/messages.properties
index 9a3b5ef..361277d 100644
--- a/vlma-webapp/src/main/resources/messages.properties
+++ b/vlma-webapp/src/main/resources/messages.properties
@@ -63,6 +63,8 @@ configuration.vlma.notification.irc = IRC
 configuration.vlma.notification.msn = MSN
 configuration.edit.error.invalidaddress = Impossible to modify the configuration
 configuration.edit.error.invalidaddress = Invalid address
+vlc.monitor.http.login = Login
+vlc.monitor.http.password = Password
 vlc.monitor.http.port = Port
 vlc.snmp.community = SNMP community
 vlc.snmp.oid.cpu_load = CPU load OID
diff --git a/vlma-webapp/src/main/resources/messages_fr.properties b/vlma-webapp/src/main/resources/messages_fr.properties
index 5b4aa8b..8dc066f 100644
--- a/vlma-webapp/src/main/resources/messages_fr.properties
+++ b/vlma-webapp/src/main/resources/messages_fr.properties
@@ -60,6 +60,8 @@ configuration.vlma.notification.irc = IRC
 configuration.vlma.notification.msn = MSN
 configuration.edit.error.invalidaddress = Impossible de modifier la configuration
 configuration.edit.error.invalidaddress = Adresse invalide
+vlc.monitor.http.login = Login
+vlc.monitor.http.password = Mot de passe
 vlc.monitor.http.port = Port
 vlc.snmp.community = Communauté SNMP
 vlc.snmp.oid.cpu_load = OID de la charge processeur
diff --git a/vlma-webapp/src/main/webapp/WEB-INF/jsp/configuration/configurationedit_right.jsp b/vlma-webapp/src/main/webapp/WEB-INF/jsp/configuration/configurationedit_right.jsp
index 69bd76d..f7c278e 100644
--- a/vlma-webapp/src/main/webapp/WEB-INF/jsp/configuration/configurationedit_right.jsp
+++ b/vlma-webapp/src/main/webapp/WEB-INF/jsp/configuration/configurationedit_right.jsp
@@ -29,6 +29,20 @@
 
 <table class="configuration fullwidth">
     <tr>
+        <td><fmt:message key="vlc.monitor.http.login" /></td>
+        <spring:bind path="configurationEdit.vlc_monitor_http_login">
+            <td><input name="vlc_monitor_http_login" type="text" value="<c:out value="${status.value}"/>" /></td>
+            <td><span class="error"><c:out value="${status.errorMessage}" /></span></td>
+        </spring:bind>
+    </tr>
+    <tr>
+        <td><fmt:message key="vlc.monitor.http.password" /></td>
+        <spring:bind path="configurationEdit.vlc_monitor_http_password">
+            <td><input name="vlc_monitor_http_password" type="text" value="<c:out value="${status.value}"/>" /></td>
+            <td><span class="error"><c:out value="${status.errorMessage}" /></span></td>
+        </spring:bind>
+    </tr>
+    <tr>
         <td><fmt:message key="vlc.monitor.http.port" /></td>
         <spring:bind path="configurationEdit.vlc_monitor_http_port">
             <td><input name="vlc_monitor_http_port" type="text" value="<c:out value="${status.value}"/>" /></td>



More information about the vlma-devel mailing list