fleet/website/views/pages/osquery-table-details.ejs
Eric ad4567012a
Website: update reference documentation platform filters and sidebar on /tables pages. (#27865)
Closes: https://github.com/fleetdm/confidential/issues/9974


Changes:
- Removed the calculated max height of the sidebar on osquery schema
table pages
- Update the platform filters on osquery schema table pages, vitals
pages, query library, and policy library to scroll with the page.
- Updated /vitals/* and /tables/* pages to scroll users past the page
headline when they switch platforms.
- Updated the query library and policy library pages to scroll users to
the top of the list of policies/queries when they switch platforms (If
they have scrolled the list)
2025-04-07 13:40:15 +09:00

98 lines
6.3 KiB
Text
Vendored

<div id="osquery-table-details" v-cloak>
<div purpose="page-container">
<div purpose="page-content">
<docs-nav-and-search search-filter="tables" current-section="tables" :algolia-public-key="algoliaPublicKey"></docs-nav-and-search>
<div purpose="page-headline" class="d-flex flex-column">
<h2>Tables</h2>
<p>Fleet uses osquery tables to query operating system, hardware, and software data. Each table provides specific data for analysis and filtering.</p>
</div>
<div purpose="platform-filters" class="d-flex justify-content-center" >
<div purpose="platform-filter" :class="[selectedPlatform === 'apple' ? 'selected' : '']+' '+[bowser.windows ? 'order-3' : '']" class="d-flex flex-row justify-content-center align-items-center" @click="clickSelectPlatform('apple')">
<h1 id="apple" class="d-flex align-items-center">
<img src="/images/os-macos-dark-24x24@2x.png" alt="macOS" class="d-inline">
<span class="d-none d-md-inline">Apple</span>
</h1>
</div>
<div purpose="platform-filter" :class="[selectedPlatform === 'linux' ? 'selected' : '']+' '+[bowser.windows ? 'order-2' : '']" class="d-flex flex-row justify-content-center align-items-center" @click="clickSelectPlatform('linux')">
<h1 id="linux" class="d-flex align-items-center">
<img src="/images/os-linux-dark-24x24@2x.png" alt="Linux" class="d-inline">
<span class="d-none d-md-inline">Linux</span>
</h1>
</div>
<div purpose="platform-filter" :class="[selectedPlatform === 'windows' ? 'selected' : '']+' '+[bowser.windows ? 'order-1' : '']" class="d-flex flex-row justify-content-center align-items-center" @click="clickSelectPlatform('windows')">
<h1 id="windows" class="d-flex align-items-center">
<img src="/images/os-windows-dark-24x24@2x.png" alt="Windows" class="d-inline">
<span class="d-none d-md-inline">Windows</span>
</h1>
</div>
<div purpose="platform-filter" :class="[selectedPlatform === 'chrome' ? 'selected' : '']+' '+[bowser.windows ? 'order-4' : '']" class="d-flex flex-row justify-content-center align-items-center" @click="clickSelectPlatform('chrome')">
<h1 id="chrome" class="d-flex align-items-center">
<img src="/images/os-chromeos-dark-24x24@2x.png" alt="Chrome" class="d-inline">
<span class="d-none d-md-inline">ChromeOS</span>
</h1>
</div>
</div>
<div class="d-flex flex-column justify-content-center">
<div purpose="content" class="container p-0" style="max-width: 1200px;">
<div class="d-flex flex-lg-row flex-column justify-content-start">
<div purpose="left-sidebar" class="d-none d-lg-flex flex-column">
<div style="position: relative;">
<div purpose="table-of-contents">
<a class="d-block" purpose="table-of-contents-link" :class="[tableToDisplay.title === table.title ? 'active' : '']" :href="table.url+'#'+selectedPlatform" v-for="table in filteredTables">{{table.title}} <span purpose="evented-table-icon" v-if="table.evented"><img alt="evented table" src="/images/icon-evented-12x12@2x.png" ></span></a>
</div>
<div purpose="overflow-shadow" class="d-none d-lg-block"></div>
</div>
</div>
<div purpose="mobile-custom-select" class="d-flex d-lg-none flex-row justify-content-between" @click="clickOpenTablesNav()">
<div><p class="mb-0"><%= tableToDisplay.title %></p></div>
<div><img src="/images/icon-select-arrows-16x16@2x.png" alt="click to open the table of contents"></div>
</div>
<div purpose="table-container" class="d-flex flex-column">
<div purpose="schema-table">
<div purpose="platform-logos" class="d-flex flex-row align-items-center justify-content-end">
<% if(_.contains(tableToDisplay.platforms, 'darwin')){%>
<img class="ml-3" style="height: 25px" src="/images/os-macos-dark-24x24@2x.png" alt="macOS logo">
<%}%>
<% if(_.contains(tableToDisplay.platforms, 'windows')){%>
<img class="ml-3" style="height: 24px" src="/images/os-windows-dark-24x24@2x.png" alt="Windows logo">
<%}%>
<% if(_.contains(tableToDisplay.platforms, 'linux')){%>
<img class="ml-3" style="height: 24px" src="/images/os-linux-dark-24x24@2x.png" alt="Linux logo">
<% }%>
<% if(_.contains(tableToDisplay.platforms, 'chrome')){%>
<img class="ml-3" style="height: 25px" src="/images/os-chromeos-dark-24x24@2x.png" alt="ChromeOS logo">
<%}%>
</div>
<%- partial(path.relative(path.dirname(__filename), path.resolve( sails.config.appPath, path.join(sails.config.builtStaticContent.compiledPagePartialsAppPath, tableToDisplay.htmlId)))) %>
</div>
<div class="justify-self-end">
<a :href="tableToDisplay.githubUrl" purpose="edit-button" target="_blank" no-icon>Edit page<i class="fa fa-pencil"></i></a>
<div class="d-block justify-self-end" purpose="contact-cta">
<h3 class="mb-3">Questions?</h3>
<div class="d-sm-flex">
<animated-arrow-button href="/contact">Ask us anything</animated-arrow-button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div purpose="table-of-contents-modal" >
<modal v-if="modal === 'table-of-contents'" @close="closeModal()">
<div purpose="modal-table-of-contents">
<a class="d-block" purpose="modal-table-of-contents-link" :class="[tableToDisplay.title === table.title ? 'active' : '']" :href="table.url+'#'+selectedPlatform" v-for="table in filteredTables">{{table.title}} <span purpose="evented-table-icon" v-if="table.evented"><img alt="evented table" src="/images/icon-evented-12x12@2x.png" ></span></a>
</div>
</modal>
</div>
</div>
<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>