Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the html, css and js content into a separate variables #53

Open
pwalaszkowski opened this issue Dec 30, 2018 · 8 comments
Open

Move the html, css and js content into a separate variables #53

pwalaszkowski opened this issue Dec 30, 2018 · 8 comments
Labels
enhancement New feature or request

Comments

@pwalaszkowski
Copy link
Contributor

Hi,

I think that the robotframework-metrics is a great tool!

Do you have plan to move out the java scripts, html and css parts into a separate modules?
Example variables:

  • head_content
  • icons_txt

Example js sources

  • <script src="https://www.gstatic.com/charts/loader.js" type="text/javascript"></script>
  • <script type="text/javascript">google.charts.load('current', {packages: ['corechart']});</script>

At this moment you have to have internet connection do gain access to external js sources.
And those long html variables make the code very hard to read

If there's no such plan at the moment i can do it by myself

Regards
Patryk Walaszkowski

@pwalaszkowski pwalaszkowski changed the title Move the html strings into a separate variables Move the html strings into a separate variables [enhancement] Dec 30, 2018
@pwalaszkowski pwalaszkowski changed the title Move the html strings into a separate variables [enhancement] Move the html, css and js content into a separate variables Dec 30, 2018
@jessezach
Copy link
Collaborator

@patrat88 The motive behind the most recent changes was to make this library a pip package with the least changes.

However I do think now it makes sense to abstract out the html variables as constants and keep the js and css locally.

Feel free to raise a PR if you have time.

@adiralashiva8 Does this sound good to you?

@adiralashiva8
Copy link
Owner

@patrat88 @jz-jess Its a good idea for having roboframework-metrics offline compatible. I thought of doing the same previously but there are some limitations of moving head_content.

Limitation: Google chart are not offline compatiable. Google charts team have mentioned in Frequently asked questions Can I use charts offline? link

May be we need to check other possibilities of achieving this!

@adiralashiva8 adiralashiva8 added the enhancement New feature or request label Dec 31, 2018
@jessezach
Copy link
Collaborator

@adiralashiva8 Everything else can be kept locally. We can start with that.

@adiralashiva8
Copy link
Owner

@jz-jess There are 4 main js we uses in report using cdn url:

  1. Jquery
  2. Datatable
  3. Google charts
  4. Bootstrap Dashboard example

Hope we should consider all the four and check compatibility, performance at user end and terms and conditions of usage before proceeding

@jessezach
Copy link
Collaborator

Robotframework stock reports have jQuery other dependency content locally. Performance will be better than using cdn.
Bootstrap js and css content can also be kept locally

@adiralashiva8
Copy link
Owner

Great, Then we will work on it but I want this changes need to part of next release 3.1.2 (may be in April or latter). Current we don't have any features requested by users

@pwalaszkowski
Copy link
Contributor Author

@adiralashiva8, @jz-jess thanks for the feedback, i will start working on that

@adiralashiva8
Copy link
Owner

@patrat88 any update on this.

@adiralashiva8 adiralashiva8 added this to the v-3-1-2 milestone Feb 17, 2019
@adiralashiva8 adiralashiva8 removed this from the v-3-1-2 milestone May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants