CA Service Management

  • 1.  CA SDM - Insert a informative message in export button

    Posted Jul 18, 2018 08:30 AM

    Hi all,

     

    I need to insert a informative message when the export button is clicked, but only for some forms (list_cr, list_cnt, etc..) and some tenants. 

    I made a edition in "export_file.html", but the message is displayed for all users and all forms with have the option to export.:

     

     

    Any ideia, how I can do this customization? 

     

    Thanks!



  • 2.  Re: CA SDM - Insert a informative message in export button
    Best Answer

    Posted Jul 18, 2018 09:59 AM

    You'll need change javascript function 'doExport' (native search_filter.js) putting it in file $NX_ROOT/site/mods/www/wwwroot/scripts/sitemods.js

    Is required clear the browser cache to apply these changes.

    function doExport(factory) {
        // begin message
        alert('this is a test');
        // finish message
        ImgBtnDisableButton("btnExport");
        var href_str = window.document.location.href;
        var start_pos = href_str.indexOf("://", 0) + "://".length;
        var end_pos = href_str.indexOf("/", start_pos);
        var target_url = href_str.substring(0, end_pos) + cfgCgi +
            "?SID=" + cfgSID +
            "+FID=" + fid_generator() +
            "+OP=LINK_WITH_BOPSID+KEEP_ROLE=1" +
            "+CALLBACK=export_cb('" + factory + "','" + nx_escape("%") + "bopsid')";

        SyncAjaxJSCall(target_url);
            // If the servlet being used is on a remote server, enable the "btnExport" button
            // after a short delay otherwise the button will remain dimmed due to the "Same-origin"
            // policy that will prevent the button from being enabled remotely.
            var servletURLtoUse = ahdtop.cfgLocalServletURL;
            var localHost = ahdtop.cfgLocalHost;
            if ( typeof servletURLtoUse == "string" && servletURLtoUse.length > 0 &&
                 typeof localHost == "string" && localHost.length > 0)
                if (servletURLtoUse != localHost)
                    window.setTimeout("ImgBtnEnableButton('btnExport')", 2500);
    }


  • 3.  Re: CA SDM - Insert a informative message in export button

    Posted Jul 18, 2018 10:26 AM

    Hi Daniel, 

     

    Thanks for your answer!

     

    The function that you inform, works very well, but is displayed in all forms with have the export option, and I need in some forms (basically list_cnt).

     

    Thanks! 



  • 4.  Re: CA SDM - Insert a informative message in export button

    Posted Jul 18, 2018 10:42 AM
    if (factory == 'cnt') alert('this is a test');


  • 5.  Re: CA SDM - Insert a informative message in export button

    Posted Jul 18, 2018 11:11 AM

    Thanks Daniel! 

     

    That's it