← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16093: Synch settings, impl function for testing settings against remote server

 

------------------------------------------------------------
revno: 16093
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-07-12 00:15:29 +0200
message:
  Synch settings, impl function for testing settings against remote server
added:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascripts/systemSynchronizationSettings.js
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSynchronizationSettings.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2014-07-11 21:33:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties	2014-07-11 22:15:29 +0000
@@ -115,3 +115,5 @@
 recommended=recommended
 put_analytics_in_maintenance_mode=Put analytics in maintenance mode
 returns=returns
+test_settings=Test settings
+hidden=Hidden
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml	2014-07-10 13:15:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/struts.xml	2014-07-11 22:15:29 +0000
@@ -160,6 +160,7 @@
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-settings/systemSynchronizationSettings.vm</param>
       <param name="menu">/dhis-web-maintenance-settings/settingsMenu.vm</param>
+      <param name="javascripts">javascripts/systemSynchronizationSettings.js</param>
       <param name="requiredAuthorities">F_SYSTEM_SETTING</param>
     </action> 
     

=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascripts/systemSynchronizationSettings.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascripts/systemSynchronizationSettings.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/javascripts/systemSynchronizationSettings.js	2014-07-11 22:15:29 +0000
@@ -0,0 +1,7 @@
+
+function checkRemoteServerAvailability()
+{
+	$.getJSON( "../api/synchronization/availability", function( json ) {
+		setHeaderDelayMessage( json.message );
+	} );
+}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSynchronizationSettings.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSynchronizationSettings.vm	2014-07-08 16:35:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/dhis-web-maintenance-settings/systemSynchronizationSettings.vm	2014-07-11 22:15:29 +0000
@@ -28,7 +28,10 @@
 
 <div class="settingLabel">$i18n.getString( "remote_server_password" )</div>
 <div class="setting">
-	<input type="password" id="remoteServerPassword" name="remoteServerPassword">
+	<input type="password" id="remoteServerPassword" name="remoteServerPassword" placeholder="$i18n.getString( 'hidden' )">
 </div>
 
-<div class="setting"><input type="button" value="$i18n.getString( 'save' )" style="width:10em"/></div>
+<div class="setting">
+	<input type="button" value="$i18n.getString( 'save' )" style="width:10em"/>
+	<span style="margin-left: 1em;"><a href="javascript:checkRemoteServerAvailability()">$i18n.getString( "test_settings" )</a></span>
+</div>