Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

DNM: Placeholder for tracking issue: Inspecjs store #43

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lukemalinowski
Copy link
Contributor

Swap in inspecjs and add hooks to store.js

Reference #23

@lukemalinowski lukemalinowski added the enhancement New feature or request label Jun 28, 2019
@lukemalinowski
Copy link
Contributor Author

Jacob when you're ready for this to get merged into master click ready for review button on github PR. We set this PR up is a demo

Copy link
Member

@aaronlippold aaronlippold left a comment

Choose a reason for hiding this comment

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

I put this in just because it connects with some of the research I was doing this weekend. I think it is a good learning example. :) However, this PR will not be used given the migration over to the Vuesax template correct? However, some of the things I found could be useful there and I point them out in connection to this code as we are using this as the model to help us develop the components and patterns for the refactored app.

@@ -74,14 +74,12 @@ export default {
},
getControls: function () {
if (isMounted == true) {
var val = store.getControls();
var controls = store.getFilteredNistControls();
Copy link
Member

Choose a reason for hiding this comment

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

My brain says a function signature like getControlsBy('nist') would be the more general type of interface.

@@ -280,8 +278,37 @@ export default {
let that = this
Copy link
Member

Choose a reason for hiding this comment

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

I think this is cute - aka -this and that but is this good practice?

store.setSelectedFamily(fams[1]);
store.setSelectedSubFamily(fams[2]);
store.setSelectedControl(fams[3]);
store.setSelectedControl(parseInt(event.target.getAttribute("unique_id")));
}
},
clear: function (event) {
Copy link
Member

Choose a reason for hiding this comment

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

Can this be make into a more general loop or forEach type of thing, so that when we add new things this code wouldn't have to be updated.

@@ -33,14 +33,14 @@
return store.getBindValue();
},
activeImpact: function () {
return store.getImpact();
return store.getSeverityCount();
Copy link
Member

Choose a reason for hiding this comment

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

Once we are able to load multiple 'evaluations' aka profiles - will we need to add both singular and plural interfaces at some point?

rowHtml(item) {
var table_rows = '<tr><td class="details-control"><button class="' + helpers.status_btn(item.status) + '" style="width:120px">' + item.status + '</td>'
+ '<td>' + item.gid + '</td><td>' + item.rule_title + '</td><td>' + item.severity + '</td><td>' + item.nist +'</td></tr>';
rowHtml(control) {
Copy link
Member

Choose a reason for hiding this comment

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

This seems like it should be a set of render functions or even Functional Components
https://www.youtube.com/watch?v=KS4eizPXRCQ
and the section in the VueMastery Advanced Components course

@@ -1,7 +1,7 @@
<template>
<AboutContent v-if="shouldShowAbout" />
<SspContent v-else-if="shouldShowSSP" />
<b-container v-else="shouldShowResults">
<b-container v-else-if="shouldShowResults">
Copy link
Member

Choose a reason for hiding this comment

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

Please review this video as to how this could be a bit cleaner overall: https://www.youtube.com/watch?v=KS4eizPXRCQ

@aaronlippold aaronlippold added the wontfix This will not be worked on label Jul 22, 2019
@aaronlippold aaronlippold changed the title Inspecjs store DNM: Placeholder for tracking issue: Inspecjs store Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants