WEEK ELEVEN&TWELVE——Add boxes to dashboard

These two weeks I mainly adding boxes to dashboard. Through realize a custom Loader(DashboardBoxDataLoader) and then return the data every box needed directly. Adding DashboardBoxFragment to dashboard. Also modify the layout of dashboard in vertical and horizon direction. The vertical and horizon display as followed:



While fix PossibleCursorLeak exception in the state of onPause in fragment or activity, if not shut down cursor, and refresh the local database now, it may cause PossibleCursorLeak. So I invoke restartLoader in onResume, and invoke destroyLoader in onPause to fix this BUG.

WEEK NINE&TEN——Add the Most Utilized VMs and Most Utilized Hosts

Added DashboardMostUtilizedFragment for displaying Most Utilized VMs and Most Utilized Hosts, and make Most Utilized VMs and Most Utilized Hosts show up only on the tablet(> = 7 inches) , make dashboard display in different ways on phone and tablet. The screenshot below is on phone:



The screenshot below is on tablet:


“Add boxes with’1 Data Centers’ ‘5 Clusters’ etc to dashboard” , I consider using the Loader, GridView and ListAdapter to achieve before, but found that it would use a lot of Loader, so I’m considering using custom loader get the data needed for each box.

The custom loader(DashboardBoxDataLoader) has been achieved, and I’m optimizing the dashboard boxes’ layout.

WEEK SEVEN&EIGHT——add dashboard

These two weeks the progress is Adding dashboard. First do improvement for PercentageCircleView, enable different percentage displayed by different color, adding the function that get Storage Domain data and save it into the local database, also enable to display the state of CPU,Memory, Storage on dashboard, and make dashboard display in different ways on phone and PC. As followed:



At the very beginning, I used the time setter to synchronize data, with the help of Tomas, and read the content provider of android, and the code, get understand of how movirt do the data synchronize, and then finally using listen on changes in the DB to update dashboard display.

WEEK FIVE&SIX——Enriching the VM general view and begin to add dashboard

These two weeks I am working for Enriching the VM general view and begin to add dashboard.

First I got familiar with android’s Loaders, learning related API about Loaders, also get familiar with Loaders asynchronously load data in an activity or fragment. Get to know how to self define view in android and how to use canvas in self defined view.

With these base knowledge, I add the function of getting data from data center and save in local database, also enlarge data page of Cluster, host, adding data fragment display for VM general view, including Cluster,Data Center, Host as followed:


Also these two weeks, I begin to add dashboard for movirt, and search some open source lib of dashboard and chart in GitHub, realize CircleProgressView as followed:

图片7However, at the moment, there is no animation effect while CircleProgressView display the progress, so this is the next task. After finished the CircleProgressView, next will to realize dashboard fragment.


In order to realize the function of SPICE over SSL, these two weeks, first I get familiar with freeaSPICE-3.7.7-final.apk, to have an idea how to connect ovirt’s SPICE Console.

After I can connect ovirt’s SPICE Console successfully by freeaSPICE, I got the necessary parameter that connect ovirt’s SPICE Console. And then I begin to check bVNC’s source code ( the freeaSPICE mentioned before is the author modified bVNC source and compile and got it). Also I test it, and find freeaSPICE do not support passing parameters(SPORT,SUBJECT,CA_FILE) in URL.

I tried to contact the author but didn’t get any feedback, and then I modify bVNC according the method that author offered how to modify bVNC into aSPICE. But I have no idea how to compile libspice.so and libgstreamer_android.so, so I copy lib document of freeaSPICE-3.7.7-final.apk, and compile aSPICE successfully.Howerve it only works while I rename the package name of aSPICE APP as the same name of the package of freeaSPICE-3.7.7-final.apk.

The following interface show successfully compiled aSPICE:


After compile aSPICE successfully, I Extend aSPICE’s URI parameters supported by RemoteCanvasActivity(added support for
TlsPort, CaCertPath and CertSubject parameter) .
And then modify movirt, first got and save TlsPort and CertSubject these two parameters, which got from REST API through movirt, and then check whether it already download CA file before calling aSPICE, if not remind user download CA file. Finally, add TlsPort, CaCertPath and CertSubject these three parameters in calling aSPICE’s URL.

Calling aSPICE to connect SPICE Console successfully is showed as below:


Get Started–First Week

It has been two weeks since the project begin, these two weeks I mainly get familiar with the relevant knowledge about this project.

First getting familiar with the process that movirt getting data from the server and save the data in local database. Also I restudy SQL and relevant API about Android operation system’s sqlite database.

For the code part, showed as the following picture:
1.Add activate and maintenance actions for host details activity:

图片12.Optimized actions display for vm and host details activity
(1)while vm in the down state,menu only display run action,as followed:



(2)while vm in up state,menu display stop, reboot and console action, as followed:



(3)while host in up state,menu only display maintenance action, as followed:


(4) while host in maintenance state,menu only display run action, as followed:



As this week I’ve back to China and waste few days in travel, and the following part is unfinished as planed:
Enrich the VM general view by some data, at least:
– cluster (with version) / datacenter on which this VM is
– If the VM is running than the Host on which it is running

To make up the delay, next week I will word harder to make the progress as planed.