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

Finesse 12.0 v2 - How to pass parameters to activated gadget

liam123
Level 1
Level 1

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

dekwan
Cisco Employee
Cisco Employee

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

View solution in original post

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

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

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

You are very welcome!