Advanced Codeblocks Remote
The Advanced Codeblocks Remote is used for inserting the config-block directly in Confluence but the template from any source.
Define the title of your codebox.
Expand first codeblock
Select the first codeblock of your codebox expanded.
URL to remote file
Enter the URL of your template.
This is optional. If you use Basic-Auth for your remote file enter your username.
This is optional. If you use Basic-Auth for your remote file enter your password.
Select your language from over 150 programming languages or let your language detect automatically.
Select your theme from 4 themes.
The user interface on your Confluence page will look like the example below. You can collapse and expand the codeblocks at any time to save space or to show the code when you need it.
The Download Feature provides you different options to directly download your configuration in the setting you need. You only have to click the respective Button. Don't forget to enable Show download links in your parameters to use this function.
Download codeblock: download the code of your template with replaced variables of the specific codeblock. The link is located on the right side of the header of each codeblock.
Download raw: download the raw code of your template with your defined variables accordingly without replacements. The link is located in the menu in the upper right corner of the outer box.
Download xml: download a xml list of all download links contained in your configuration. The link is located in the menu in the upper right corner of the outer box.
You can also use the Download Feature to download configs directly from Confluence in your automated provisioning scripts with e.g.
wget via HTTP REST API. This option is broadly explained in the basics.
Note for using the Download Feature
By changing the
section namethe download link changes.
By moving the macro to another page the download link changes.
The data is internally stored as content properties of the Confluence page.
Another menu item of the Advanced Codeblocks Remote is the refresh cache button including a date. Everytime you make changes in your config-block or in your remote template, please refresh the cache to see the latest changes. The same applies for downloading. With the aid of the date you can see when the last refresh has happened.
Beware of caching
Even if you make changes in the macro body, the cache is not cleared. The cache will only renew once you click the refresh cache button.
Read-only mode (Data Center)
Since Advanced Codeblocks v2.5.0 and for Confluence Data Center versions higher or equal 6.10 the Read-only mode for Confluence Data Center is supported.
When the Read-only mode is activated, the Advanced Codeblocks Remote will render with disabled download features and cache, since they would perform a write operation on the page properties. The user will see the message read-only mode is active on top of the menu.
If you for some reason call the refresh cache URL during enabled Read-only mode you will see this page.
[server1] backup.from.dir = /var/lib backup.to.dir = /media/usb1 [server2] backup.from.dir = /opt backup.to.dir = /media/usb2