Git Product home page Git Product logo

Comments (16)

pallaviMN avatar pallaviMN commented on June 19, 2024

Can we run npm start & tabeau server on the same port

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

I am running server on localhost://8000 & extension api npm start on localhost://8765.

Here when i tried to change tableau server port to 8765, it doesnt wok as npm is already running in that port.

Now when i publish my workbook, it will have URL starting with localhost://8000, so in extension javascript file , when i want to access window.location.URL it gives me "localhost://8765/....." but i need the published tableau URL.

If i try to access via window.parent.location.href it gives error

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

Uncaught DOMException: Blocked a frame with origin "http://localhost:8765" from accessing a cross-origin frame

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

You can modify the package.json to change what command is run when you type 'npm start'

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

will it avoid cross origin error? but in package.json there is no way to change to the port to 8000

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

i have changed the 8765 in package.json to 8000

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

Error: listen EADDRINUSE 0.0.0.0:8000

getting this error as tableau server running on this

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

That means you have another application running on that port. It seems like you already have Server running on 8000, so you won't be able to run the web app on port 8000 too.

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

If you're just trying to have them on the same port to avoid that cross-origin error, then that won't work. You can't get the url of the parent url . That would have to be something we add to the API. Can you explain why you need the url of the dashboard?

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

if the ports are different, then when i access parent.location.href in webapp, then it gives error saying that its an cross origin requests

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024
  1. Tableau server running on localhost://8000
  2. Extension API running on localhost://8765

Now in the default "filtering.js" file we are capturing & displaying all filtered results.
This filtered results along with the pubslished dashboard URL, we have pass to some ajax request.
but , tableau dashboard URL is created with "localhost://8000". Now in filtering.js, when i try to fetch window.location.href it gives me URL of "filtering.html" loaded in iframe but i want parent location. When i write console.log(parent.location.href) it gives me cross origin error.

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

or is there any option to enable cors in the node modules?

from extensions-api.

Kovner avatar Kovner commented on June 19, 2024

Sorry, what I'm hearing is that you want the dashboard URL. But why does your Extension need that? What will it do with it?

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

yes exactly, you got me right.
I need that URL because we create an simple "export" button in the extension object. On clicking that button , i need to capture the dashboard URL & make an ajax call to our another web server. In that web server, we have already have stored this dashboard URL in the DB. So ajax request sent by us from extension object, need to include dashboard URL for our web server to do some process.

from extensions-api.

pallaviMN avatar pallaviMN commented on June 19, 2024

so thinking can we enable cors in the node modules of extension object. If yes, then please tell me how can we achieve it?

from extensions-api.

KeshiaRose avatar KeshiaRose commented on June 19, 2024

Hi pallaviMN,

You can use document.referrer to get the URL of a published workbook. This will avoid the CORS issue. More info in this post.

from extensions-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.