Hard to identify the mobiles from wso2 EMM device management console - wso2

I tried to setup WSO2 EMM V2.0.1 and added few same model Android mobiles to EMM. But I feel hard to identify the mobiles, since all mobiles are showing same information in EMM device management console. I need to select the mobile and jump to specify mobile to see the details(such as IEMI) one by one. The following screen capture which is captured from my testing environment Capture from testing environment. When I search from internet, I watched a demo from youtube and found the console display is different with the my testing environment, the mobile IEMI information is showed on the device management console page and very easy to identify the mobile. The following screen capture is captured from youtube.Capture from youtube. May I know any brother have experience about this?

I had a look at code and it can be easily customized like this. Here is the diff of <EMM_HOME>/repository/deployment/server/jaggeryapps/emm/units/device-listing/public/js/device-listing.js
228c228,229
- { targets: 3, data: 'enrolmentInfo.status', className: 'fade-edge remove-padding-top' ,
---
+ { targets: 3, data: 'deviceIdentifier', className: 'fade-edge remove-padding-top'},
+ { targets: 4, data: 'enrolmentInfo.status', className: 'fade-edge remove-padding-top' ,
247,249c248,250
- { targets: 4, data: 'type' , className: 'fade-edge remove-padding-top' },
- { targets: 5, data: 'enrolmentInfo.ownership' , className: 'fade-edge remove-padding-top' },
- { targets: 6, data: 'enrolmentInfo.status' , className: 'text-right content-fill text-left-on-grid-view no-wrap' ,
---
+ { targets: 5, data: 'type' , className: 'fade-edge remove-padding-top' },
+ { targets: 6, data: 'enrolmentInfo.ownership' , className: 'fade-edge remove-padding-top' },
+ { targets: 7, data: 'enrolmentInfo.status' , className: 'text-right content-fill text-left-on-grid-view no-wrap' ,
263a265
+ var imei = data.deviceIdentifier;
278a281,285
+ $(this).attr('data-grid-label', "IMEI");
+ $(this).attr('data-search', imei);
+ $(this).attr('data-display', imei);
+ break;
+ case 4:
283c290
- case 4:
---
+ case 5:
288c295
- case 5:
---
+ case 6:
It will look like this.

I believe these are two different EMM versions. If you need to show more details you will have to customize EMM. In EMM 2.0.1 same information is already there, you need a small customization to render these information.

Related

Show mobile version of powerbi page in powerapps portals

We are trying to get a PowerBi report embedded in a Powerapps portal to show the mobile view of the report.
As described here, I’m testing with a report which only have mobile enabled pages.
This is the code I use to request the mobile version, as documented here.
let report = (await powerbi.get($('.portal-pbi-embedded')[0]))
let page = (await report.getPages()).find(i=>i.isActive);
console.log(await page.hasLayout(window['powerbi-client'].models.LayoutType.MobilePortrait))
// true
console.log(await report.updateSettings({layoutType: window['powerbi-client'].models.LayoutType.MobilePortrait}))
// {statusCode: 202, headers: {…}, body: undefined}
It appears that PowerBi can see that there is a mobile layout for the active page, and the updateSettings commands executes without errors, but nothing happens.
I also tried embedding the report again, where I request the mobile layout upfront, this gives the same behaviour (only showing the desktop version).
I recognized that the powerbi client version that powewrapps portals uses is a bit old (version 2.6.5). Even though that we are running the latest version of the portal that are available to us (9.3.2205.12).
Question 1: How do we show the mobile version of the report in the portal?
Question 2: Is there a way to update the powerbi client in the portal?
First Question
you should note the following (from docs):
after the report initial load, changing to report mobile layout is
supported only if mobile layout (portrait/landscape) has been set into
the initial embedding configuration object. Otherwise, you must first
call powerbi.reset(HTMLElement) to remove the iframe. Then, you have
to call powerbi.embed(...) using the same container with the mobile
layout setting defined on the embedded configuration object.
So basically, you are facing two options:
First Option - In your Configuration, use the following concept to control your visuals:
let models = window['powerbi-client'].models;
let embedConfig = {
type: 'report',
id: reportId,
embedUrl: 'https://app.powerbi.com/reportEmbed',
tokenType: models.TokenType.Embed,
accessToken: 'H4...rf',
settings: {
layoutType: models.LayoutType.Custom
customLayout: {
pageSize: {
type: models.PageSizeType.Custom,
width: 1600,
height: 1200
},
displayOption: models.DisplayOption.ActualSize,
pagesLayout: {
"ReportSection1" : {
defaultLayout: {
displayState: {
mode: models.VisualContainerDisplayMode.Hidden
}
},
visualsLayout: {
"VisualContainer1": {
x: 1,
y: 1,
z: 1,
width: 400,
height: 300,
displayState: {
mode: models.VisualContainerDisplayMode.Visible
}
},
"VisualContainer2": {
displayState: {
mode: models.VisualContainerDisplayMode.Visible
}
},
}
}
}
}
}
};
...
// Embed the report and display it within the div container.
let report = powerbi.embed(embedContainer, embedConfig);
The second option - use the reset method:
powerbi.reset(HTMLElement)
powerbi.embed(...)
Second Question
I'm not sure that I understood your question correctly, but if I did - take a look here (https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/update-settings)

http-mock naming conventions

I've setup a http-mock route using Ember CLI with the following command:
ember g http-mock exercise-templates
Which then sets up the file exercise-templates.js which is defined as:
module.exports = function(app) {
var express = require('express');
var exerciseTemplatesRouter = express.Router();
exerciseTemplatesRouter.get('/', function(req, res) {
res.send({
"exercise-templates":[
{id: 1, name: 'Military Press', type: 'strength', muscles: [] },
{id: 2, name: 'Situps', type: 'strength', muscles: [] },
{id: 3, name: 'Yoga', type: 'class', muscles: [] },
{id: 4, name: 'Pilattes', type: 'class', muscles: [] }
]
});
});
app.use('/api/exercise-templates', exerciseTemplatesRouter);
};
So, when I then point the browser to http://localhost:4200/api/exercise-templates I was expecting to get my static JSON response defined above. Instead I get a 404. Then to my surprise I typed in http://localhost:4200/api/exercise-template (aka, without the 's') and it worked. Huh? Makes me wonder what is going on ... I mean I'm no Express guru but doesn't:
app.use('/api/exercise-templates', exerciseTemplatesRouter);
imply that the plural naming convention will be used?
Ok well the answer turns out to be ... turn off "ember serve" and restart. Not sure why it wasn't refreshing but apparently the mocking does not always (ever?) gracefully refresh when updated. In any event, my expectation about "naming convention" appears to be the naming convention so I can happily report that all is right in the world again.

How to hit non REST endpoints with Ember Data 1.0 beta

My API is mostly restful except I have a /search endpoint on some resources. I'm using the DS.ActiveModelAdapter and DS.ActiveModelSerializer and everything is great.
My current implementation for search is somewhat like this:
makeAPICall: ->
#set('loading', true)
states = #get('selectedStates')
statesString = states.join(',')
query = #get('searchParam')
url = "/api/v1/organizations/search?#{statesString}&query=#{query}"
$.get(url).then (data) =>
#get('store').pushPayload(data)
# TODO this needs to go through the adapter.
orgs = data.organizations.map (org) =>
#store.find('organization', org.id)
#set('organizations', orgs)
#set('loading', false)
The problem is that I don't know how to do all the normalization/camelization that happens in the adapter in this case. Because the template relies on the #get('organizations') in this case, some underscored attributes don't show up.
What is the correct way to implement this?
The pushPayload is suposed to do the normalization/camelization but needs to know the type you are pushing, from the docs... but is in the v1.0.0-beta.3 version
var pushData = {
posts: [
{id: 1, post_title: "Great post", comment_ids: [2]}
],
comments: [
{id: 2, comment_body: "Insightful comment"}
]
}
store.pushPayload('post', pushData);
In your case the call should be
#get('store').pushPayload('organization', data)
And the data json an array of organizations
organizations:[
{id:1,...},
{id:2,...},
{id:3,...}
]

Traversing a complex RESTful output (version 12)

I'm getting following (simplified) output from a RESTful API:
{products: [{
product: {
id: 1, name: "T-Shirt red"
},
images: [{
id: 1, size: 'm', url: 'http://db.co/t-shirt-red_m.jpg'
}, {
id: 2, size: 'xl', url: 'http://db.co/t-shirt-red_xl.jpg'
}]
}, {
product: {
id: 2, name: "T-Shirt blue"
},
images: [{
id: 3, size: 'm', url: 'http://db.co/t-shirt-blue_m.jpg'
}, {
id: 4, size: 'xl', url: 'http://db.co/t-shirt-blue_xl.jpg'
}]
}]}
Using Ember version 12, how should the declaration of the Product model looks like and how can I traverse the results? Haven't been able to find any example in that direction.
Following to access the data doesn't work (I just can't find the right syntax):
var products = App.Product.find(); // seems to work
var prodNames = products.getEach('product.name'); // doesn't work
var secondProd = products.getObject(1).get('name'); // doesn't work
Thanks a lot in advance!
claudio.
DS.hasMany and some options for the REST adapter may help you.
I've used a similar setup with MongoDB embedded models. I've attached some examples below.
I didn't want to try to save to the embedded array, so I've used embedded:load, but you can use embedded: 'always' to persist the total object back to the server (although it didn't work quite as I expected) with 'always' if you save the parent object.
DS.RESTAdapter.map 'App.Check',
line_items: { embedded: 'load' }
parties: { embedded: 'load' }
App.Check = DS.Model.extend
description: DS.attr("string")
modified_date: DS.attr("date")
parties: DS.hasMany('App.Party')
App.Party = DS.Model.extend
name: DS.attr("string")
check: DS.belongsTo('App.Party')
You can then reference the item. In a view, I've accessed it as below from a ArrayController where the content is set to an instance of DS.Check.
{{#each party in content.parties }}

Google Visualization API - Org Chart Layout

Using the Org Chart in the Google Visualization API, is there a way to flip the chart to a vertical layout instead of horizontal.
Unfortunately no. It is not possible at the moment.
This feature has been requested in Issue #47 on the Google Visualization API issue tracker.
You may want to star the issue to let Google know about your interest in this feature.
GetOrgChart jQuery widget has oeriantation option to show vertical org chart
Orientation of the GetOrgChart widget.
getOrgChart.RO_TOP
getOrgChart.RO_BOTTOM
getOrgChart.RO_RIGHT
getOrgChart.RO_LEFT
Default value: getOrgChart.RO_TOP
Code examples:
$("#people").getOrgChart({
orientation: getOrgChart.RO_LEFT,
dataSource: [
{ id: 1, parentId: null, Name: "Amber McKenzie"},
{ id: 2, parentId: 1, Name: "Ava Field"},
{ id: 3, parentId: 1, Name: "Evie Johnson"}]
});
JSFIDDLE Demo