cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
209
Views
0
Helpful
3
Replies
Beginner

Finesse 12.0 v2 - How to pass parameters to activated gadget

Hi,

 

Is there any way to pass parameters to the activated gadget so that the data on the table can be filtered in?

 

Click the notification to activate the gadget

activate_gadget.png

 

Here is my code to activate the gadget (Please take note that the gadget is already initialized after the supervisor logged-in on Finesse Desktop.):

containerServices.activateTab("silentCallMonitoringTab");

 

This is the activated gadget

 

activated_gadget.png

 

Here is my code for the silent monitoring gadget:

 

<script type="text/javascript">
    // initialize the gadget running the init handler defined in SilentMonitoringGadget.js
    gadgets.HubSettings.onConnect = function () {
        finesse.modules.SilentMonitoringGadget.init();
        console.log("SilentMonitoringgadget: ONCONNECT1");
                     
        setTimeout(function() {
           var _cfg = finesse.gadget.Config;
           //This url will auto-login the supervisor to the activated gadget
           var srcUrl = "https://10.16.1.210:8443/silentmonitoring/login?userId="+_cfg.id+"&pass="+_cfg.password;
           var framesrc='<iframe width="100%" height="600px" target="_parent" src="'+srcUrl+'"/>';
           $("#mydiv").html(frameSrc);
        }, 3);
                     
        gadgets.window.adjustHeight(); 
    };
</script>

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Finesse 12.0 v2 - How to pass parameters to activated gadget

Hi,

 

Based off of your code, it seems like your SilentMonitor gadget is essentially an iframe that loads a url. The only thing I can think of right now is that in your pageview gadget (orange gadget), it will save the parameter in a cookie. Then in your silent monitor gadget, you fetch those values and add it as a query param.

 

Thanx,

Denise

3 REPLIES 3
Cisco Employee

Re: Finesse 12.0 v2 - How to pass parameters to activated gadget

Hi,

 

Based off of your code, it seems like your SilentMonitor gadget is essentially an iframe that loads a url. The only thing I can think of right now is that in your pageview gadget (orange gadget), it will save the parameter in a cookie. Then in your silent monitor gadget, you fetch those values and add it as a query param.

 

Thanx,

Denise

Beginner

Re: Finesse 12.0 v2 - How to pass parameters to activated gadget

Hi Denise,

 

Thanks for your reply, I think this is the best solution for now. But if ever your team will have a better solution in the future, please let me know.

 

Thank you very much!

 

William

Cisco Employee

Re: Finesse 12.0 v2 - How to pass parameters to activated gadget

You are very welcome!

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards