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

Add Question OOI form rendering on the object detail page #1408

Merged
merged 31 commits into from
Jul 26, 2023

Conversation

Donnype
Copy link
Contributor

@Donnype Donnype commented Jul 17, 2023

Changes

This adds the rendering of questions and saving answers to bytes in rocky. Note: this merges into #1407 for now (PR split up) and depends on it.

Issue link

(Partially) closes #288

Proof

image


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified;
  • This PR only contains functionality relevant to the issue; tickets have been created for newly discovered issues.
  • I have written unit tests for the changes or fixes I made.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have performed a self-review of my code and refactored it to the best of my abilities.

Communication

  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have made corresponding changes to the documentation, if necessary.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@Donnype Donnype changed the title Add json form rendering on object detail page and fix the formatting Add Question OOI form rendering on the object detail page Jul 17, 2023
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

Looks good in general 👍 Just a few remarks:

  • check the status_code argument
  • perhaps one of the front-end team members can check the js asset for correctness and style?
  • at least one tests that tests the unhappy path(s)

rocky/rocky/views/ooi_detail.py Outdated Show resolved Hide resolved
rocky/rocky/views/ooi_detail.py Outdated Show resolved Hide resolved
rocky/tests/conftest.py Show resolved Hide resolved
rocky/rocky/views/ooi_detail.py Show resolved Hide resolved
rocky/tests/objects/test_objects_detail.py Show resolved Hide resolved
Base automatically changed from feature/add-question-ooi-model to main July 25, 2023 12:20
@Donnype Donnype marked this pull request as ready for review July 25, 2023 13:51
@Donnype Donnype requested a review from a team as a code owner July 25, 2023 13:51
@Donnype Donnype self-assigned this Jul 25, 2023
@Donnype
Copy link
Contributor Author

Donnype commented Jul 25, 2023

I created a separate ticket for this week to write some documentation.

@Donnype Donnype added rocky Issues related to Rocky octopoes Issues related to octopoes UI/UX labels Jul 25, 2023
@Donnype
Copy link
Contributor Author

Donnype commented Jul 25, 2023

Looks good in general 👍 Just a few remarks:

  • perhaps one of the front-end team members can check the js asset for correctness and style?

@HeleenSG @TwistMeister ?

@Darwinkel
Copy link
Contributor

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.

What works:

  • Works much better than entering a json blob :)
  • No apparent regressions

What doesn't work:

  • No new ConfigOOI is created (yet? I'm assuming that's a follow-up PR)

Bug or feature?:

  • Not sure if showing the JSON schema on the object details page is smart. It's almost certainly unintelligible for the average KAT user
    image

@Donnype
Copy link
Contributor Author

Donnype commented Jul 26, 2023

@Darwinkel Correct about the ConfigOOI, and agreed on the showing of the JSON schema on the object details page. Not sure about a good resolution that does not open a pool of questions about specific-ooi-field-rendering..

@underdarknl
Copy link
Contributor

Agreed about the json being vissible. It should be an easy fix in je JS to hide those lines.

…n-object-detail-page' into feature/parse-question-schemas-in-object-detail-page
@Donnype
Copy link
Contributor Author

Donnype commented Jul 26, 2023

@Darwinkel @underdarknl Fixed

@underdarknl underdarknl merged commit 806c611 into main Jul 26, 2023
@underdarknl underdarknl deleted the feature/parse-question-schemas-in-object-detail-page branch July 26, 2023 10:48
jpbruinsslot added a commit that referenced this pull request Jul 27, 2023
* main:
  Create new filters for findings  (#1293)
  Add Question OOI form rendering on the object detail page (#1408)
  Upgrade certifi (#1462)
  Default scan level filter to 0 (#1463)
  Remove some unused config options, and set better defaults for others (#1428)
  Remove unnecessary dependency on ipaddress package (#1448)
  Translations for release 1.11 - EN -> NL, PAP (#1439)
jpbruinsslot added a commit that referenced this pull request Jul 31, 2023
* main:
  Admin permissions (#1508)
  Upload members with a csv file (#1423)
  Add answer normalizer to create Config OOI (#1409)
  allow subject to be None (#1484)
  Fix webpage capture boefje (#1430)
  Fix CVE findings with cvss V2 (#1497)
  Add boefje worker diagrams and add missing env vars in documentation (#1489)
  Remove duplicate diagram of KATalogus View structure in the docs (#1486)
  Fix image references from readme's in developer documentation (#1487)
  Fix exception in object report view (#1475)
  Create new filters for findings  (#1293)
  Add Question OOI form rendering on the object detail page (#1408)
  Upgrade certifi (#1462)
  Default scan level filter to 0 (#1463)
  Remove some unused config options, and set better defaults for others (#1428)
  Remove unnecessary dependency on ipaddress package (#1448)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
octopoes Issues related to octopoes rocky Issues related to Rocky UI/UX
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Question OOIs with json-schema
4 participants