Code Monkey home page Code Monkey logo

Comments (6)

pofider avatar pofider commented on August 27, 2024
  1. It is in the beginning just because of my laziness. I should find the <head> in html and put it just after it if is there. Lets do this.

  2. I understand that big data are problem and not always required. Lets add a flag to the template which excludes the data from the script if activated.

  3. The jsreport browser client sdk script should be linked to speed up the html page load

I would apply these changes if you agree?

from jsreport-browser-client.

zam6ak avatar zam6ak commented on August 27, 2024
  1. does it have to be in the head? Could it be after the page loads towards bottom (like what Bootstrap example template looks like)? On one hand, automatically inserting it is kind of neat...on the other hand, I still think being able to link to this .js via asset would give a lot more flexibility....Is this script the only difference between 'html' and 'html-with-browser-client' recipes? If it is, I would, if may be so bold, recommend:
  • a) make the script a special asset (that would either include or exclude data). this would would allow authors to add it anywhere in template (or at lease anywhere in the head if it must be loaded early)
  • b) you could then deprecate 'html-with-browser-client' (just use 'html' and add this script if needed)

Lastly, if it must be in the <head>, add it right before closing </head> tag...

  1. Yes, a flag to exclude data would be neat

  2. Definitely yes (again, another case for making it a special asset)

from jsreport-browser-client.

pofider avatar pofider commented on August 27, 2024

Ok, it doesn't need to be at the beginning, that is true.

The recipe actually also adds to the page the current template, options and input data. This what you can't do with asset. So I think it makes sense to keep the recipe.

However you are free to simply link the jsreport sdk and use html recipe, if you don't need the above
<script src="/extension/browser-client/public/js/jsreport.min.js"></script>

from jsreport-browser-client.

zam6ak avatar zam6ak commented on August 27, 2024

ok I didn't know about other stuff...
Will the link work with appPath? Meaning with Ngnix proxying?

from jsreport-browser-client.

pofider avatar pofider commented on August 27, 2024

Well, no...

You would have to add the path manually
<script src="/reporting/extension/browser-client/public/js/jsreport.min.js"></script>

but then the script wan't now the serverUrl anyway. It is also part of the recipe's job. So probably better to use it and the omitting data switch will solve the perf problem.

from jsreport-browser-client.

pofider avatar pofider commented on August 27, 2024

Done in 1.1.0

from jsreport-browser-client.

Related Issues (6)

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.