robotframework-metrics icon indicating copy to clipboard operation
robotframework-metrics copied to clipboard

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

Open pwalaszkowski opened this issue 6 years ago • 8 comments

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

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 avatar Dec 30 '18 20:12 pwalaszkowski

@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?

jessezach avatar Dec 31 '18 02:12 jessezach

@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 avatar Dec 31 '18 03:12 adiralashiva8

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

jessezach avatar Dec 31 '18 03:12 jessezach

@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

adiralashiva8 avatar Dec 31 '18 04:12 adiralashiva8

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

jessezach avatar Dec 31 '18 04:12 jessezach

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

adiralashiva8 avatar Dec 31 '18 04:12 adiralashiva8

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

pwalaszkowski avatar Dec 31 '18 06:12 pwalaszkowski

@patrat88 any update on this.

adiralashiva8 avatar Feb 17 '19 15:02 adiralashiva8