Community
Does Onify support Bootstrap for forms and dashboards?
Is it possible to use Bootstrap components in forms and dashboards?
Posted by Robert Lundsten over 2 years ago
Workspace query view Tag limitations
I noticed the Tag selection in workspace search only show max 20 tag results in the Tag selection section. If I write missing tag into search field it appears into the Tag selection. Is there ability to adjust the limitation or can I somehow select which tags would be visible and which tags would be secondary and not so important to be visible?
Posted by Markus Kalske over 2 years ago
Open custom modal in a form without redirecting to it
I have tried to figureout howto open modal in a form in a such way as it works in workspace item listing.
Posted by Markus Kalske over 2 years ago
How do I run onifyElevatedApiRequest from a script task?
I am trying to run `onifyElevatedApiRequest` from a script task using users token but it does not work. Is it possible to run from a script task?
This is what I am trying to do:
```javascript
let onifyHeaders = {
'Content-Type': 'application/json',
'Authorization': environment.settings.authorization
}
var resourceOptions = {
url: `admin/resources/file?stream=false&path=${templatePath}`,
headers: onifyHeaders
}
let result = await environment.services.onifyElevatedApiRequest(resourceOptions);
```
Posted by Robert Lundsten over 2 years ago
A prefix for a textField element
Hey,
I created a custom text element for the form with a fixed prefix that signals the user how the should approach the field in question. This could be a nifty feature to implement into the textField elements for example.
I was asked to share the solution, so here goes.
Not sure if this is the best way to do it, but at least it works:
<label for="computerName">VDI dekstop name
<span class="required-label">*</span>
</label>
<div class="input-group">
<span class="input-group-addon">VDI-</span>
<div class="form-group" ng-class ="{'has-error': customForm.computerName.$invalid && customFrom.computerName.$dirty}">
<input id="computerName" class="form-control" maxlength="11" pattern="^([a-zA-Z0-9-]{1,11})$" type="textField" value="" data-value="" required="" data-name="computerName" name="computerName" ng-init="initElementValue('computerName','')" ng-model="formData['computerName']" >
</div>
</div>
<div class="help-block">
<i>The maxinum length of the name is 11 characters. You can include letters (a-z), numbers or a dash ('-').</i>
</div>
The prefix can also be transformed into a "suffix" by placing the "<span class="input-group-addon">*your text here*</span>" block after the input tag.
Posted by Eetu Tarkamo almost 3 years ago
Item card and nested json array
Item card cannot show nicely nested array details. My colleague had information that he wanted to show to the end user. I suggested to create a more details button to the item and make a form that would show the more details. This solution we ended up.
I noticed that this solution could be handy for others also who have nested arrays in their item.attribute.nestedarrayjsondata, maybe Onify support want to put this solution to the forms section how to show static nested json data from item card.
block append formConfig
-var box = form.items[0]
if(mailbox.attribute.nestedarraygroup)
-var groupsarray = JSON.parse(box.attribute.nestedarraygroup)
else
-var groupsarray = 'none'
+formOptions({
formDescription: box.attribute.displayname,
pageTitle: 'Box details',
formTitle: box.name,
hideSubmitButton: true,
backButtonName: t('back'),
})
block formContent
if(groupsarray.groupname)
table(style='width:100%',border='0')
tr
th(style='width:40%') <b>Resource group:</b>
th <b>Nested groups:</b>
tr
td #{groupsarray.groupname}
td #{groupsarray.groups}
Posted by Markus Kalske almost 3 years ago
How do I add a color picker in a form?
I want to add a color picker in a form. How do I do that?
Posted by Robert Lundsten almost 3 years ago
Format string value to currency?
Is it possible to format a string in **itemTemplates** to a currency format? etc `29529.7975` to `29 529,80`?
Similar to `{{item.createdate | dateFormat : 'YYYY-MM-DD HH:mm'}}`
Posted by Patrick about 3 years ago
Does Onify support Prometheus?
I want to monitor Onify using Prometheus (open-source systems monitoring and alerting platform). Is this supported?
Posted by Robert Lundsten about 3 years ago