Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions website/api/helpers/get-extended-osquery-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ module.exports = {
for(let platform of columnHasFleetOverrides.platforms) {
if(platform === 'darwin') {
platformWithNormalizedNames.push('macOS');
} else if(platform === 'chromeos') {
platformWithNormalizedNames.push('ChromeOS');
} else {
platformWithNormalizedNames.push(_.capitalize(platform));
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/assets/images/os-linux-dark-24x24@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/assets/images/os-macos-dark-24x24@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/assets/images/os-windows-dark-24x24@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions website/assets/js/pages/osquery-table-details.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parasails.registerPage('osquery-table-details', {
'darwin': 'macOS',
'linux': 'Linux',
'windows': 'Windows',
'chromeos': 'ChromeOS',
'all': 'All platforms'
},
},
Expand Down
15 changes: 11 additions & 4 deletions website/scripts/build-static-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,14 +581,21 @@ module.exports = {

let platformString = '<br> **Only available on ';// start building a string to add to the column's description

if(column.platforms.length === 2) { // Because there are only three options for platform, we can safely assume that there will be at most 2 platforms, so we'll just handle this one of two ways
// If there are two values in the platforms array, we'll add the capitalized version of each to the columns description
platformString += column.platforms[0]+' and '+ column.platforms[1];
if(column.platforms.length > 3) {// FUTURE: add support for more than three platform values in columns.
throw new Error('Support for more than three platforms has not been implemented yet.');
}

if(column.platforms.length === 3) { // Because there are only four options for platform, we can safely assume that there will be at most 3 platforms, so we'll just handle this one of three ways
// If there are three, we'll add a string with an oxford comma. e.g., "On macOS, Windows, and Linux"
platformString += `${column.platforms[0]}, ${column.platforms[1]}, and ${column.platforms[2]}`;
} else if(column.platforms.length === 2) {
// If there are two values in the platforms array, it will be formated as "[Platform 1] and [Platform 2]"
platformString += `${column.platforms[0]} and ${column.platforms[1]}`;
} else {
// Otherwise, there is only one value in the platform array and we'll add that value to the column's description
platformString += column.platforms[0];
}
platformString += ' devices.** ';
platformString += '** ';
columnDescriptionForTable += platformString; // Add the platform string to the column's description.
}
tableMdString += ' | '+column.name+' | '+ column.type +' | '+columnDescriptionForTable+'|\n';
Expand Down
9 changes: 6 additions & 3 deletions website/views/pages/osquery-table-details.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
@click="clickFilterByPlatform('linux')">Linux</div>
<div class="dropdown-item d-block"
@click="clickFilterByPlatform('darwin')">macOS</div>
<div class="dropdown-item d-block"
@click="clickFilterByPlatform('chromeos')">ChromeOS</div>
</div>
</div>
<div class="d-flex">
Expand Down Expand Up @@ -68,9 +70,10 @@
<div purpose="table-container" class="d-flex flex-column pl-xl-5 pl-lg-3 w-100">
<div purpose="schema-table">
<div purpose="platform-logos" class="d-flex flex-row align-items-center">
<img class="mx-2" style="height: 24px" src="/images/os-linux-black-32x36@2x.png" alt="Linux logo" v-if="_.includes(tableToDisplay.platforms, 'linux')">
<img class="mx-2" style="height: 24px" src="/images/os-windows-black-38x36@2x.png" alt="Windows logo" v-if="_.includes(tableToDisplay.platforms, 'windows')">
<img class="mx-2" style="height: 25px" src="/images/os-macos-black-31x35@2x.png" alt="macOS logo" v-if="_.includes(tableToDisplay.platforms, 'darwin')">
<img class="mx-2" style="height: 25px" src="/images/os-macos-dark-24x24@2x.png" alt="macOS logo" v-if="_.includes(tableToDisplay.platforms, 'darwin')">
<img class="mx-2" style="height: 24px" src="/images/os-windows-dark-24x24@2x.png" alt="Windows logo" v-if="_.includes(tableToDisplay.platforms, 'windows')">
<img class="mx-2" style="height: 24px" src="/images/os-linux-dark-24x24@2x.png" alt="Linux logo" v-if="_.includes(tableToDisplay.platforms, 'linux')">
<img class="mx-2" style="height: 25px" src="/images/os-chromeos-dark-24x24@2x.png" alt="macOS logo" v-if="_.includes(tableToDisplay.platforms, 'chromeos')">
</div>
<%- partial(path.relative(path.dirname(__filename), path.resolve( sails.config.appPath, path.join(sails.config.builtStaticContent.compiledPagePartialsAppPath, tableToDisplay.htmlId)))) %>
</div>
Expand Down
7 changes: 4 additions & 3 deletions website/views/pages/query-detail.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
<h5 class="pb-md-2 m-0">Platforms</h5>
<p class="pb-1" v-if="!query.platform || !query.platform.length">--</p>
<div purpose="platforms" class="d-flex align-items-center align-items-md-start pb-1" v-else>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-macos-black-24x24@2x.png" alt="macOS" v-if="query.platform.includes('darwin')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-windows-black-24x24@2x.png" alt="Windows" v-if="query.platform.includes('windows')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-linux-black-24x24@2x.png" alt="Linux" v-if="query.platform.includes('linux')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-macos-dark-24x24@2x.png" alt="macOS" v-if="query.platform.includes('darwin')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-windows-dark-24x24@2x.png" alt="Windows" v-if="query.platform.includes('windows')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-linux-dark-24x24@2x.png" alt="Linux" v-if="query.platform.includes('linux')"/>
<img class="d-inline-flex ml-3 ml-md-0 mr-md-3" src="/images/os-chromeos-dark-24x24@2x.png" alt="ChromeOS" v-if="query.platform.includes('chromeos')"/>
</div>
</div>
</div>
Expand Down
13 changes: 9 additions & 4 deletions website/views/pages/query-library.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<option value="darwin">macOS</option>
<option value="windows">Windows</option>
<option value="linux">Linux</option>
<option value="chromeos">ChromeOS</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -62,14 +63,15 @@
<p class="d-inline-flex flex-wrap px-2 mb-0">compatible with</p>
<button class="btn btn-secondary btn-sm dropdown-toggle p-0" type="button"
id="dropdownMenuSelectPlatform" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{selectedPlatform === 'windows' ? 'Windows' : selectedPlatform === 'darwin' ? 'macOS' : selectedPlatform === 'linux' ? 'Linux' : selectedPlatform}}
{{selectedPlatform === 'windows' ? 'Windows' : selectedPlatform === 'darwin' ? 'macOS' : selectedPlatform === 'linux' ? 'Linux' : selectedPlatform === 'chromeos' ? 'ChromeOS' : selectedPlatform}}
</button>
<div class="dropdown-menu p-2" aria-labelledby="dropdownMenuSelectPlatform">
<button class="dropdown-item" type="button" @click="clickSelectPlatform('all platforms')">all platforms</button>
<button class="dropdown-item" type="button" @click="clickSelectPlatform('darwin')">macOS</button>
<button class="dropdown-item" type="button"
@click="clickSelectPlatform('windows')">Windows</button>
<button class="dropdown-item" type="button" @click="clickSelectPlatform('linux')">Linux</button>
<button class="dropdown-item" type="button" @click="clickSelectPlatform('chromeos')">ChromeOS</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -120,14 +122,17 @@
<div class="col-sm-3 col-md-auto align-self-start">
<div class="text-sm-right m-0">
<img class="d-inline-flex mr-1 mr-sm-0 ml-sm-1 ml-md-2 logo"
src="/images/os-macos-black-16x16@2x.png" alt="macOS"
src="/images/os-macos-dark-24x24@2x.png" alt="macOS"
v-if="query.platform.includes('darwin')" />
<img class="d-inline-flex mr-1 mr-sm-0 ml-sm-1 ml-md-2 logo"
src="/images/os-windows-black-16x16@2x.png" alt="Windows"
src="/images/os-windows-dark-24x24@2x.png" alt="Windows"
v-if="query.platform.includes('windows')" />
<img class="d-inline-flex mr-1 mr-ms-0 ml-sm-1 ml-md-2 logo"
src="/images/os-linux-black-16x16@2x.png" alt="Linux"
src="/images/os-linux-dark-24x24@2x.png" alt="Linux"
v-if="query.platform.includes('linux')" />
<img class="d-inline-flex mr-1 mr-ms-0 ml-sm-1 ml-md-2 logo"
src="/images/os-chromeos-dark-24x24@2x.png" alt="Linux"
v-if="query.platform.includes('chromeos')" />
</div>
</div>
</div>
Expand Down