Commit Graph

25 Commits

Author SHA1 Message Date
Westly Wright d3d78e87c8
Upgrade Ember & Dependencies for LTS support >3.12
There are changes required for the ember upgrade but additional changes
for individual libs are also present. Commit has been squashed, see
individual commits if needed.

There are a bunch of HBS changes as well. These are to deal with a
couple new rules and there impact is low. The button one has bitten us a
few time so this seemed great to add IMO.

update ember 3.12.4

ember 3.13

fixes for new eslint rules

ember 3.13->3.14

ember3.14->3.16

ember3.16->3.20

3.20 lint rules

yarn upgrade

update ember-optional-feature

update deps that can go to patch versions

upgrade major versions that are possible

update ansi_up

only reset term var if we're not destroying

prevents new ember 'same computation' error

update async

upgrade dot-object

new-catalog - add set to deal with new warning
marked-down - drop call into next to ensure its called at the correct time

upgrade ember-assign

update ember-cli-clipboard

remove unused & deprecated ember-cli-release

remove unused drag-drop lib

use set on tracked prop

update ember-flatpickr && cli-test-loader

upgrade ember-href-to

update filesaver

update liquid-fire and ipaddr

upgrade jsondiffpatch

upgrade marked

upgrade semver

update xterm

Update ember-basic-dropdown

the library has changed quite a bit and no longer provides an addon for the content-item where we handling the click event to close the dropdown,
thus click events must be added manually to the items being clicked to close the dropdown.

udpate dompurify

fix page header project styles

Bump ember api store, remove npm-run-all

Autofix button types from hbs linting

this change looks large but only adds `type` button to any buttons that dont have a type, which should help to reduce weird side effects

more hbs lint changes for no-negate-condition

turned off a couple rules that could be too much to test right now
2020-10-07 16:52:22 -07:00
Cody Jackson be3a635e3d When a test is N/A the nodes will also be N/A
rancher/rancher#26067
2020-03-16 14:48:19 -07:00
Cody Jackson 4c7af6523a Improving the UX of the run scan modal
We are going to add a section beneath the profile selector of the run
scan modal. This section is responsible for informing the user of which
tests will not be run and why.

There will be two subsections Not Applicable and Skipped tests.
Skipped tests will only be shown for permissive profiles since
hardened tests shouldn't skip anything.

rancher/rancher#25961
2020-03-15 23:03:46 -07:00
Cody Jackson 604e647907 Remove CIS skip button and total number
We're removing the CIS skip button because we decided the current UX
is poort and we don't want to spend a tremendous amount of effort
making a marginally better UX in the short time we have left.

We also removed the 19 of 59 from the main CIS page as the total was
misleading and wasn't actionable.

rancher/rancher#25863
2020-03-10 16:50:18 -07:00
Cody Jackson 79c283fd5e Resolve RKE Template issue caused by CIS
The profile helper methods were attached to the cluster model.
Unfortunately, the cluster isn't available when creating a new rke
template.

To resolve this I moved all of the cis helpers out of the cluster model
and utils and moved them into a cisHelpers service so they could be
used without access to the cluster itself.
2020-03-06 15:36:29 -07:00
Cody Jackson 9dddea78c9 Adding support for N/A state and creating a better profile 2020-03-06 12:15:27 -07:00
Cody Jackson 355d592051 Large refectoring of CIS to improve UX
- Added Set Alert button
  - This will set the appropriate options for cis
- Added Set Schedule button
  - This will scroll the settings into view
- Added a modal so profiles can be picked
2020-03-06 12:15:27 -07:00
Cody Jackson 93b505199c Refactor how cis scans are disabled.
This refactoring removed code duplication and
provides a more cohesive experience across all
of the pages that you can run a scan.

This will also now check and ensure the following
- there aren't running ClusterScans
- this isn't a windows cluster
- systemProject is available
- the cluster is active
- the action link is available

When the above isn't the case Run CIS Scan will not be present in
the cluster action drop downs and the Run CIS Scan but
 will be disabled on the CIS Scans and CIS Scan Detail
pages.

rancher/rancher#24759
rancher/rancher#25298
2020-02-07 12:08:28 -07:00
Cody Jackson e6b4232390 Improve UX of CIS
Improving the UX of CIS based on the feedback that was received during
the review.

- Sort scans by date so newest will be on top.
- Details should be sorted by state in Fail, Skipped, Pass order
- Add a Run CIS Scan action to the cluster menu.
2020-02-03 10:44:01 -07:00
Cody Jackson 9dc1769e1c Add support for lettered suffixes when sorting
When sorting CIS scan tests by number the lettered suffixes weren't
sorting properly. This adds support for sorting numbers such as
1.1.37b.

rancher/rancher#24715
2020-01-17 13:25:51 -07:00
Cody Jackson e8de1d7360 Adding the clear button to the detail page search input
rancher/rancher#24750
2020-01-17 09:56:15 -07:00
Cody Jackson 2f58374c39 Ensure skipping works for multiple cis versions
We validating the security scan config appropriately when
a version was already present in the skip list. This now
ensures a version exists before verifying that it contains an array.

We were also replacing the existing skip object in the
security-scan-config which prevented us from storing
multiple versions at a time. We now extend the object
instead using the spread operator.

rancher/rancher#24733
rancher/rancher#24742
2019-12-23 10:14:07 -07:00
Cody Jackson 51c1d34dfa Provide empty configMap when it can't be retrieved
When the user doesn't have access to the systemProject we just
return an empty configMap so the page can proceed without error.

We also disable the runScan button if the systemProject isn't available.

rancher/rancher#24644
2019-12-20 16:10:12 -07:00
Cody Jackson 867239fa1b Conditionally show node links in CIS Scans
If nodes have been deleted previous reports with missing nodes were
breaking. To resolve that we now only show links to nodes that we can
find.

rancher/rancher#24676
2019-12-20 09:14:16 -07:00
Cody Jackson 3fb931ee46 Update the downloaded report
The downloaded report now has:
- A column for passed_nodes
- A column for failed_nodes
- A column for all nodes the test ran against
- The benchmark version in the header

rancher/rancher#24671
2019-12-19 16:52:33 -07:00
Cody Jackson c8e3649c68 Remove config map validation from run scan
Because the scan will ignore an invalid config map I'm removing
the validation from run scan so the UI can run the scan without issue.

rancher/rancher#24496
2019-12-16 14:08:07 -07:00
Cody Jackson 84d50d3aad lint:fix 2019-12-14 22:39:01 -07:00
Cody Jackson 49a6a2f555 Fix running cis scan and change the color of running state
The new API required that I pass null instead of an empty array
as the skiplist if nothing is supposed to be skipped when
running a scan.

Updated the color of the running state to info instead of success
as requested.
2019-12-14 22:08:41 -07:00
Cody Jackson fbb24bbffa Adding support for the nodes field in the CIS report
When a test is a Mixed state we now look at the nodes field
to determine which nodes passed and failed.
2019-12-14 22:08:41 -07:00
Cody Jackson 91bd0498d7 Provide more feedback when a security config is malformed
We provide an error notification when the security config is malformed and
the user attempts to run a scan. We also prevent the scan from running.

We also added a default sort by 'id' on the scan detail table.

rancher/rancher#24495
rancher/rancher#24496
2019-12-11 16:42:07 -07:00
Cody Jackson 65fb6148ef Create default config map if it's not present.
If the security-config map wasn't present the detail view wouldn't work
properly. To resolve this we now create a new config map if it's not
present.

rancher/rancher#24432
2019-12-06 10:30:46 -07:00
Cody Jackson 84618ae41e Resolve lint issues. 2019-12-05 14:50:19 -07:00
Cody Jackson 9838e9da91 Add failed to parse security-scan-cfg growl
This will ensure the user is notified when there's a json
parsing error of their security-scan-cfg config map.

The notification will happen during page load and if
they attempt to skip/unskip.

rancher/rancher#24417
2019-12-05 14:50:19 -07:00
Cody Jackson 1698346518 Fix CIS detail table id sorting
This allows the id column to sort as if the ids are versions instead of
plain strings. This allows 1.1.2 to come before 1.1.10 when sorting.

rancher/rancher#24417
2019-12-05 14:50:19 -07:00
Cody Jackson 5126642250 Implement the list and detail views for CIS scan
This adds and implements the /c/<clusterid>/cis/scan
and /c/<clusterid>/cis/scan/detail/<scanid> routes.

rancher/rancher#20425
2019-12-02 14:45:56 -07:00