mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix formatting
This commit is contained in:
parent
fb52c5845d
commit
2a006684cc
@ -19,14 +19,15 @@
|
||||
function onRequest(context) {
|
||||
var utility = require("/app/modules/utility.js").utility;
|
||||
context.handlebars.registerHelper('equal', function (lvalue, rvalue, options) {
|
||||
if (arguments.length < 3)
|
||||
throw new Error("Handlebars Helper equal needs 2 parameters");
|
||||
if (lvalue != rvalue) {
|
||||
return options.inverse(this);
|
||||
} else {
|
||||
return options.fn(this);
|
||||
}
|
||||
});
|
||||
if (arguments.length < 3) {
|
||||
throw new Error("Handlebars Helper equal needs 2 parameters");
|
||||
}
|
||||
if (lvalue != rvalue) {
|
||||
return options.inverse(this);
|
||||
} else {
|
||||
return options.fn(this);
|
||||
}
|
||||
});
|
||||
var groupName = request.getParameter("groupName");
|
||||
var groupId = request.getParameter("groupId");
|
||||
var deviceName = request.getParameter("deviceName");
|
||||
@ -38,7 +39,7 @@ function onRequest(context) {
|
||||
} else {
|
||||
title = "Device " + title;
|
||||
}
|
||||
return {
|
||||
return {
|
||||
"deviceAnalyticsViewUnitName": utility.getTenantedDeviceUnitName(deviceType, "analytics-view"),
|
||||
"deviceType": deviceType,
|
||||
"title": title,
|
||||
@ -46,5 +47,5 @@ function onRequest(context) {
|
||||
"groupId": groupId,
|
||||
"deviceName": deviceName,
|
||||
"deviceId": deviceId
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.0",
|
||||
"uri": "/device/{deviceType}/analytics",
|
||||
"layout": "cdmf.layout.default"
|
||||
"layout": "cdmf.layout.default"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user