From 33e7af4fa65fe238fca5a1b22c29f20eb82bbb43 Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 2 Feb 2025 23:20:20 -0600 Subject: [PATCH] Website: Add note about PowerShell commands (#25973) Changes: - Added a note about Powershell commands to the vital details page, query details page, and policy details page. --- .../assets/styles/pages/policy-details.less | 51 +++++++++++++++++++ website/assets/styles/pages/query-detail.less | 50 ++++++++++++++++++ .../assets/styles/pages/vital-details.less | 12 ++++- website/views/pages/policy-details.ejs | 6 +++ website/views/pages/query-detail.ejs | 6 +++ website/views/pages/vital-details.ejs | 8 ++- 6 files changed, 130 insertions(+), 3 deletions(-) diff --git a/website/assets/styles/pages/policy-details.less b/website/assets/styles/pages/policy-details.less index 4f129efdc9..6c9dbd8fce 100644 --- a/website/assets/styles/pages/policy-details.less +++ b/website/assets/styles/pages/policy-details.less @@ -188,6 +188,49 @@ max-width: 800px; width: 100%; } + [purpose='powershell-note'] { + display: flex; + padding: 16px 24px; + align-items: center; + gap: 8px; + align-self: stretch; + border-radius: 8px; + border: 1px solid #B4B2FE; + background: #F7F7FC; + margin-bottom: 40px; + img { + width: 16px; + height: 16px; + } + p { + margin-bottom: 0px; + color: #515774; + + /* Body SM (FKA Card text) */ + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 150%; + } + code { + color: #515774; + font-family: 'Source Code Pro'; + font-size: 14px; + line-height: 16px; /* 114.286% */ + border-radius: 2px; + background: #F1F0FF; + padding: 2px 1px; + } + a { + color: #515774; + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 150%; /* 150% */ + text-decoration: underline #C5C7D1; + text-underline-offset: 3px; + } + } [purpose='policy-check'] { padding-bottom: 24px; [purpose='codeblock'] { @@ -549,6 +592,14 @@ [purpose='page-container'] { padding: 32px 24px; } + [purpose='policy-check'] { + [purpose='codeblock'] { + [purpose='copy-button'] { + top: 2px; + right: 5px; + } + } + } } diff --git a/website/assets/styles/pages/query-detail.less b/website/assets/styles/pages/query-detail.less index 7b2410f7cb..5e0648e844 100644 --- a/website/assets/styles/pages/query-detail.less +++ b/website/assets/styles/pages/query-detail.less @@ -302,7 +302,49 @@ background-color: rgba(25, 33, 71, 0.1); } } + [purpose='powershell-note'] { + display: flex; + padding: 16px 24px; + align-items: center; + gap: 8px; + align-self: stretch; + border-radius: 8px; + border: 1px solid #B4B2FE; + background: #F7F7FC; + margin-bottom: 40px; + img { + width: 16px; + height: 16px; + } + p { + margin-bottom: 0px; + color: #515774; + /* Body SM (FKA Card text) */ + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 150%; + } + code { + color: #515774; + font-family: 'Source Code Pro'; + font-size: 14px; + line-height: 16px; /* 114.286% */ + border-radius: 2px; + background: #F1F0FF; + padding: 2px 1px; + } + a { + color: #515774; + font-family: Inter; + font-size: 14px; + font-weight: 400; + line-height: 150%; /* 150% */ + text-decoration: underline #C5C7D1; + text-underline-offset: 3px; + } + } [purpose='query-check'] { [purpose='codeblock'] { margin-top: 40px; @@ -495,6 +537,14 @@ [purpose='page-container'] { padding: 32px 24px; } + [purpose='query-check'] { + [purpose='codeblock'] { + [purpose='copy-button'] { + top: 2px; + right: 5px; + } + } + } } diff --git a/website/assets/styles/pages/vital-details.less b/website/assets/styles/pages/vital-details.less index a61cb26b1e..1bb64e8696 100644 --- a/website/assets/styles/pages/vital-details.less +++ b/website/assets/styles/pages/vital-details.less @@ -454,7 +454,7 @@ } - [purpose='discovery-table-note'] { + [purpose='discovery-table-note'], [purpose='powershell-note'] { display: flex; padding: 16px 24px; align-items: center; @@ -463,7 +463,7 @@ border-radius: 8px; border: 1px solid #B4B2FE; background: #F7F7FC; - margin-bottom: 40px; + margin-bottom: 24px; img { width: 16px; height: 16px; @@ -625,6 +625,14 @@ } } } + [purpose='vital-check'] { + [purpose='codeblock'] { + [purpose='copy-button'] { + top: 2px; + right: 5px; + } + } + } [parasails-component='modal'] { [purpose='modal-dialog'] { diff --git a/website/views/pages/policy-details.ejs b/website/views/pages/policy-details.ejs index f29b1a0e13..464ec360d7 100644 --- a/website/views/pages/policy-details.ejs +++ b/website/views/pages/policy-details.ejs @@ -68,6 +68,12 @@
<%= policy.query %>
<%= policy.powershell %>
+
+ An icon indicating that this section has important information +
+

PowerShell commands are currently work in progress, contributions welcome.

+
+
diff --git a/website/views/pages/query-detail.ejs b/website/views/pages/query-detail.ejs index ae61a3d26c..921e4584d2 100644 --- a/website/views/pages/query-detail.ejs +++ b/website/views/pages/query-detail.ejs @@ -49,6 +49,12 @@
<%= query.query %>
<%= query.powershell %>
+
+ An icon indicating that this section has important information +
+

PowerShell commands are currently work in progress, contributions welcome.

+
+
diff --git a/website/views/pages/vital-details.ejs b/website/views/pages/vital-details.ejs index 61d2a95e64..85e2b79532 100644 --- a/website/views/pages/vital-details.ejs +++ b/website/views/pages/vital-details.ejs @@ -102,11 +102,17 @@
<%= thisVital.powershell %>
+
+ An icon indicating that this section has important information +
+

PowerShell commands are currently work in progress, contributions welcome.

+
+
<% if(thisVital.discovery) {%>
An icon indicating that this section has important information +

This query uses the <%- thisVital.discovery %> data table. Learn more

-

This query uses the <%- thisVital.discovery %> data table. Learn more

<% } %>