Giter VIP home page Giter VIP logo

ndg-ng's Introduction

NOKIA DATA GATHERING
================================

* Info: See <http://> for introductory docs.
* Author: Ian Lawrence <[email protected]>
* Date: $Date: 2011-08-12 12:50:48 -0400 (Fre, 12. Aug 2011) $
* Revision: $Revision: 5 $
* Description: This is the main documentation


GETTING STARTED
================================

    We use Ubuntu 11.10
    First, install mysql server if needed (if its not already installed):
    $ sudo apt-get install mysql-server
    Then, login to mysql as a root:
    mysql -u root -p
    This will ask you for the root password for mysql.
    In mysql the ndg local user should be created with the same password and then the database 'ndg2' should be created
    and the user granted access to it:
    mysql> create user 'ndg'@'localhost' identified by 'ndg';
    mysql> create database ndg2;
    mysql> grant all privileges on ndg2.* to ndg@localhost;
    git clone https://github.com/nokiadatagathering/ndg-ng.git
    cd assets/build/
    (install necessary tools (sudo apt-get install optipng libjpeg-progs) to optimize assets.This is not needed on Windows machines. ant needs to be version 1.8.2 so you may need to do
                  sudo add-apt-repository ppa:eclipse-team/debian-package
                  sudo apt-get update
                  sudo apt-get install ant
    )
    ant -f build_dev.xml (or just 'ant build' if you are going to production)  
    cd ../..
    cd conf
    vim application.conf - and change 
                                http.address=<your_IP_address>
                           and Mail configuration if you want to use the registration
    vim msm-settings.properties - and change
                                  client.ota=http\://<your_IP_address>/\:9000/ndg-ota/client/ndg.jad
                                  urlServer=http\://<your_IP_address>\:9000
    play run
    http://<your_IP_address>:9000/


DEVELOPER PRACTICES
================================


We are using Git as the Source Control Manager (SCM)

Our Documentation style is Markdown


APPLICATION LAYOUT
================================


1. app/ contains the application's core, split between models, controllers and views directories. It can contain other Java packages as well. This is the directory where .java source files live.

2. conf/ contains all the configuration files for the application, especially the main application.conf file, the routes definition files and the messages files used for internationalization.

3. lib/ contains all optional Java libraries packaged as standard .jar files.

4. public/ optimized assets which represent the front end of the site. It includes JavaScript files, stylesheets and images directories.

5. assets/ source files (html, css, javascript). The ant build file in assets/build optimizes these files and then places them in the assets/public directory. The folder does not need to be deployed when going live.

6. test/ contains all the application tests. Tests are either written either as Java JUnit tests or as Selenium tests

ndg-ng's People

Contributors

ianlawrence avatar rodavelino avatar kulsoom avatar damianjanicki avatar

Stargazers

Dominik Frankowski avatar  avatar  avatar  avatar

Watchers

Jake Watson avatar James Cloos avatar Abhishek P C avatar  avatar

ndg-ng's Issues

Move jquery to cdn

Before alpha release we should move jquery to cdn and also customize and compress jquery ui

Save button?

Would be nice to have a "Save" button as opposed to saving when you go back to the list of surveys

Edited survey names are not displaying on survey list

Edit survey name and hit back button to go to survey list - this should save and update name in survey list. This works if the process is repeated (i.e refreshed) so commenting out
// refresh( msg );
does not seem to work. leaving in is a null expection and the page jumps back to the editor from survey list

function onSaveClicked(){
updateSurveyIndexes();
$.ajax(
{
type: "POST",
url: "/SurveyManager/saveSurvey",
data: {surveyData : surveyModel.getSurveyString()},
success: function( msg ){
// refresh( msg );
// alert( "Survey saved successfully "); //TODo localize
},
error: function( request, error ) {
alert("Problem with saving survey. Original error: " + error);
}
});
}

Usability on editing a survey

Clicking the toolbar to edit a survey goes to the bottom of the edit screen instead of starting from the top. THis si confusing for a user

Browser: Chrome

Export error - numbers become text

When the survey results are exported to excel the number format become text.Therefore users cannot sum it up or get average because it say the number in cell is formatted as text.

False message that all questions have not been answered

In a few instances where we've set up a survey with categories that have four or five questions in them, the app has indicated that not all questions in the category had been answered when in fact they have.

This happens when multiple choice questions are the last question on the java client

Downloading a survey

Creating a new survey and then trying to download it does not work - look at Z's survey on EC2

Download Survey is broken

Clicking the Download icon in the survey list toolbar does not download the survey. It opens a blank white page when it should just pop up the download

the error is:

Nov 10, 2011 3:40:19 PM controllers.Management get
SEVERE: null
java.lang.NullPointerException: Try to read dataType on null object org.javarosa.core.model.instance.TreeElement (controllers.logic.SurveyXmlBuilder.addQuestionBinding, line 176)
at play.classloading.enhancers.PropertiesEnhancer$FieldAccessor.invokeReadProperty(PropertiesEnhancer.java:202)
at controllers.logic.SurveyXmlBuilder.addQuestionBinding(SurveyXmlBuilder.java:176)
at controllers.logic.SurveyXmlBuilder.addBindings(SurveyXmlBuilder.java:163)
at controllers.logic.SurveyXmlBuilder.addBindings(SurveyXmlBuilder.java:165)
at controllers.logic.SurveyXmlBuilder.addModelToHead(SurveyXmlBuilder.java:104)
at controllers.logic.SurveyXmlBuilder.setupHead(SurveyXmlBuilder.java:97)
at controllers.logic.SurveyXmlBuilder.printFormDef(SurveyXmlBuilder.java:69)
at controllers.logic.SurveyXmlBuilder.printSurveyXml(SurveyXmlBuilder.java:51)
at controllers.Management.get(Management.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:546)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:500)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:476)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:471)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:220)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:200)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

Cannot quickly select a user to send a survey too

I cannot select quickly, a particular user when sending survey to the mobile phone/user by searching, rather, one has to scroll down to look for user(s) manually, and it depends upon the network's strength. imagine a thousand users;

User authentication

Any user can send a survey back from a phone that was not sent for them.

For example Survey 1 on the server is sent to the user admin and then the user John gets the device of admin which contains survey 1. He can create a new result and send that result to the server with his credentials (not admins) and it works

Saving Survey Error

When I edit a survey and try to save it, it says:

Problem with saving survey. Original error: error

The log shows the following:

@6b03ga1pn
Internal Server Error (500) for request POST /surveyManager/saveSurvey

Execution exception (In /app/controllers/SurveyManager.java around line 67)
NullPointerException occured : Try to read userAdmin on null object models.NdgUser (controllers.SurveyManager.saveSurvey, line 67)

play.exceptions.JavaExecutionException: Try to read userAdmin on null object models.NdgUser (controllers.SurveyManager.saveSurvey, line 67)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:229)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException: Try to read userAdmin on null object models.NdgUser (controllers.SurveyManager.saveSurvey, line 67)
at play.classloading.enhancers.PropertiesEnhancer$FieldAccessor.invokeReadProperty(PropertiesEnhancer.java:202)
at controllers.SurveyManager.saveSurvey(SurveyManager.java:67)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:546)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:500)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:476)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:471)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159)
... 1 more

Editor Container Resizing

To recreate the bug:

  1. Create two categories
  2. Add one question to each category
  3. In the first category, choose multiple choice question
  4. Add many options (70+)
  5. Click the question in the second category

Editor will shrink but the container will remain the same size

Pre cache images ?

Can we pre cache all the images ? They load slowly on the select all dialogs.

Zip files corrupted when exporting from EC2

Select results to export
export
try to open created zip file

End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /home/ian/Desktop/iam/2/s.zip or
/home/ian/Desktop/iam/2/s.zip.zip, and cannot find /home/ian/Desktop/iam/2/s.zip.ZIP, period.

sms fails

Added login details in msm-settings.properties and turned sms on in msm-core.settings. On a non firewalled connection

The error is

Starting Gateways ...
13:51:52,044 INFO ~ >>>>> ModemGateway: null
19195 [play-thread-1] INFO smslog - >>>>> ModemGateway: null
13:55:50,810 WARN ~ GTW: clickatell: Maximum number of queue retries exceeded, message lost.
257961 [Thread-10] WARN org.smslib - GTW: clickatell: Maximum number of queue retries exceeded, message lost.

Outbound handler called from Gateway: clickatell

<< OUTBOUND MESSAGE DUMP >>

Gateway Id: clickatell
Encoding: UCS2 (Unicode)
Date: Fri Nov 18 13:55:42 AMT 2011
Text: hello test from new server
Encoded Text: 00680065006c006c006f00200074006500730074002000660072006f006d0020006e006500770020007300650072007600650072
SMSC Ref No: null
Recipient: 559293755375
Dispatch Date: null
Message Status: FAILED
Validity Period (Hours): -1
Status Report: false
Source / Destination Ports: -1 / -1

Flash SMS: false

How to display all users?

On EC2 test server I was looking at a group and decided to add a new user (not to that group but just add a new user to the system). It worked but it is not obvious then how to display the list of all current users. It is possible to go back to the Survey List and then back to User Admin to get the full list but this is not user friendly.

Try to read dataType on null object

play.exceptions.JavaExecutionException: Try to read dataType on null object org.javarosa.core.model.instance.TreeElement (controllers.logic.SurveyXmlBuilder.addQuestionBinding, line 188)

Select box on editor

Sometimes does not display the correct question choice. Remove the select box plugin should fix this

Password field enters hash

After entering login detail the password enters more letters than the password length

Browser: Chrome

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.