Is there anyway that i can configure the tabs i am interested in. Like say i only want portfolio , position and timeseries tab with a tab that i made , how can i do that with minimum effort. ?
As always appreciate a lot for all your help and efforts.
you will find the list of tabs in the administration interface. As you can see, aside from the link to analytics, all of the others are actually just #hash links. If you want to remove a tab, just removing its link in this file will do it.
To create a new tab, you have three options
Create a whole new file (like the analytics file). The web root is located at:
You can use the file gadget.ftl as a stripped down model if you like.
Create a #hash link like the other tabs and write a Javascript view. If you choose this option, you will need to use our view framework. Let me know if you’re going this route because it’s slightly more complex.
Link to an external file on another service altogether.
I forgot to mention one thing. I am trying to see if i can get my requirement without touching OG-Web.
I haven’t fully reviewed the options you gave me , anyway let me get back to you after that.
Made the following change to
common.layout = (({
‘analytics.ftl’: common.layout.analytics,
‘reports.ftl’: common.layout.analytics,
‘analytics2.ftl’: common.layout.analytics2,
‘admin.ftl’: common.layout.admin
})[window.location.pathname.split(’/’).reverse()[0].toLowerCase()] || $.noop)();
at ./web-engine/prototype/scripts/og/common/og.common.routes.js
And finally placed my HTML and dependencies at folder - ./web-engine/reports/
Is this the right way of doing ?
Again i am intrested to know if there is any method by which i can add the tab without touching OG-Web. This will save me the time to merge from upstreeam.
So, @afshin is better placed to answer the general method questions, but I did discuss the question of adding features without touching OG-Web and while I don’t think there’s currently a way of doing it, we thought it was a good idea that would be useful for us internally too. So you can reasonably expect us to add some method of doing this (probably along the lines of a project that can essentially overlay the files in OG-Web) pretty soon. One thing I might suggest is using ftl/urls with a name less generic than ‘reports’ as it’s probably likely to be something we’ll add at some point (also no such thing is under development yet). Obviously that’s purely up to you, but I just want to avoid you having to deal with name clashes later on.
The steps you described ought to work. Have you created a segment in uiResourceConfig.xml that describes all the JS resources you want in og_reports.js? As an example, you could copy the og_gadget.js bundle since it is fairly barebones.
Additionally, you don’t actually need to use our Javascript view code in your FTL file. That file can contain pretty much anything you like.
@afsin - Things are working pretty well. The solution i have told is working for me. Anyway let me look into all the suggestions you have given.
Thanks a lot for your answers.
If it is there, I could see that a repeated ajax call (
POST http://localhost:8080/updates/70) is produced. How can I fill the new tab with data by an ajax call?
What I really need is to fill the newly added tab with a data table from the OG server with out loosing the header flow.
Congrats to the OG team for the new release 2.1, looks like a lot of nice features.
Quick question: On the gadgets in the analytics tab, Where do you look for making custom changes, like adding/modifying etc. Also is it possible to have them outside of the analytics tab like in timeseries tab etc. What is the underlying framework for understanding and learning more about it.
If you are looking to make changes to the analytics view a good place to start would be to look at og.common.gadgets.gadgetscontainer.js which houses the gadgets. It is also responsible for handling the tabs for multiple gadgets, drag and drop, inplace gadgets and changing gadgets to other supporting types (for example swapping over from a yield curve to the underlying data)
The gadgets can exist outside the analytics view. If you try opening an inplace gadget and drag and drop it into the main grid you will see if open in a new page (localhost:8080/jax/bundles/fm/prototype/gadget.ftl). The various types of gadgets can be found here OG-Web/web-engine/prototype/scripts/og/common/gadgets/og.common.gadgets.*.js. You could also look at how the timeseries exist in the admin pages (localhost:8080/jax/bundles/fm/prototype/admin.ftl#/timeseries/)
Regarding frameworks, most of the functionality is custom written. For plotting graphs we use flot and three and jquery to handle ajax. I would suggest you have a look at the various rest objects in OG-Web/web-engine/prototype/scripts/og/api/ to see how we handle the requests to the server.