Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch updates and combines the previous patches: http://rb.dcache.org/r/4522/ http://rb.dcache.org/r/4523/ A. Modifies where the billing plots are produced. See: http://rt.dcache.org/Ticket/Display.html?id=7149 http://rb.dcache.org/r/4507/ http://rb.dcache.org/r/4473/ In the current implementation, the HttpBillingEngine, which is responsible for generating histograms, needs access to the same database as the BillingCell, which processes the door and mover messages. The above tickets and patches provide work-arounds for this departure from the underlying contract for the "database ls" command. While it may be desirable in the future to revise this contract and restructure the code to support shared database mappings, it is a relatively simple modification to bring billing in line with the contract. This patch eliminates the BillingHistory class and moves the plot generation into the BillingDatabase class; this is activated by an option "generatePlots" which by default it false (and which can only be true if billingToDb=yes). The HttpResponseEngine (the billingHistory alias) is merely responsible for serving the plot images as an html response. In the future we will want to change this static production system entirely so that the GET request to the billing plots page dynamically requests the histogram plot. This can be done by message callbacks to the BillingCell, and so the web application will continue to be isolated from the BillingCell's database. B. Migration of billing pages to webadmin (Wicket). http://rb.dcache.org/r/4208/ http://rb.dcache.org/r/4329/ Combines the above-cited patches into a single revised patch. The previous code was written prior to the integration of the JettyCell with the HttpServiceCell (http://rb.dcache.org/r/4518) and the relocation of the plotting thread from the web layer to the billing service itself. This patch accomplishes the same goal within the new framework. The wicket billing plots page now resides inside webadmin; as a consequence, the billingHistory alias and the corresponding HttpBillingHistoryEngine have been eliminated, as well as the static link to that page from the static index page. Note that the properties billingToDb and generatePlots control WebAdminInterface's mount of, and the BasicNavigatorPanel's link to, the BillingPlot page (this occurs only when their values are yes/true, respectively); hence the contexts for switching between a static page reporting that plots are not enabled and the actual plots page are no longer necessary and have also been eliminated. Note that this page's index in the BasicNavigatorPanel.properties file must remain the last one (N-1), since it is removed from or appended to the list on this basis. Hence, any future pages (such as the alarms page), should not occupy the last position. Three of the links on the main static (Cell Services, Pool Usage and Pool Transfer Queues) have been redirected to their webadmin URLs, but one other (aliased as '/billing'), linked to "Action Log" on the main static page and generated by diskCacheV111.cells.HttpBillingEngine, is still available there; it would be desirable eventually to move this to Wicket as well. Patch was merged on 06/15/2012 with changes introduced by http://rb.dcache.org/r/4518 (rev) and http://rb.dcache.org/r/4581. trunk@17337 Patch was updated on 06/21/2012: This updated version adds necessary changes to httpd.batch which an oversight left out of the preceding version. The exception-handling in the plot classes has been cleaned up. We have also eliminated URL references to ajax.google by downloading the referenced jquery file and including it in webapps/js. There are also numerous cosmetic changes to the plot code, such as eliminating useless auto-generated javadoc comments. The size of the patch is deceptive; most of the extra length comes from the cosmetic changes and the added jquery files. RELEASE NOTES: 1. The billingToDb property still needs to be global, but the properties specific to the database can now live in the service scope. 2. To turn on plotting, the billing service property generatePlots must be set to true (this is its default value). 3. Since generatePlots now also controls the presence or absence of a web application page, it (like billingToDb) needs to be global (or at least domain-wide if billing runs in the httpd domain). Target: trunk Patch: http://rb.dcache.org/r/4572/ Acked-by: Dmitry
- Loading branch information