0

I would like to add new report to wso2-emm, this report will be about user activity. I would like to add this report under report tab in emm consol, it would be like 'Installed applications summary for a given user' report which first search user and then it will show the user activity.

I want to know how can I send data to emm server and then how can I add it to report. I would like to send request for this information to user device when this report is requested.

More info:

Client : android

Community
  • 1
  • 1
user3806649
  • 1,257
  • 2
  • 18
  • 42

1 Answers1

1

Please analyse the JS module code in SERVER_HOME/repository/deployment/server/jaggeryapps/emm/modules and Views in SERVER_HOME/repository/deployment/server/jaggeryapps/emm/views and UI JS in SERVER_HOME/repository/deployment/server/jaggeryapps/emm/client/js. You got to do all the new implementations since we don't have an automated mechanism to add reports.

Thanks

Kasun Delgolla
  • 219
  • 1
  • 8
  • Thanks, To check UI I change index.hbs in \repository\deployment\server\jaggeryapps\emm\views\reports and add my report as a new row item in its table, and create another .hbs file for it. To do so I just copy devices_complience.bs and change its name as I set in index.hbs. and also change the title in this file. but when I go to [reports tab](https://localhost:9443/emm/reports/) and click on view button for this new item. nothing shown. What is wrong? – user3806649 Aug 15 '15 at 12:09
  • 1
    You have to link your new pages. Check EMM/controllers/reports.js and EMM/api/reportRouter.jag implementations. You will find how we have done it. – Kasun Delgolla Aug 15 '15 at 12:30
  • Thanks, I will check them. – user3806649 Aug 15 '15 at 15:24
  • I implement db.js, index.hbs, reports.js, mdm_reports.js and app_log.hbs (hbs file related to this report) and check it by adding value to related table in database (I create a table in wso2emm_db and add data to it), but I don't know how to manage communication phase between devices and server? and in which class I should insert data into db? – user3806649 Aug 28 '15 at 18:04
  • It's all under modules. Device -server communication happens via GCM or local notifications. Local notification is where, device has an in built task to wake up by its own and poll the server for operations. These functionalities are implemented in android agent app and in server, modules/device.js – Kasun Delgolla Aug 30 '15 at 05:32
  • I find GCMIntentService.java class but I couldn't find class related to local messaging, which class is for this? Also I want to enable this report through configuration tab by adding new feature to android policy, which .js and .hbs files I should change for it. – user3806649 Aug 30 '15 at 10:33
  • Local messaging is on AlarmReciever.java, DeviceStartupIntentReceiver.java and ProcessMessage.java classes on the Android agent. – Kasun Delgolla Aug 31 '15 at 11:15
  • Where update payLoad for notifications is call in server for android devices, I find this `driver.query(sqlscripts.notifications.update2, stringify(received_data), id); for ios devices under `getPendingOperationsFromDevice` functionin in emm\modules\devices.js? – user3806649 Sep 05 '15 at 16:00
  • It was in emm\modules\notifications.js – user3806649 Sep 06 '15 at 08:32