Skip to content

switch to json to hold all template information instead of loading single files#55

Merged
y0urself merged 7 commits intogreenbone:masterfrom
nichtsfrei:report_format_editor_html_rendering
Oct 13, 2020
Merged

switch to json to hold all template information instead of loading single files#55
y0urself merged 7 commits intogreenbone:masterfrom
nichtsfrei:report_format_editor_html_rendering

Conversation

@nichtsfrei
Copy link
Member

@nichtsfrei nichtsfrei commented Oct 8, 2020

What:
Add a small indicator to upload report and create_pdf to the report_format editor so that a user knows that something is happening in the background

Change from loading image files to a parameter.json file which holds all global design elements to make it easier to change them,
Add an endpoint to manipulate parameter.json

Why:

Unfortunately proceeding an xml and creating a pdf can take a while especially with a slower cpu.

Some parameter needs to be globally changeable within the standard template to make customization easier.

How:

  1. Go to report-format editor and upload an xml afterwards create a pdf.
  2. start pheme, change the cover_image via:
curl -X PUT localhost:8000/parameter --form cover_image=@PATH_TO_NEW_COVER_IMAGE
  1. create a pdf report like usually

Checklist:

@nichtsfrei nichtsfrei requested a review from a team October 8, 2020 12:51
@nichtsfrei nichtsfrei changed the title add waiting indicator within format_editor, measure time in gvmd switch to json to hold all template information instead of loading single files Oct 9, 2020

def measure_time(func):
def measure(*args, **kwargs):
startt = time.process_time()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name ... :D

@y0urself y0urself merged commit 34eb46b into greenbone:master Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants