Documentation for ConfiDoc plugin for Confluence
ConfiDoc TableView confidoc-table | Macro to visualize your REST service content (or RSS, CSV, XML) as table, with filtering and data sorting/ordering Name of the service to be used | serviceId | Services are defined by the Confluence administrator using the plugin's configuration screen |
---|
Root element to use | root | Additional filters can be to the returned JSON data using field names as inputs |
---|
Sorting/Ordering | sort | See examples below |
---|
Filter to apply on returned data | filter | See examples below |
---|
Cache resources locally | useCache | Request results can be stored locally in the Confluence cache in order to improve page loading times and to reduce the number of requests to external servers; default local cache duration is 30 minutes |
---|
Show lookup dialog for service | enableLookup | Users will be able to set own parameters for configured service request |
---|
Labels to use for lookup parameters | lookupLabels | Key-values, separated by & (as in URL), where key - is parameter name, and value is the text you want to use as label |
---|
Caption for action button in lookup dialog | lookupBtnLabel | |
---|
|
ConfiDoc ListView confidoc-list | Macro to visualize your REST service content (or RSS, CSV, XML) in WYSIWYG view (also supports filtering and data sorting/ordering) Name of the service to use | serviceId | Services are defined by Confluence administrators using ConfiDoc plugin configuration |
---|
Root element to use | root | Use it when you need an additional filter over returned JSON. Accepts field names as an input. |
---|
Sorting/Ordering | sort | See examples below |
---|
Filter to apply on returned data | filter | See examples below |
---|
Cache resources locally (30 minutes, by default) | useCache | You requests are cached locally, in Confluence cache. Useful when you want to improve page loading times and reduce number of requests to external servers |
---|
Show lookup dialog for service | enableLookup | Users will be able to set own parameters for configured service request |
---|
Labels to use for lookup parameters | lookupLabels | Key-values, separated by & (as in URL), where key - is parameter name, and value is the text you want to use as label |
---|
Caption for action button in lookup dialog | lookupBtnLabel | |
---|
|
ConfiDoc CardView confidoc-card | Macro to visualize your REST service content (or RSS, CSV, XML) as card (vertical table), with filtering and data sorting/ordering Name of the service to use | serviceId | Services are defined by Confluence administrators using ConfiDoc plugin configuration |
---|
Root element to use | root | Use it when you need an additional filter over returned JSON. Accepts field names as an input. |
---|
Sorting/Ordering | sort | See examples below |
---|
Filter to apply on returned data | filter | See examples below |
---|
Cache resources locally (30 minutes, by default) | useCache | You requests are cached locally, in Confluence cache. Useful when you want to improve page loading times and reduce number of requests to external servers |
---|
Show lookup dialog for service | enableLookup | Users will be able to set own parameters for configured service request |
---|
Labels to use for lookup parameters | lookupLabels | Key-values, separated by & (as in URL), where key - is parameter name, and value is the text you want to use as label |
---|
Caption for action button in lookup dialog | lookupBtnLabel | |
---|
|
ConfiDoc Field confidoc-field | Macro to define a field to show within ConfiDoc TableView or ConfiDoc ListView macros. Field name | name | Name of the field to show (based on the data returned by ConfiDoc TableView or ConfiDoc ListView macros) |
---|
Field label | label | Label to use, when showing this field inside the table |
---|
Choose type for the field | type | There is a set of field types supported:Or 'as-is' (blank), so the value will be shown without any transformations, but as-is |
---|
Input format | inputFormat | Useful when you have a date values you need to transform in more readable format |
---|
Output format | outputFormat | Output format takes what was prepared by 'Input format' and tries to apply the formatting rules given on this value |
---|
CSS to apply on field value | css | CSS to apply on a rendered field |
---|
Visible only to groups/users | restrictions | Comma-separated list of group names/usernames this field is visible to. Leave blank if there are no restrictions |
---|
|
ConfiDoc Excerpt confidoc-excerpt | Macro to include HTML or binary content from any webserver inside your Confluence page Name of the service to use | serviceId | Services are defined by Confluence administrators using ConfiDoc plugin configuration |
---|
Selector | root | CSS-like selector, but limited to a form: element attribute="value". To select elements by name - just give a tag name. Example: div - will select all the divs from the page To select all div elements with 'myclass' class: div class="myclass" |
---|
Download and cache resources (images) locally | downloadResources | Downloads external resources locally, and adds them as attachments. |
---|
Cache resources locally (30 minutes, by default) | useCache | You requests are cached locally, in Confluence cache. Useful when you want to improve page loading times and reduce number of requests to external servers |
---|
Content Type | contentType | Will force to use the given content type |
---|
Custom CSS styles to apply on rendered element | css | Custom CSS styles to apply on rendered element |
---|
Include as | type | |
---|
Caption for link, when loaded as binary | downloadBtnLabel | When the content to be loaded is binary, a download link will be rendered. This parameter set''s it''s caption |
---|
|
ConfiDoc Excerpt Anchor confidoc-excerpt-anchor | Macro helps you to group some content inside a block and easily reference later by ConfiDoc Excerpt macro Alphanumeric AnchorID (no spaces) | anchorId | You will be able to reference it from ConfiDoc Excerpt macro using ''div id="AnchorID"'' selector |
---|
|
ConfiDoc Show-For (IF) Macro confidoc-show-for | Macro shows included content only for given users/user groups Content is visible only to | restrictions | Comma-separated list of usergroup names/usernames |
---|
|
ConfiDoc Globals confidoc-globals | Convenient way to store and show global variables in Confluence Variable name | vars | Variable name |
---|
|
CSS Rules for ConfiDoc Fields confidoc-field-css | Helper macro to use use when you want to show fields visually differently, based on their values Field value or expression to match | condition | You can use values or expressions, similar to filters, Filters are very similar in functionality to ConfiForms Filters (the other plugin developed by Vertuna LLC) |
---|
Field name | fieldName | Name of the field this rule should be applied on, if left empty then rule is applied on the row |
---|
CSS to apply when condition is met | css | CSS to apply when condition is met |
---|
|
Using filters
Uses Lucene like syntax for expressions, supports grouping using brackets (at the moment no support for inner brackets). Supports filtering for expressions that start with a wild-card. Supports filtering per field as well as free text search (filter to match against any field value).
Operators AND and OR are case-sensitive!
Supports not notation, to filter records that do not match the given filter: '!' is used for that. Example: !f1:[empty] - will look for records where f1 field value is not empty (has some value)
Supports simple ariphmetic operations on dates (to add or substract days from today's date). See examples below
Valid example: (f1:*success AND f2:>[yesterday]) OR (f3:accepted) - matches records with field values having 'success' and where f2 field value is after yesterday or where f3 filed value is equals to 'accepted'
Valid example: (f1:*success AND f2:>[today]-1) OR (!f3:[empty]) - matches records with field values having 'success' and where f2 field value is after yesterday or where f3 field value is not empty
Invalid example: (f1:*success AND (f2:>[yesterday] OR (f3:accepted)). As ConfiDoc does not support inner brackets in expressions (yet)
Reserved words to use in expressions:
[empty] | To match empty values for particular field. Example: field1:[empty] - will match records where field1 is empty (does not have a value, but the form defines this field) |
[now] | Current time and date, useful with '<' and '>' for comparing with dates stored. Example: someDateField:<[now] - will match records where field 'someDateField' has value which is in the past compared to now (current time) |
[today] | Same as [now], but without time |
[tomorrow] | To compare against tomorrow's date. Also something like [today]+1 could be used instead |
[yesterday] | To compare against yesterday's date. Also something like [today]-1 could be used instead |
'<' and '>' | Can be used together with date and datetime fields, as well as to compare values for numeric fields stored |
! | To reverse the filter condition. Example: !field1:[empty] - will find records that have 'field1' field filled |
Some examples:
- field1:[today]-5 - assuming field1 is of type date (or datetime) this filter will return records where field1 value is not older than 5 days from now
- field1:[today]+10 - assuming field1 is of type date (or datetime) this filter will return records where field1 value is not after 10 days from now
Using sorting and limiting the number of records returned
Supports ASC and DESC directions, syntax is similar to SQL syntax, and the ordering rules must be coma separated.
Order directions ASC and DESC are case-sensitive!
To limit the number of records returned a LIMIT operator is used.
Example: f1 ASC, f2 DESC - will sort the dataset by f1 field values in ASC order and by f2 in DESC order
Example2: f1 ASC, f2 DESC LIMIT 2 - will sort the dataset by f1 field values in ASC order and by f2 in DESC order and limit the number of records returned to 2
Example3: LIMIT 2 - will limit the number of records returned to 2