Hi everyone,
My name is Khan and working as an automation engineer. Very happy to be part of this great community. I would like to share my knowledge and get your important feedback regarding automation topics.
I'm working on a confluence QA monitoring page for pulling jira data via api calls for about 50 product teams.
Details:
1. each product team data includes number of defects in production and sprint-wise. number of automation tests, functional tests etc.
2. around 7 api calls are needed for each team. Meaning 50x7=350 ajax calls are done during page load
Questions:
1. how do I include some waiting gif etc to show that parts of the page is being populated and user need to wait?
2. any optimization best practices?
UPDATE:
by this time, I've completed the monitoring page and have distributed the api calls in few loops. The total loading time for ~1200 ajax calls is ~1.5 minutes. My question remains open.
Many thanks
AJS.$.ajax({
url: `${JIRA_REST_URL}${INCIDENTS}${productTeam}${REP_DURATION}${MAX_RES}`,
type: "GET",
success: function (data) {
....
I'm indeed not using any external tools. In short, a jql is encoded and then added to a jira-rest-api url and upon page load a call is made.
By now, I already have answers to my questions:
1. to use jquery to show waiting gifs etc
2. to avoid callback-Pyramid
3. to use jquery promises
@Daniel Eads Can you please give an example of a jquery promise?
Unfortunately jquery promises are outside the scope of my expertise! I do see examples of them in the jquery documentation - but as I understand it there's nothing particularly different in using them with results from the Jira API than any other way you'd use them to prevent other functions from modifying your data while you're waiting for a method to finish.
Based on what you've mentioned so far though, it's possible you still might be able to utilize the Jira issues macro to list issues, rather than building from scratch. That would definitely save quite a bit of effort if the display format meets your requirements. Cheers!
Thanks @Daniel Eads for you reply, I'm aware of the Jira issues macro, however the jira api calls suites better for my use-case.
I feel like this welcome-center group is not the place to ask for technical help or may be the Atlassian's developers are not paying attention to the welcome-center messages.
I'll ask again in Jira automation or confluence chat. Since my questions are still open. However thanks again to all for replying,
We can close this chat now.
Regards
Hey Khan - I do want to set your expectations. You're asking for help with javascript development (jquery promises), not about something specific to Jira or Confluence. It's possible that someone will be able to help. But general javascript development is outside the scope of Atlassian Support. Atlassian's development team is not obligated or expected to answer questions like this.
We do have a lot of smart folks on the Community here - it is entirely possible that someone will answer a question like this, perhaps in the Jira questions section. But overall I would expect that Stack Overflow might be a better resource for a general javascript question. I hope that's useful to know - I do want you to get connected with the help you need but am worried that these questions might go unanswered even in another part of Community.
All the best,
Daniel | Atlassian Support
@Khan Welcome to the Atlassian Community! We're glad you're here. 😄
Hi @Khan ,
Welcome to the community.
Could you share, please, the link to stackoverflow thread ?
At the moment, you need to evaluate a cache mechanism.
1. First step is keeping data for the time period.
2. Next step is pooler.
3. After you can start to tune, data storage mechanism LRU, LFU, LFRU, etc.
4. How exactly your queries are doing, is it possible to make in async mode? expiration mode?
5. And last question, do you really need to have that? How do you want to measure?
Cheers,
Gonchik
Hi @Gonchik Tsymzhitov ,
Thanks and here is the link to stackoverflow thread
Although, no replies yet :(
Below are answers to some of your questions:
- when async mode is enabled, then confluence server deletes all contents upon saving the page.(considering it cross-site-scripting attack, probably). Therefore, I'm working with backups all the time. Expiration time equals page load.
- all requests are based upon a date interval, which is set before the page is reloaded. (you definitely have to be logged in to Jira, before reloading the page.)
- the confluence page is used by the management to check how well a product team is performing ie. % of overall requirement coverage, number of manual or automated tests, api coverage, defects (sprint/prod) etc.
- sorry, I don't know data storage mechanism LRU, LFU, LFRU