Mark critical policies in standard query library. (#15070)

Closes: #14812 

Changes:
- Added a "critical" tag to critical policies in the standard query
library.
- Updated the macOS version used in the "Operating system up to date
(macOS)" policy.
- Updated the name of a policy to be in sentence case ("MDM Enrolled
(macOS)" » "MDM enrolled (macOS)")
- Updated the build-static-content script to add a `critical` attribute
to queries that have the "critical" tag.
- Updated the /queries page to add a "critical" badge to queries that
have the critical attribute.
This commit is contained in:
Eric
2023-11-09 21:18:02 -06:00
committed by GitHub
parent 4c639a9dc7
commit eedb867024
4 changed files with 24 additions and 9 deletions
+12
View File
@@ -48,6 +48,18 @@
color: #FFF;
text-decoration: none;
}
[purpose='critical-badge'] {
text-transform: uppercase;
background: #FF5C83;
border-radius: 4px;
padding: 4px;
font-weight: 700;
font-size: 10px;
line-height: 10px;
display: inline;
color: #FFF;
text-decoration: none;
}
[purpose='query-tag'] {
font-size: 12px;
+2
View File
@@ -69,6 +69,8 @@ module.exports = {
// If a query has a 'requires MDM' tag, we'll set requiresMDM to true for this query, and we'll ingore this tag.
if(_.trim(tag.toLowerCase()) === 'mdm required'){
query.requiresMdm = true;
} else if(_.trim(tag.toLowerCase()) === 'critical') {
query.critical = true;
} else {
// Removing any extra whitespace from tags and changing them to be in lower case.
formattedTags.push(_.trim(tag.toLowerCase()));
+1
View File
@@ -101,6 +101,7 @@
<div class="col-12">
<div class="d-flex flex-row align-items-center flex-wrap">
<h5 class="card-title m-0 mb-1 mr-2">{{query.name}}</h5>
<a purpose="critical-badge" class="mr-2" v-if="query.critical">Critical</a>
<a purpose="requires-mdm-badge" class="mr-2" v-if="query.requiresMdm">Requires MDM</a>
<span class="mr-2 my-sm-0 my-1 text-nowrap d-inline-flex" purpose="query-tag" v-for="tag in query.tags" @click.stop="clickSelectTag(tag)">{{tag}}</span>
</div>