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.
This commit is contained in:
Eric 2025-02-02 23:20:20 -06:00 committed by GitHub
parent 6cfecdeea3
commit 33e7af4fa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 130 additions and 3 deletions

View file

@ -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;
}
}
}
}

View file

@ -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;
}
}
}
}

View file

@ -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'] {

View file

@ -68,6 +68,12 @@
<pre v-show="selectedTab === 'sql'"><code class="hljs sql"><%= policy.query %></code></pre>
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= policy.powershell %></code></pre>
</div>
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
<img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
<div>
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
</div>
</div>
</div>
</div>
<div purpose="sidebar-container">

View file

@ -49,6 +49,12 @@
<pre v-show="selectedTab === 'sql'"><code class="hljs sql"><%= query.query %></code></pre>
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= query.powershell %></code></pre>
</div>
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
<img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
<div>
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
</div>
</div>
</div>
</div>
<div purpose="sidebar-container">

View file

@ -102,11 +102,17 @@
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= thisVital.powershell %></code></pre>
</div>
</div>
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
<img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
<div>
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
</div>
</div>
<% if(thisVital.discovery) {%>
<div purpose="discovery-table-note">
<img src="/images/icon-info-16x16@2x.png" alt="An icon indicating that this section has important information">
<p>This query uses the <code><%- thisVital.discovery %></code> data table. <a href="/tables/<%- thisVital.discovery %>">Learn more</a></p>
<div>
<p>This query uses the <code><%- thisVital.discovery %></code> data table. <a href="/tables/<%- thisVital.discovery %>">Learn more</a></p>
</div>
</div>
<% } %>