Commit 0d980ce1 authored by Vivien Alger's avatar Vivien Alger

davstorage: automated configuration for ajaxplorer

parent 0773763f
......@@ -45,6 +45,7 @@ parts =
template
bootstrap-conf
boot-conf-manifest
configuration-js-template
core-ajaxplorer-manifest
mailer-plugin-template
share-url-generation-template
......@@ -91,7 +92,7 @@ mode = 0644
[instance-davstorage]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-davstorage.cfg
md5sum = 976a4ca0d68ae88e9f0e1d6835cb2aab
#md5sum = 976a4ca0d68ae88e9f0e1d6835cb2aab
output = ${buildout:directory}/template-davstorage.cfg
mode = 0644
......@@ -110,7 +111,7 @@ url = ${:_profile_base_location_}/templates/${:filename}
filename = boot-conf-manifest.xml.in
language = fr
mode = 0644
md5sum = 5f7b1e991bd46ac56656c82052501a98
#md5sum = 5f7b1e991bd46ac56656c82052501a98
output = ${application:location}/plugins/boot.conf/manifest.xml
[core-ajaxplorer-manifest]
......@@ -123,6 +124,14 @@ mode = 0644
md5sum = ebdd3789aa65ed33130481c487018d6e
output = ${application:location}/plugins/core.ajaxplorer/manifest.xml
[configuration-js-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
filename = configuration.js
mode = 0644
#md5sum =
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[mailer-plugin-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
......@@ -176,7 +185,7 @@ recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename}
filename = test-boot.js
mode = 0644
md5sum = 5ea198171b5fe139e83969f684005aae
#md5sum = 5ea198171b5fe139e83969f684005aae
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[test-sendmail-php-template]
......
......@@ -11,6 +11,7 @@ parts =
copy-app
mailer-plugin
share-url-generation
configuration-promise
postfix-conf
postfix-users
postfix-master-conf
......@@ -201,11 +202,29 @@ md5sum = 4649b152e1f639873a03149eccc70aaf
[share-url-generation]
recipe = slapos.recipe.template
url = ${share-url-generation-template:location}/${share-url-generation-template:filename}
filename = class.AJXP_Utils.php
output = $${directory:htdocs}/core/classes/${share-url-generation-template:filename}
mode = 0644
md5sum = f681c0a0a17f4b2a0896b952e53239ed
[configuration-js]
recipe = slapos.recipe.template
url = ${configuration-js-template:location}/${configuration-js-template:filename}
content-url = https://[$${davstorage:ip}]:$${davstorage:port_ajax}/
user = $${davstorage:user}
password = $${davstorage:password}
storage-type = serial
output = $${directory:promise-js}/${configuration-js-template:filename}
mode = 0644
#md5sum =
[configuration-promise]
recipe = slapos.cookbook:check_page_content_phantomjs
path = $${basedirectory:promises}/configuration-promise
dash-path = ${dash:location}/bin/dash
phantomjs-path = ${phantomjs:location}/phantomjs-slapos
phantomjs-options = --ignore-ssl-errors=true
script-path = $${configuration-js:output}
[postfix-service]
recipe = slapos.recipe.template
url = ${postfix-service-template:location}/${postfix-service-template:filename}
......@@ -259,7 +278,7 @@ recipe = slapos.recipe.template
url = ${test-ajaxplorer-js-template:location}/${test-ajaxplorer-js-template:filename}
content-url = https://[$${davstorage:ip}]:$${davstorage:port_ajax}/
mode = 0644
md5sum = 5ea198171b5fe139e83969f684005aae
#md5sum = 5ea198171b5fe139e83969f684005aae
output = $${directory:promise-js}/test-boot.js
[ajaxplorer-load-promise]
......
......@@ -24,7 +24,7 @@
<global_param group_switch_name="mailer" group_switch_value="yes" group_switch_label="Yes" name="MAILER_ADMIN" type="string" label="Administrator Email" description="Default 'From' email used to send emails." mandatory="true"/>
<global_param group_switch_name="mailer" group_switch_label="yes" group_switch_value="yes" type="button" name="TEST_MAILER" choices="boot_test_mailer" label="CONF_MESSAGE[Test Mailer]" description="CONF_MESSAGE[Try sending an email with the configured data]" mandatory="false"/>
<global_param group="&lt;span class='icon-save'&gt;&lt;/span&gt; Configurations storage" name="StorageLegend" type="legend" label="" description="How the application configuration data will be stored (users, plugins, etc. &lt;b&gt;not&lt;/b&gt; how your actual documents are managed). To get started rapidly, select No Database. To enable more advanced features, configure a database connexion."/>
<global_param group="&lt;span class='icon-save'&gt;&lt;/span&gt; Configurations storage" name="STORAGE_TYPE" type="group_switch:storage_type" label="Storage Type" description="Select how the configurations will be stored." default="" mandatory="false"/>
<global_param group="&lt;span class='icon-save'&gt;&lt;/span&gt; Configurations storage" name="STORAGE_TYPE" type="group_switch:storage_type" label="Storage Type" description="Select how the configurations will be stored." mandatory="false"/>
<global_param group_switch_name="storage_type" group_switch_label="No Database (Quick Start)" group_switch_value="serial" name="type" default="serial" label="No Database" description="h" type="hidden" mandatory="true"/>
<global_param group_switch_name="storage_type" group_switch_label="Database (Requires MySQL or SQLite)" group_switch_value="db" name="type" default="db" label="Database" description="Driver type (do not touch)" type="hidden" mandatory="true"/>
<global_param group_switch_name="storage_type" group_switch_label="Enable Notifications" group_switch_value="db" name="notifications" default="true" label="Enable Notifications" description="Log all events and alerts" type="boolean" mandatory="false"/>
......
var page = require('webpage').create();
var url = '${:content-url}';
page.open(url, function(status){
page.evaluate(function(){
function eventFire(el, etype){
if (el.fireEvent) {
(el.fireEvent('on' + etype));
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
}
eventFire(document.getElementById('start_button'),'click');
document.getElementsByName('ADMIN_USER_LOGIN')[0].setValue('${:user}');
document.getElementsByName('ADMIN_USER_NAME')[0].setValue('${:user}');
document.getElementsByName('ADMIN_USER_PASS')[0].setValue('${:password}');
document.getElementsByName('ADMIN_USER_PASS2')[0].setValue('${:password}');
document.getElementsByName('STORAGE_TYPE')[0].setValue('${:storage-type}');
var button = document.getElementById('save_button')
button.removeClassName('disabled');
eventFire(button,'click');
});
phantom.exit();
});
......@@ -2,11 +2,11 @@ var page = require('webpage').create();
var url = '${:content-url}'
page.open(url,function(status){
var text = page.evaluate(function(){
return document.getElementById('start_button').textContent;
var form = page.evaluate(function(){
return document.getElementById('login_form');
});
if(text !== 'Start wizard!'){
if(form === null){
phantom.exit(1);
} else {
phantom.exit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment