I want to build my own macro with a configurable search on a db view. To do this i´m searching for example code or a tutorial to make a configurable macro.
It could/should look like this:
AWLK-Macro.PNG
key | Servename | description | state | typ |
As you see in the picture in the end it should shown like the JIRA issues:
Unbenannt2.PNG
Any suggestions on this? Any good ideas what i have to consider? Or does someone has experience with this? Do you know a tutorial for this?
Best regards
J.D.
Community moderators have prevented the ability to post new answers.
There are several tutorials for creating confluence macros here: https://developer.atlassian.com/display/CONFDEV/Macro+Tutorials+for+Confluence
https://developer.atlassian.com/display/CONFDEV/Writing+a+Macro+Using+JSON This would be the tut i was looking for but sadly it doesnt work on confluence 5.6.4. Thats why im asking if there is a working tut.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is not working exactly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
at the end of the tut, after i run atlas-run and when i insert the macro i doesnt get displayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are at step 6? And you don't see the text? Can you check the confluence version in your pom.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
im at step 9
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<properties> <confluence.version>5.6.4</confluence.version> <confluence.data.version>5.6.4</confluence.data.version> <amps.version>5.0.4</amps.version> <plugin.testrunner.version>1.2.0</plugin.testrunner.version> </properties>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, then the problem seems to be in the javascript... what is your browser-console saying? Besides that, one idea.... replace all jQuery-calls with $(... with AJS.$(....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
replaced - does not work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) Welcome+to+the+Confluence+Demonstration+Space:1 DEPRECATED: jquery.autocomplete.js - See https://ecosystem.atlassian.net/browse/AUI-393 batch.js:9504 Creating iframes batch.js:9504 2DEPRECATED: getArrowPath - See https://ecosystem.atlassian.net/browse/AUI-1362 batch.js:9504
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you call initExampleMacro(); in the browser console? and what happens when you do it? Can you inspect your dom and can you find this snipet there? <div class="exampleMacro"> <fieldset class="parameters hidden"> <input type="hidden" class="dayDates" value="$dayDateJson"> </fieldset> </div> Which value has the hidden field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it looks all like the code from the tut. ncaught ReferenceError: initExampleMacro is not defined VM287:2(anonymous function) VM287:2InjectedScript._evaluateOn VM282:732InjectedScript._evaluateAndWrap VM282:665InjectedScript.evaluate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
call initExampleMacro Uncaught SyntaxError: Unexpected identifiermessage: "Unexpected identifier"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
but you do not need to use json here, if the rest of the tut works, try to play a little bit with it to get a feeling for the macro ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i will try :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The new Question if have: https://answers.atlassian.com/questions/10414987/ho-can-i-set-a-value-for-drop-down-menu-in-the-macro-browser If you are interested, i would appreciate your help. Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.