0

i want to show the analytics dashboard in vf page so i used lightning out to show a dashboard in vfpage it was working fine but now it shows this bugs

Unsafe attempt to load URL https://static.lightning.force.com/na224/projRes/insights/gen/static/wave/images/WaveCommon/static/icons/sprite.analytics.6d3156b2034b449d02a6.svg from frame with URL https://xxx-xx-xxxxxxxxxxxxxxxxx-dev-ed.lightning.force.com/analytics/dashboard/0FKDn000000XFKIOA4?mode=assetView&context=lightningOut&height=1000px&formFactor=DESKTOP&showTitle=true&showHeader=true&showSharing=false&embeddedInstanceId=ewa-3853213784458733&embeddedAppNavigationType=standard&enableNotifications=true&enableSubscriptions=true&isS1Mobile=false&sfdcNsOrigin=https%3A%2F%2Fxxx-xx-xxxxxxxxxxxxxxxxxxxxxxx-dev-ed--c.vf.force.com. Domains, protocols and ports must match.

i am not using https://static.lightning.force.com this url in my code and i am not using any static resource in my code

<aura:application access="GLOBAL"  extends="ltng:outApp" implements="ltng:allowGuestAccess">  
    <aura:dependency resource="c:showDashBoard" type="COMPONENT"/>
</aura:application>
<aura:component access="global" implements="flexipage:availableForAllPageTypes" >
    <aura:attribute name="DashboardId" type="String" default=""/>
    <aura:attribute name="BuName" type="String" default=""/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>{!v.body}
</aura:component>
({
    doInit: function(component, event, helper) {
        var deshBoardId = component.get('v.DashboardId');
        console.log('dashboardId is ' + deshBoardId);

        var XFilt = component.get('v.BuName');
        console.log('component: ', component);
        console.log('XFilt: ', XFilt);

        $A.createComponent(
            "wave:waveDashboard",
            {
                "dashboardId": deshBoardId ,
                "height": "1000",
                "filter": XFilt
            },
            function(newcomponent, status, errorMessage) {
                console.log('Status: ', status);
                console.log('Error message: ', errorMessage);

                if (component.isValid() && status === "SUCCESS") {
                    component.set("v.body", newcomponent);
                    console.log('component is valid and it is success')
                } else {
                    console.log('Component creation failed.');
                }
            }
        );
    }
    
})

<apex:page >
  <apex:includeLightning />
    <div id="lightning" />
    <script>
       $Lightning.use("c:dashBoard", function() {
        
         $Lightning.createComponent("c:showDashBoard",
                                    
                                    {"DashboardId" :"0FKDn000000XFKIOA4",
                                      },
                                    "lightning",
            
             function(cmp) {
          console.log("c:VFPageApp loaded successfully in VF page");
             }
         );
       });
                     
    </script>
</apex:page>

0

You must log in to answer this question.

Browse other questions tagged .