fleet/ee/vulnerability-dashboard/api/models/Host.js
Eric b1945b2128
Add fleet-vulnerability-dashboard repo to ee/ folder (#17428)
Closes: https://github.com/fleetdm/confidential/issues/4057

Changes:
- Added the contents of the fleet-vulnerability-dashboard repo to
ee/vulnerability-dashboard
- Added a github workflow to deploy the vulnerability dashboard on
Heroku
- Added a github workflow to test changes to the vulnerability-dashboard
- Updated the website's custom configuration to enable
auto-approvals/review requests to files in the
ee/vulnerability-dashboard folder
2024-03-13 13:06:11 -05:00

67 lines
2.1 KiB
JavaScript

/**
* Host.js
*
* @description :: A model definition represents a database table/collection.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
fleetApid: {
example: 54622,
type: 'number',
unique: true,
required: true
},
displayName: {
example: 'Eric\'s MacBook Pro 16',
type: 'string',
},
teamDisplayName: {
example: 'Workstations',
description: 'The name of the team that this host is on, or "No team" if this host does not belong to a team.',
type: 'string',
required: true,
},
teamApid: {
example: 2,
description: 'The the Fleet API ID of the host\'s team or 0 if the host has no team',
type: 'number',
defaultsTo: 0
},
hardwareSerialNumber: {
description: 'The harware serial number of this host',
extendedDescription: 'This is the hardware_serial value from the response from the get hosts endpoint of the Fleet API. If a host does not have a hardware_serial number (e.g., a ChromeOS host), this value will be set to N/A',
type: 'string',
required: true,
},
uuid: {
description: 'The uuid of this host in the Fleet instance',
type: 'string',
required: true,
},
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
operatingSystem: { model: 'OperatingSystem', required: true },
vulnerabilities: { collection: 'Vulnerability', through: 'VulnerabilityInstall', via: 'host' },
},
};