Forum Discussion

CA_Valli's avatar
Nov 25, 2021

[BIG-IP 16.0] APM Logon page and HREF links

Hello everyone,

I've been trying to include links to external resources in my APM Logon page. Something in the lines of 'click here' to register with a very simple text and one HTML href reference.

 

I've been messing a little with my configurations and I've got it working pretty easily in BIGIP v13.1 by using HTML tags in General Text customization for Logon page, but the very same edit isn't working as expected in BIG-IP v16.0.

 

I've been reading techdocs and also this very useful article, where was requested an example for this very same problem but it's still marked as an 'open point' to be added.

Since I've already spent quite a long time fine-tuning all my access profile's pages, I don't wanna have to do it all again in Standard mode ; also I believe this would be a pretty common problem, so I was wondering if anyone was able to make it work, and please share with me a couple tips on how to.

 

I've tried messing with .js for a while but I confess I'm not very skilled and couldn't find a way to include my simple paragraph.

 

Thanks in advance,

CA

  • Hi CA,

    Add the code below to user-logon.js.

     

    define(["require", "exports", "tslib", "module", "apmui/page/logon/View"], function (require, exports, tslib_1, module, View_1) {
        "use strict";
        Object.defineProperty(exports, "__esModule", { value: true });
        requirejs.config({
            map: {
                'apmui/master/View': {
                    'apmui/page/logon/View': module.id,
                },
            },
        });
        /* Replacement View component */
        var CustomLogonView = /** @class */ (function (_super) {
            tslib_1.__extends(CustomLogonView, _super);
            function CustomLogonView() {
                return _super !== null && _super.apply(this, arguments) || this;
            }
            CustomLogonView.prototype.componentDidMount = function () {
                _super.prototype.componentDidMount.call(this);
     
                var content = document.getElementsByClassName('apmui-content')[0];
                
                var message = document.createElement('div');
                message.style.cssText = 'max-width: 400px; width: 100%; padding-top: 20px;';
                message.id = "message";
                message.innerHTML = '<p>Please register <a href=\'/register.php\'>here</a> if you don\'t have an account yet.</p>';
                content.appendChild(message);
                
     
            };
            return CustomLogonView;
        }(View_1.default));
        exports.default = CustomLogonView;
    });

     

    And here an example of the result:

    Kind regards,

    --Niels

  • Hi Niels, I followed your example of logon-user.js, but I'm stuck with the error message: 'Access policy evaluation is already in progress for your current session.' Can you help me as I can't find a solution? Thanks, Fred.

  • Hi CA,

    Add the code below to user-logon.js.

     

    define(["require", "exports", "tslib", "module", "apmui/page/logon/View"], function (require, exports, tslib_1, module, View_1) {
        "use strict";
        Object.defineProperty(exports, "__esModule", { value: true });
        requirejs.config({
            map: {
                'apmui/master/View': {
                    'apmui/page/logon/View': module.id,
                },
            },
        });
        /* Replacement View component */
        var CustomLogonView = /** @class */ (function (_super) {
            tslib_1.__extends(CustomLogonView, _super);
            function CustomLogonView() {
                return _super !== null && _super.apply(this, arguments) || this;
            }
            CustomLogonView.prototype.componentDidMount = function () {
                _super.prototype.componentDidMount.call(this);
     
                var content = document.getElementsByClassName('apmui-content')[0];
                
                var message = document.createElement('div');
                message.style.cssText = 'max-width: 400px; width: 100%; padding-top: 20px;';
                message.id = "message";
                message.innerHTML = '<p>Please register <a href=\'/register.php\'>here</a> if you don\'t have an account yet.</p>';
                content.appendChild(message);
                
     
            };
            return CustomLogonView;
        }(View_1.default));
        exports.default = CustomLogonView;
    });

     

    And here an example of the result:

    Kind regards,

    --Niels

    • krazzy522's avatar
      krazzy522
      Icon for Altocumulus rankAltocumulus

      Hi Niels

      can you please show me code for decisionbox.js page,

      I have used your code for logon, it works perfect. I need same for decision could you please help me