Commit Graph

12 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 9925305f3c Changing the way configMaps get loaded for RunScanModal
The RunScanModal was not getting config map changes after the first
time the modal was opened. The results were getting cached. By creating
a new array each time loadAsyncConfigMap is loaded I can guarentee the
computed properties will get re-evaluated.

I also attempted to watch config maps through the project store but
unfortunately updating the data of the config map doesn't seem to
produce a websocket message. Even if the message was created I
don't think I'd be able to watch the value as I'd have to
watch a sub-object 'config.json' which has a period in it. This causes
problems with watching in ember.

rancher/rancher#26161
2020-03-23 02:09:20 -07:00
Cody Jackson 56366207ee Various CIS fixes
- Label change for scheduled scans
- Fixed a table rendering bug that occured due to the incorrect value
  of colspan
- Disabled the alert and scheduled scan button on the cis page for
windows clusters
- Fixed an issues where two scans couldnt run at the same time due
  to a profile not being defined for a second run scan modal.

rancher/rancher#26009
rancher/rancher#26021
rancher/rancher#25987
rancher/rancher#25983
2020-03-16 10:36:37 -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 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
Westly Wright 768a84de61
Merge pull request #3644 from codyrancher/skipList
Give the skipList a default value if malformed
2019-12-18 09:37:10 -07:00
Cody Jackson ca7c5a0cf1 Give the skipList a default value if malformed
I don't want to validate the configMap in the skipList
because a malformed configMap is the equivelant of
an empty skipList for the purposes of running a scan
and displaying what is currently being skipped.

rancher/rancher#24627
2019-12-17 17:14:11 -07:00
Cody Jackson b3fd5dff55 Make the security-scan-config load for each route
The security-scan-config wasn't being reloaded when
navigating between clusters because the config map
was getting cached. This forces it to be reloaded.

rancher/rancher#24623
2019-12-17 16:35:05 -07:00
Cody Jackson 84d50d3aad lint:fix 2019-12-14 22:39:01 -07:00
Cody Jackson 1e7ed9488c Adding support to CIS for versioned skipping
This enables us to have separate skip lists for different versions of
CIS scans.
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