• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. guetteluis

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 6
    • Best 1
    • Controversial 0
    • Groups 0

    guetteluis

    @guetteluis

    2
    Reputation
    323
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    guetteluis Unfollow Follow

    Best posts made by guetteluis

    • RE: Login URl

      Hey @mattfox,

      Yes, you can add custom login page. Probably, you will need to create a custom AngularJS component, depending on how much you want to customize it. Here is an example:

      HTML

      <div class="login-container" flex="100" layout="row" layout-wrap>
      
          <div flex="100" flex-gt-sm="50">
              <img class="rc-login-img" src="/rest/v2/file-stores/public/img/school-login.jpg" alt="Login">
          </div>
          
          <div flex="100" flex-gt-sm="50" layout="row" layout-wrap layout-align="center center" md-colors="::{background: 'blue-800'}">
              <div flex="100" layout="row" layout-wrap layout-align="center center">
                  <img class="mt-10" src="../../resources/svg/logo.svg" alt="Logo" height="70">
              </div>
      
              <div flex="100" class="mt-10" layout="row" layout-wrap layout-align="center center">
                  <md-card flex="100" flex-gt-sm="60" flex-gt-md="50">
                      <md-card-title>
                          <md-card-title-text>
                              <span class="md-headline">Login</span>
                          </md-card-title-text>
                      </md-card-title>
                      <md-card-content layout="column">
                          <ma-login on-success="$ctrl.onSuccess($user, $state)">
                              <ma-logged-in class="already-logged-in" ng-if="$ctrl.User.current && $ctrl.User.current.username !== 'guest'">
                                  <span ma-tr="login.aleadyLoggedIn" ma-tr-args="[$ctrl.User.current.username]"></span>
                                  <a ui-sref="actions">Go to Action Submission</a>
                              </ma-logged-in>
      
                              <a ui-sref="customRegister" tabindex="5" ma-tr="login.emailVerification.registerUser"></a>
                              <a ui-sref="forgotPassword({username: username})" tabindex="4" ma-tr="login.forgotYourPassword"></a>
                          </ma-login>
                      </md-card-content>
                  </md-card>
              </div>
          </div>
      </div>
      

      Javascript

      define(['angular', 'require'], function(angular, require) {
          'use strict';
          
      customLogin.$inject = ['maUser', '$injector'];
      function customLogin(maUser, $injector) {
      
          this.maUiLoginRedirector = $injector.has('maUiLoginRedirector') && $injector.get('maUiLoginRedirector');
      
          this.onSuccess = (user, state) => {
              if (state.params.redirectTo) {
                  state.go(state.params.redirectTo, JSON.parse(state.params.withParams));
              } else {
                  return this.maUiLoginRedirector.redirect(user);
              }
          };
      
      }
      
      return {
          bindings: {
          },
          controller: customLogin,
          templateUrl: require.toUrl('./login.html')
      };
      
      });
      

      You need to create a custom route for this component in the User Module:

      define([
          'angular',
          'require',
          './components/customLogin.js',
          ],
      function(angular, require, customLogin) {
      'use strict';
      
      var dukeEnergyModule = angular.module('dukeEnergyModule', ['maUiApp'])
          .component('customLogin', customLogin)
      
      dukeEnergyModule.config(['maUiMenuProvider', function(maUiMenuProvider) {
          maUiMenuProvider.registerMenuItems([
              {
                  name: 'customLogin',
                  url: '/user-login?redirectTo=&withParams=',
                  template: '<custom-login></custom-login>',
                  menuIcon: 'fa-certificate',
                  menuText: 'Login',
                  weight: 100,
                  menuHidden: true,
                  params: {
                      noPadding: false,
                      hideFooter: false,
                  },
              }
          ])
      }]);
      

      Finally, you need to add this url in administration > System setting > UI module settings

      0_1591297267829_Screen Shot 2020-06-04 at 2.59.10 PM.png

      If you need more details, I will be happy to help

      Luis

      posted in User help
      guetteluisG
      guetteluis

    Latest posts made by guetteluis

    • RE: Watchlist chart size

      I would recommend you to create a dashboard with the Dashboard designer, so you can show the chart like you want. Check this link

      Luis

      posted in User help
      guetteluisG
      guetteluis
    • RE: Login URl

      I've tested in a local Mango 3.7.1, with Safari, in my iPhone, and it is working fine. What I see is that, when you enter the first time, you will get redirected to the login page, but it still says that you already logged in. But then, if you try again, you get redirected to the correct page. I think this problem was solved in later versions.

      Luis

      posted in User help
      guetteluisG
      guetteluis
    • RE: Login URl

      Hey @mattfox,

      Yes, you can add custom login page. Probably, you will need to create a custom AngularJS component, depending on how much you want to customize it. Here is an example:

      HTML

      <div class="login-container" flex="100" layout="row" layout-wrap>
      
          <div flex="100" flex-gt-sm="50">
              <img class="rc-login-img" src="/rest/v2/file-stores/public/img/school-login.jpg" alt="Login">
          </div>
          
          <div flex="100" flex-gt-sm="50" layout="row" layout-wrap layout-align="center center" md-colors="::{background: 'blue-800'}">
              <div flex="100" layout="row" layout-wrap layout-align="center center">
                  <img class="mt-10" src="../../resources/svg/logo.svg" alt="Logo" height="70">
              </div>
      
              <div flex="100" class="mt-10" layout="row" layout-wrap layout-align="center center">
                  <md-card flex="100" flex-gt-sm="60" flex-gt-md="50">
                      <md-card-title>
                          <md-card-title-text>
                              <span class="md-headline">Login</span>
                          </md-card-title-text>
                      </md-card-title>
                      <md-card-content layout="column">
                          <ma-login on-success="$ctrl.onSuccess($user, $state)">
                              <ma-logged-in class="already-logged-in" ng-if="$ctrl.User.current && $ctrl.User.current.username !== 'guest'">
                                  <span ma-tr="login.aleadyLoggedIn" ma-tr-args="[$ctrl.User.current.username]"></span>
                                  <a ui-sref="actions">Go to Action Submission</a>
                              </ma-logged-in>
      
                              <a ui-sref="customRegister" tabindex="5" ma-tr="login.emailVerification.registerUser"></a>
                              <a ui-sref="forgotPassword({username: username})" tabindex="4" ma-tr="login.forgotYourPassword"></a>
                          </ma-login>
                      </md-card-content>
                  </md-card>
              </div>
          </div>
      </div>
      

      Javascript

      define(['angular', 'require'], function(angular, require) {
          'use strict';
          
      customLogin.$inject = ['maUser', '$injector'];
      function customLogin(maUser, $injector) {
      
          this.maUiLoginRedirector = $injector.has('maUiLoginRedirector') && $injector.get('maUiLoginRedirector');
      
          this.onSuccess = (user, state) => {
              if (state.params.redirectTo) {
                  state.go(state.params.redirectTo, JSON.parse(state.params.withParams));
              } else {
                  return this.maUiLoginRedirector.redirect(user);
              }
          };
      
      }
      
      return {
          bindings: {
          },
          controller: customLogin,
          templateUrl: require.toUrl('./login.html')
      };
      
      });
      

      You need to create a custom route for this component in the User Module:

      define([
          'angular',
          'require',
          './components/customLogin.js',
          ],
      function(angular, require, customLogin) {
      'use strict';
      
      var dukeEnergyModule = angular.module('dukeEnergyModule', ['maUiApp'])
          .component('customLogin', customLogin)
      
      dukeEnergyModule.config(['maUiMenuProvider', function(maUiMenuProvider) {
          maUiMenuProvider.registerMenuItems([
              {
                  name: 'customLogin',
                  url: '/user-login?redirectTo=&withParams=',
                  template: '<custom-login></custom-login>',
                  menuIcon: 'fa-certificate',
                  menuText: 'Login',
                  weight: 100,
                  menuHidden: true,
                  params: {
                      noPadding: false,
                      hideFooter: false,
                  },
              }
          ])
      }]);
      

      Finally, you need to add this url in administration > System setting > UI module settings

      0_1591297267829_Screen Shot 2020-06-04 at 2.59.10 PM.png

      If you need more details, I will be happy to help

      Luis

      posted in User help
      guetteluisG
      guetteluis
    • RE: Datapoint Assignment

      Can you explain a little bit more about what do you want to accomplish? Can you share the script?

      posted in Dashboard Designer & Custom AngularJS Pages
      guetteluisG
      guetteluis
    • RE: "Point Values Limited To 5001"

      Hi @BG,

      You can change the point values limit in Administration > UI settings. But be careful with this one, your browser could crash if you have large amounts of data in the chart. Also, you can find more information about rollups in:

      https://help.infiniteautomation.com/rollups/?rq=rollup

      Hope this helps you,
      Regards

      posted in User help
      guetteluisG
      guetteluis
    • RE: Linking to Dynamic Pages -

      Hi @jbriggs

      I've tested your code following the documentation and I think that you missed something. Check this piece of code:

      <ma-watch-list-parameters id="3ee223f4-823a-4951-937d-b571ccaa4d61" watch-list="designer.watchList" style="position: absolute; width: 100%; left: 0px; top: 0px;" ng-model="designer.parameters" ng-change="updateParams = designer.parameters"></ma-watch-list-parameters>
      

      The ma-watch-list-parameters does not get updated because you don't have ng-change="updateParams = designer.parameters".

      Be careful when you drag & drop this component beacuse this one does not have ng-change, so you have to update it by yourself.

      I hope that this helps you
      Regards

      posted in Dashboard Designer & Custom AngularJS Pages
      guetteluisG
      guetteluis