Inheritance
- properties at platform level can be inherited at module and instance level
- properties at module level can be overload at instance level
Now that you know handling templates (if not, refer to this section), and applications (if not, refer to this section), it's finally time to valuate properties for your application.
You can valuate properties at three levels :
You will see in the table the several entry points to access to each level for both mode (tree and block) :
Operation | Tree mode | Block mode |
---|---|---|
Platform level | ||
Module level | ||
Instance level |
If you want to apply the same values for several module properties, you can add some platform properties (you will also see "global properties").
This level is not mandatory, however it's very convenient not to duplicate data.
Mode | Steps |
---|---|
Tree mode |
|
Block mode |
|
Mode | Steps |
---|---|
Tree mode |
|
Block mode |
|
Here we are ! let's fulfill those properties !
If you click on your module "module-test" when you edit your platform, you can valuate properties for your environment :
You can edit iterable property in addition to simple property (click on link "Iterable properties" to display it) :
If you generate file or preview instance, you will finally obtain this file :
<html>
<body>
<ul>
<li>brand_1 has bar code : 9999999 </li>
<li>brand_2 has bar code : 8888888 </li>
</ul>
</body>
</html>
If you created some global properties, you can use it at module or instance level.
new_global_property={{new_global_property}}
and if you added a global property as in Add global properties section, you will see this when you edit the module properties :
In annotation section you learned how to add annotations in your template. It's time to see how Hesperides handles it when you edit your module properties :
Annotation | Display |
---|---|
required_key={{value1|@required}} |
If you do not fulfill the value, you won't be able to save your properties |
key_with_comment={{value2 |@comment "some comment to explain the key"}} It's also possible to add comments with the short syntax key_with_comment={{value2|some comment to explain the key}} |
You can see the comment on placeholder if property is empty, or in tooltip when you hover the value input |
key_with_default_value={{ value3 |@default "false" }} |
You can see the default vaule on placeholder if property is empty, or in tooltip when you hover the value input |
key_password={{value4|@password}} |
If you are a non-authorized user and if you display a production platform, you will only see stars |
key_with_pattern={{value5|@pattern "[a-z]*"}} |
If you do not fulfill a value that consider the pattern, you won't be able to save your properties. You can see the pattern on placeholder if property is empty, or in tooltip when you hover the value input |
When you're changing a module's version, it is possible to copy over its properties to the new version. You just have to check "Copy valuated properties" switch button.
If you forgot to check this option, don't panic, your values are not lost. You just have to revert back to the previous version - e.g. from 2 to 1 - without checking the "Copy valuated properties" switch button. You can now perform the version upgrade operation again with the option checked.
Hespérides can revert back a deployed module valuations up to 2 versions in the past.
If you have a property at module level, but you want to specify different values according to instance, you can again use mustache.
First, you have to set your property value at module level like this :If you set the value of your module property with a key already use at platform level, Hesperides will not specify it at instance level !
At instance level, you are able to merge templates with valuations and display a preview of it. All you have to do is to hover the name of the instance you want to preview and click on "eye" icon :
Whether tree or block mode, you access to the above modal :
Local changes can be seens has a way to locally save your work. It allows you to pause and resume later on your work, but also act as a failover system in case of a failure in the saving process(a local save is automatically done before each save). Allowing you to recover your changes without loosing anything.
At the time being the local change system only works for simple properties, iterables properties aren't supporter yet, but rest assured their time will come as well.
To get started with local change let's assuming you are editing a module
Type in or out any changes you want and then press LOCAL button to save locally
When local changes are saved, you can see a message saying that local change has been detected, and you can see them by following the orange color code.
We will continue with the previous states of Saving part. The requirement is to have local changes, otherwise the cleaning button won't appear. So let's get to business, the first things to know is that, right now, when cleaning up local changes, it clean all your local changes, you cannot specify which one you want to delete or keep. It should be available in the next release.
Hit the LOCAL button associated with the trash icon to get started
A confirmation pops in for you to confirm that you really want to delete all your local changes. Obviously, if you had done changes in another module, it won't delete it.
Your local changes has different way of being deleted, pay attention to understand how it work :
To explain a bit more about the TTL system, it works with the platform version_id. Each time a user perform a modification against a platform it increase its version_id. A default TTL of 50 is applied, meaning that when your change will have a difference bigger than 50 they will be automatically removed. The next release will introduce message warning to remind you that your local changes are close to their expiration time
Hesperides handles contextual variables that can be used directly in your templates or valuations
{{hesperides.application.name}}
{{hesperides.application.version}}
{{hesperides.platform.name}}
{{hesperides.module.name}}
{{hesperides.module.version}}
{{hesperides.module.path}}
{{hesperides.module.path.0}}
{{hesperides.module.path.1}}
etc ...
{{hesperides.instance.name}}
At three levels, you can do some things to make nice your navigation
Playing with this switch, you can sort ascending or descending property names :
Clicking on the button, you can clean the properties that have been deleted previously (see deleted properties section) :
When you delete a property from a template, it's not deleted in platform. That's why you are able to display deleted properties (see model/valuation).