diff --git a/documentation/images/edgesense_dashboard_ready.png b/documentation/images/edgesense_dashboard_ready.png
new file mode 100644
index 0000000..57b76b7
Binary files /dev/null and b/documentation/images/edgesense_dashboard_ready.png differ
diff --git a/documentation/images/edgesense_installed.png b/documentation/images/edgesense_installed.png
index d4111f3..63b611a 100644
Binary files a/documentation/images/edgesense_installed.png and b/documentation/images/edgesense_installed.png differ
diff --git a/documentation/images/edgesense_run_the_script.png b/documentation/images/edgesense_run_the_script.png
new file mode 100644
index 0000000..fb8faef
Binary files /dev/null and b/documentation/images/edgesense_run_the_script.png differ
diff --git a/php/drupal/README.md b/php/drupal/README.md
index 01f3696..1d83928 100644
--- a/php/drupal/README.md
+++ b/php/drupal/README.md
@@ -74,11 +74,19 @@ And save the configuration.
![enable edgesense views module](../../documentation/images/drupal_modules_edgesense.png)
-During the install phase the module runs the script a first time, **this can take some time** but at the end of the install process you'll be greeted with a message that invites you to open the dashboard.
+If the module has been activated correctly you will be shown this message:
![edgesense installed](../../documentation/images/edgesense_installed.png)
-The default install uses the Drupal's cron to run the processing scripts once per day. If you have a big community and the Drupal's cron system times out while processing, you'll have to disable the automatic daily run from the Edgesense admin pages and you will have to schedule the runs with a different method (e.g. using the server system's cron scheduler)
+During the install phase the module will **not** run the data processing script because **this can take a long time** for large communities and this would cause a timeout error during the install process. At the end of the module activation you'll be able to open the module admin page which will have a button to immediately run the data processing script. If your community is small then you can do it by clicking the "Run Now" button on the page.
+
+![edgesense run the script](../../documentation/images/edgesense_run_the_script.png)
+
+If you click that button and the script has run you'll see this message:
+
+![edgesense dashboard ready](../../documentation/images/edgesense_dashboard_ready.png)
+
+If you community site is big (e.g. more then 100 users, 300 nodes or 500 comments) you will need to run it using cron / drush to avoid timeouts. [See below for more detailed instructions on how to do so](https://github.com/Wikitalia/edgesense/tree/master/php/drupal#b-avoiding-timeouts).
## Appendix
diff --git a/php/drupal/edgesense.admin.inc b/php/drupal/edgesense.admin.inc
index 6f49786..fb8babc 100644
--- a/php/drupal/edgesense.admin.inc
+++ b/php/drupal/edgesense.admin.inc
@@ -32,7 +32,7 @@ function edgesense_admin_home_form($form, &$form_state) {
$text .= '
';
if (!file_exists('public://edgesense/json/last.json')) {
- $text .= 'The Edgsense Python script has not run yet. Please follow
';
+ $text .= 'The Edgsense data processing script has not run yet. Please follow
';
$text .= t('the instructions for running it.', array('@url' => url('admin/edgesense/script-run')));
$text .= '
';
}
@@ -612,14 +612,15 @@ function edgesense_script_run_form($form, &$form_state) {
if (!file_exists('public://edgesense/json/last.json')) {
$form['first_run'] = array(
'#type' => 'fieldset',
- '#title' => t('First Run'),
+ '#title' => t('Processing Script First Run'),
);
$form['first_run']['instructions'] = array(
- '#markup' => t('The dashboard is almost ready, you will need to run the Edgesense Python script.
- If your community is small enough then you can do it right now, by clicking the "Run Now" button below.
- If it is big (e.g. more then 100 users, 300 nodes or 500 comments) you will need to run it using cron / drush
- to avoid timeouts.
'),
+ '#markup' => t('The dashboard is almost ready, to analyse your community network, you will need to run the Edgesense data processing script.
+ If your community is small enough then you can do it right now, by clicking the "Run Now" button below.
+ If it is big (e.g. more then 100 users, 300 nodes or 500 comments) to avoid timeout errors from Drupal you will need to
+ run it using cron / drush.
'),
);
+
$form['first_run']['run'] = array(
'#type' => 'submit',
'#value' => t('Run Now'),
@@ -677,7 +678,7 @@ function edgesense_script_run_form($form, &$form_state) {
*/
function edgesense_script_run_form_submit($form, &$form_state) {
edgesense_cron();
- drupal_set_message(t('The Edgesense Python script has run successfully and your Dashboard is now ready.'));
+ drupal_set_message(t('The Edgesense data processing script has run successfully and your Dashboard is now ready.'));
}
function edgesense_open_dashboard() {
diff --git a/php/drupal/edgesense.install b/php/drupal/edgesense.install
index 73fe685..720ee11 100644
--- a/php/drupal/edgesense.install
+++ b/php/drupal/edgesense.install
@@ -76,15 +76,15 @@ function edgesense_install() {
// Run the script for the first time to populate the dashboard
// checks also if the script is present and that it has actually run
if (!`which edgesense_drupal`) {
- drupal_set_message(t('The Edgsense Python script has not been installed. Please follow ' .
+ drupal_set_message(t('The Edgsense data processing script has not been installed. Please follow ' .
'the instructions for installing it.'
),
'warning'
);
}
- drupal_set_message(t('The Edgsense modules has been installed but the Python script has not run yet. Please follow ' .
- 'the instructions for running it.', array('@url' => url('admin/edgesense/script-run'))
+ drupal_set_message(t('The Edgsense module has been installed. You are one small step away form using your dashboard: the data processing script needs to run. Please ' .
+ 'click here and follow the instruction for executing it.', array('@url' => url('admin/edgesense/script-run'))
));
}
@@ -108,9 +108,9 @@ function edgesense_requirements($phase) {
elseif ($phase == 'runtime') {
if (!`which edgesense_drupal`) {
$requirements['edgesense_drupal'] = array(
- 'title' => $t('Edgesense Python script'),
+ 'title' => $t('Edgesense data processing script'),
'value' => $t('Not installed'),
- 'description' => $t('The Edgsense Python script has not been installed. Please follow ' .
+ 'description' => $t('The Edgsense data processing script has not been installed. Please follow ' .
'the instructions for installing it.'
),
'severity' => REQUIREMENT_ERROR,
@@ -118,9 +118,9 @@ function edgesense_requirements($phase) {
}
elseif (!file_exists('public://edgesense/json/last.json')) {
$requirements['edgesense_drupal'] = array(
- 'title' => $t('Edgesense Python script'),
+ 'title' => $t('Edgesense data processing script'),
'value' => $t('Not run'),
- 'description' => $t('The Edgsense Python script has not run yet. Please follow ' .
+ 'description' => $t('The Edgsense data processing script has not run yet. Please follow ' .
'the instructions for running it.', array('@url' => url('admin/edgesense/script-run'))
),
'severity' => REQUIREMENT_WARNING,
diff --git a/php/drupal/edgesense.module b/php/drupal/edgesense.module
index b192862..5591aeb 100644
--- a/php/drupal/edgesense.module
+++ b/php/drupal/edgesense.module
@@ -216,7 +216,7 @@ function edgesense_cron() {
*/
function edgesense_display_not_run_message() {
if (!file_exists('public://edgesense/json/last.json')) {
- drupal_set_message(t('The Edgsense Python script has not run yet. Please follow ' .
+ drupal_set_message(t('The Edgsense data processing script has not run yet. Please follow ' .
'the instructions for running it.', array('@url' => url('admin/edgesense/script-run'))
), 'warning');
}