In Oomnitza, you can link each record, such as an asset record, to an external website.
About this tutorial
You can link all records to the same website. Alternatively, you can customize the URL so that the link opens an URL that is associated with a specific record. For example, you have created an asset for each AWS EC2 instance you manage in Oomnitza. When you view the asset record in Oomnitza, you want to open the AWS EC2 instance associated with the Oomnitza record so that you can complete an action such as relaunching the AWS EC2 instance. To do this, you use the Jinja templating language.
Scenario
Let’s say you created an AWS EC2 integration and mapped the EC2 instance IDs to Oomnitza. Now that the EC2 asset records are in Oomnitza, you want to be able to access the EC2 console for each instance directly from the asset record. For example, you might want to restart, stop, launch, or adjust the security settings of an EC2 instance.
Procedure
- Click a record, such as an asset record.
- Click the Actions menu
.
- Click Screen Builder
.
- Click+ Add Link.
- Enter a label, for example, Open in AWS.
- Use the Jinja2 templating language to construct the link by enclosing the field name in double curly braces. For example,
https://us-east-1.console.aws.amazon.com/ec2/home?InstanceDetails:instanceId={{aws_instance_id}}
. This will generate the link based on the asset record that is clicked. - Test the link to ensure it directs you to the correct external website.
Result
Now when you click the link in an asset record, it opens the associated EC2 instance in AWS.
Tip
To edit the value of a field, use Jinja's string manipulation methods. For example, if you want to remove a leading string from a PO number field, you can use {{po_number.strip('LX')}}
in your URL. This will ensure that the URL points to the correct page while excluding unnecessary information.
Comments
0 comments
Please sign in to leave a comment.