Skip to content

Commit 33e7af4

Browse files
authored
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.
1 parent 6cfecde commit 33e7af4

File tree

6 files changed

+130
-3
lines changed

6 files changed

+130
-3
lines changed

website/assets/styles/pages/policy-details.less

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,49 @@
188188
max-width: 800px;
189189
width: 100%;
190190
}
191+
[purpose='powershell-note'] {
192+
display: flex;
193+
padding: 16px 24px;
194+
align-items: center;
195+
gap: 8px;
196+
align-self: stretch;
197+
border-radius: 8px;
198+
border: 1px solid #B4B2FE;
199+
background: #F7F7FC;
200+
margin-bottom: 40px;
201+
img {
202+
width: 16px;
203+
height: 16px;
204+
}
205+
p {
206+
margin-bottom: 0px;
207+
color: #515774;
208+
209+
/* Body SM (FKA Card text) */
210+
font-family: Inter;
211+
font-size: 14px;
212+
font-weight: 400;
213+
line-height: 150%;
214+
}
215+
code {
216+
color: #515774;
217+
font-family: 'Source Code Pro';
218+
font-size: 14px;
219+
line-height: 16px; /* 114.286% */
220+
border-radius: 2px;
221+
background: #F1F0FF;
222+
padding: 2px 1px;
223+
}
224+
a {
225+
color: #515774;
226+
font-family: Inter;
227+
font-size: 14px;
228+
font-weight: 400;
229+
line-height: 150%; /* 150% */
230+
text-decoration: underline #C5C7D1;
231+
text-underline-offset: 3px;
232+
}
233+
}
191234
[purpose='policy-check'] {
192235
padding-bottom: 24px;
193236
[purpose='codeblock'] {
@@ -549,6 +592,14 @@
549592
[purpose='page-container'] {
550593
padding: 32px 24px;
551594
}
595+
[purpose='policy-check'] {
596+
[purpose='codeblock'] {
597+
[purpose='copy-button'] {
598+
top: 2px;
599+
right: 5px;
600+
}
601+
}
602+
}
552603

553604
}
554605

website/assets/styles/pages/query-detail.less

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,49 @@
302302
background-color: rgba(25, 33, 71, 0.1);
303303
}
304304
}
305+
[purpose='powershell-note'] {
306+
display: flex;
307+
padding: 16px 24px;
308+
align-items: center;
309+
gap: 8px;
310+
align-self: stretch;
311+
border-radius: 8px;
312+
border: 1px solid #B4B2FE;
313+
background: #F7F7FC;
314+
margin-bottom: 40px;
315+
img {
316+
width: 16px;
317+
height: 16px;
318+
}
319+
p {
320+
margin-bottom: 0px;
321+
color: #515774;
305322

323+
/* Body SM (FKA Card text) */
324+
font-family: Inter;
325+
font-size: 14px;
326+
font-weight: 400;
327+
line-height: 150%;
328+
}
329+
code {
330+
color: #515774;
331+
font-family: 'Source Code Pro';
332+
font-size: 14px;
333+
line-height: 16px; /* 114.286% */
334+
border-radius: 2px;
335+
background: #F1F0FF;
336+
padding: 2px 1px;
337+
}
338+
a {
339+
color: #515774;
340+
font-family: Inter;
341+
font-size: 14px;
342+
font-weight: 400;
343+
line-height: 150%; /* 150% */
344+
text-decoration: underline #C5C7D1;
345+
text-underline-offset: 3px;
346+
}
347+
}
306348
[purpose='query-check'] {
307349
[purpose='codeblock'] {
308350
margin-top: 40px;
@@ -495,6 +537,14 @@
495537
[purpose='page-container'] {
496538
padding: 32px 24px;
497539
}
540+
[purpose='query-check'] {
541+
[purpose='codeblock'] {
542+
[purpose='copy-button'] {
543+
top: 2px;
544+
right: 5px;
545+
}
546+
}
547+
}
498548

499549
}
500550

website/assets/styles/pages/vital-details.less

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454

455455
}
456456

457-
[purpose='discovery-table-note'] {
457+
[purpose='discovery-table-note'], [purpose='powershell-note'] {
458458
display: flex;
459459
padding: 16px 24px;
460460
align-items: center;
@@ -463,7 +463,7 @@
463463
border-radius: 8px;
464464
border: 1px solid #B4B2FE;
465465
background: #F7F7FC;
466-
margin-bottom: 40px;
466+
margin-bottom: 24px;
467467
img {
468468
width: 16px;
469469
height: 16px;
@@ -625,6 +625,14 @@
625625
}
626626
}
627627
}
628+
[purpose='vital-check'] {
629+
[purpose='codeblock'] {
630+
[purpose='copy-button'] {
631+
top: 2px;
632+
right: 5px;
633+
}
634+
}
635+
}
628636
[parasails-component='modal'] {
629637

630638
[purpose='modal-dialog'] {

website/views/pages/policy-details.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@
6868
<pre v-show="selectedTab === 'sql'"><code class="hljs sql"><%= policy.query %></code></pre>
6969
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= policy.powershell %></code></pre>
7070
</div>
71+
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
72+
<img src="/images/[email protected]" alt="An icon indicating that this section has important information">
73+
<div>
74+
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
75+
</div>
76+
</div>
7177
</div>
7278
</div>
7379
<div purpose="sidebar-container">

website/views/pages/query-detail.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
<pre v-show="selectedTab === 'sql'"><code class="hljs sql"><%= query.query %></code></pre>
5050
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= query.powershell %></code></pre>
5151
</div>
52+
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
53+
<img src="/images/[email protected]" alt="An icon indicating that this section has important information">
54+
<div>
55+
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
56+
</div>
57+
</div>
5258
</div>
5359
</div>
5460
<div purpose="sidebar-container">

website/views/pages/vital-details.ejs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,17 @@
102102
<pre v-show="selectedTab === 'ps'"><code class="hljs ps has-linebreaks"><%= thisVital.powershell %></code></pre>
103103
</div>
104104
</div>
105+
<div purpose="powershell-note" v-if="selectedTab === 'ps'">
106+
<img src="/images/[email protected]" alt="An icon indicating that this section has important information">
107+
<div>
108+
<p>PowerShell commands are currently work in progress, <a :href="'https://github.com/fleetdm/fleet/edit/main/'+queryLibraryYmlRepoPath">contributions welcome</a>.</p>
109+
</div>
110+
</div>
105111
<% if(thisVital.discovery) {%>
106112
<div purpose="discovery-table-note">
107113
<img src="/images/[email protected]" alt="An icon indicating that this section has important information">
114+
<p>This query uses the <code><%- thisVital.discovery %></code> data table. <a href="/tables/<%- thisVital.discovery %>">Learn more</a></p>
108115
<div>
109-
<p>This query uses the <code><%- thisVital.discovery %></code> data table. <a href="/tables/<%- thisVital.discovery %>">Learn more</a></p>
110116
</div>
111117
</div>
112118
<% } %>

0 commit comments

Comments
 (0)