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. ...
  • Niels_van_Sluis's avatar
    Nov 26, 2021

    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