Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Link Project and System models; polish control page UI (#844)
* New models to connect statements (controls) to elements (systems)... ...and move parser classes out of utilities and into separate file. Create an abstract System model to represent a system. The System model subclasses an Element and stores information about elements that are systems. Create ElementControl model represent the selected control list for a system. The model is called ElementControl because even systems are elements. An ElementControl associates a control catalog id with an element. Some elements are subclassed as systems. This allows us to apply statements to any element, including elements that are subclassed as systems. Create relationships between ElementControl and read-only oscal.Catalog model. A unique "control" statement is identified by unique combination of Element, OSCAL Control Id, and OSCAL Catalog Key. Also put parser classes into separate file `parsers.py` and `parsers_i.py` with the latter "*_i.py" representing a standalone version of the parser classes that do not require GovReady Django models to run. * WIP Get implementation statements associated with a system * Bump version to 0.9.1.5 * Remove xlrd from controls.utilities * Improve control index page with list of control groups Create page listing controls in a group. * Add Catalog index page * Display mutiple catalogs and their controls * Properly rread impl statements from database by system Continue developing the editor by connecting a control to a specific system and to a set of statements. When looking up a system control, the existing implementation statements for that system are read from database and displayed in editor. Provide new routes for viewing system related controls. Modify system model to not requie FISMA Id TODO: - manage save/create vs edit function on existing statement * Add controls directory to Docker build * Support statement updates in editor Enhance control editor Ajax save process to also handle updates to existing content. * Rename statement-element relationships; Add del smt to editor Rename relationship between statements and elements to be clearer. Create statement-element relationships: * producer_element * consumer_element * mentioned_elements Rules: * Every statement has exactly one producer_element * Every statement has exactly one consumer_element * Every statement has many menionted_elements * mentioned_elements should contain producer_element and consumer_element Update statement editor page to support new relationship names Update statement editor page to delete statements * Combined implementation statement in editor Display the combined implementatioin statement in the control implementation statement editor. Simplify the accordian header to just display component (element) name. Move "Add component statement" to bottom of list of components. Partially fix _smt_delete route. * Implementation smt editor improvements Enforce unique Name field on Element model. Match Component (Producer Element) by unique name to existing Producer Element in the database when creating a new Statement. Improve the combining of component statements. Temporarily put result into a textarea to make easier to copy manually. (TODO: Create a copy to clipboard javascript.) * Fix branch tests, bump VERSION, CHANGELOG * Add CSV export to Control models * Change admin string of Statements * Add guardian permission to editor page Show users 404 page if they do not have view permissons on a system * Better admin string for Portfolios * Add commented row to force debug_toolbar display * Add custom 404 template * WIP Initial version of migration compare controls page Initial version of an editor page (editor/compare) that will show controls from existing facility and a future facility to make migrating controls eaiser. * WIP Begin to add in 800-171 OSCAL control catalog Start to author the 800-171 OSCAL catalog in JSON. Make adjustments to family identification by control ID to handle numeric format of 800-171 group ids. * WIP Port 800-171 to spreadsheet * Recognize 800-171 control ids in id lookup * Link Project Model to System Model; Polish control page UI Link Projects (e.g. questionnaires/apps to system). Add System foreign key to Project Model. Interface improvements: * Improve comparison interface. * Simplify URLs to system pages. * Only display system information and controls if user has view permissions on system. * Add acton button to controls from questionnaire. * Create back links to questioonaire from controls. * fix merge Co-authored-by: Greg Elin <[email protected]> Co-authored-by: Peter Kaminski <[email protected]>
- Loading branch information