• MattFox

    I trust that you've added the userModule in the UI Settings otherwise the component won't show.

    1. once under page editor you can add them by typing them in.
      In this case:
    <my-component name="'Foxtrot'"></mycomponent>

    I believe you can also drag and drop them in the dashboard editor from the user components drop down.

    @wallobee said in User component menu not showing up in dashboard designer:

    How do I define the components/directives in my user module?
    I copied the example from the tutorial

    How do i work around and add them manually to the page?

    If by manually you mean with your own dashboard page templates you'll need to move away from using the public file store and break everything out into files. If you've looked at the dialogue component I wrote that you commented on you'll see how it's all laid out.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • MattFox

    Our beloved search button at the top right of this site to left of the notification bell.
    Also you can scroll through post history of a user under their profile.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • MattFox

    Possibly if you split/explode the string (alphanumeric point value) by the separators into an array then convert each value to a numeric.... Then you can apply your mathematical analysis...

    posted in User help read more
  • MattFox

    Thanks Phil, I'll keep these in mind also

    posted in User help read more
  • MattFox

    Yep, please let me know how you get on, the feedback is always welcome.

    posted in User help read more
  • MattFox

    Hi Ceremona, welcome to the forum!

    If you look at the '?' there is a full blown user help for how to utilise these sources.

    As can be read, the url you need to post to is http://[mangodomain|localhost]/httpds

    Anyway, you see that set point url I'm pointing to?
    EDIT: Sorry I meant to mean device white list, I was pointing at the wrong textbox!
    You set that as your reference so it will land (the data) in this datasource.
    the parameter being __device

    Here's a snippet:

    var _URL="http://ipAddressHere/httpds?__device=DEMO&QUANTUMM1="+pt*.value+'@'+pt*.time;

    Where in this case QUANTUMM1 is my point identifier in the data point in the data source itself.

    The format as you can see in the code (1 of the allowed formats at least, read the datasource help for the others) is "+pt*.value+'@'+pt*.time
    So value first, separated by an '@' then a timestamp. NOTE This format I believe is the publisher set format for the set format option of this datasource so you can use a mango publisher to flick data via an http publisher to a mango http receiver datasource.

    So as a recap:

    params: __device=[setPointUrl]

    url: mangoUrl/httpds

    You can test by clicking on the 'Listen for HTTP data' button to ascertain if your values are coming through.
    Any further confusion, we're all here to help


    posted in User help read more
  • MattFox

    Sorry just realised the URl ain't working. Fixing it now..
    done, sorry spent some time trying to make it look at least a little bit pretty!

    posted in User help read more
  • MattFox

    Alright! As promised, how to use what you need to get data from a specific filestore.
    I've utilised/hacked some of Jared's code (Sorry Jared!) to make a quicker turnaround.

    1. the /opt/mango/overrides/modules/mangoUI/web/dev/controllers/userFileStore.js component
    Author: Matt 'Fox' Fox
    Desc: quick file list generator of anchor links in angular js for @psysak
    define(['angular', 'require'], function(angular, require) {
    function UserFilesController($http,maFileStore)
    	var ctrl = this;
    	ctrl.fileStoreName = 'default';
    	const fileStoreUrl = '/rest/v2/file-stores';
    	const fileStoreUrlSplit = fileStoreUrl.split('/');
    	this.$onChanges = function(e)
    		if(e.fileStoreName && e.fileStoreName.currentValue!==undefined)
    			ctrl.fileStoreName = e.fileStoreName.currentValue.split('/');
    	var toUrl = function(isDirectory) {
        	const parts = ctrl.fileStoreName.map(function(part) {
        		return encodeURIComponent(part);
        	let url = fileStoreUrl + '/' + parts.join('/');
        	if (isDirectory) {
        		url += '/';
        	return url;
    	var getFileList = function(){
    		if (ctrl.fileStoreName.length < 1) {
    			throw new Error('Must specify the file store name');
    		const folderUrl = toUrl(true);
    		return $http({
    			method: 'GET',
    			url: folderUrl
    		}).then(function(response) {
    			ctrl.fileStoreList=response.data.map(function(file) {
    				// return new FileStoreFile(ctrl.fileStoreName[0], file);
    				return new maFileStore.newFileStoreFile(ctrl.fileStoreName[0], file);
    		UserFilesController.$inject = ['$http','maFileStore'];
    	return	{
            bindings: {
            scope: {},
            templateUrl: "/modules/mangoUI/web/dev/views/userFileStore.html",
            // you can inject services into the controller
    1. /opt/mango/overrides/modules/mangoUI/web/dev/views/userFileStore.html
    <a ng-repeat="file in $ctrl.fileStoreList" class="md-icon-button md-button md-mangoLight-theme md-ink-ripple"  style="display:inline-block;min-width:300px;"  ng-if="!file.directory" download="" ng-href="file.url" ng-click="$ctrl.cancelClick($event)" aria-label="" href="{{file.url}}">
    		        		<md-icon class="md-mangoLight-theme material-icons" style="display:inline-block" role="img" aria-label="file_download">file_download</md-icon>
    <div class="md-ripple-container"></div></a>
    1. /opt/mango/overrides/modules/mangoUI/web/dev/userModule.js
    define(['angular', 'require','./controllers/userFileStore.js'], function(angular, require,userFileStore)
    var userModule = angular.module('userModule', ['maUiApp']);
    try {
    userModule.component('userFileStore', userFileStore);

    Oops, forgot the component tag:

    <user-file-store file-store-name="'default'"></user-file-store>

    Let me know if you need further help.


    posted in User help read more
  • MattFox

    ok cool, that's easy enough, So you're going to restrict them to a given filestore directory?
    If so, let's get this ball rollin!

    posted in User help read more