Class: Mdm::Note

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/mdm/note.rb

Overview

Data gathered or derived from the #host or #service such as its fingerprint.

Instance Attribute Summary collapse

Instance Attribute Details

#created_at ⇒ DateTime

When the note was created.

Returns:

  • (DateTime)


# File 'app/models/mdm/note.rb', line 51

#critical ⇒ Boolean

Whether this note is critical or not.

Returns:

  • (Boolean)


# File 'app/models/mdm/note.rb', line 56

#data ⇒ Hash

A Hash of data about the #host or #service.

Returns:

  • (Hash)


# File 'app/models/mdm/note.rb', line 61

#host ⇒ Mdm::Host?

The host to which this note is attached.

Returns:



13
14
15
16
17
# File 'app/models/mdm/note.rb', line 13

belongs_to :host,
class_name: 'Mdm::Host',
counter_cache: :note_count,
optional: true,
inverse_of: :notes

#ntype ⇒ String

The type of note. Usually a dot-separateed name like 'host.updated.'.

Returns:

  • (String)


# File 'app/models/mdm/note.rb', line 66

#seen ⇒ Boolean

Whether any user has seen this note.

Returns:

  • (Boolean)


# File 'app/models/mdm/note.rb', line 71

#service ⇒ Mdm::Service?

The service to which this note is attached.

Returns:



24
25
26
27
# File 'app/models/mdm/note.rb', line 24

belongs_to :service,
class_name: 'Mdm::Service',
optional: true,
inverse_of: :notes

#updated_at ⇒ DateTime

The last time the note was updated.

Returns:

  • (DateTime)


# File 'app/models/mdm/note.rb', line 76

#vuln ⇒ Mdm::Vuln?

The vuln to which this note is attached.

Returns:

  • (Mdm::Vuln) —

    if note is attached to an Vuln.

  • (nil) —

    if not is attached to an Host.



34
35
36
37
# File 'app/models/mdm/note.rb', line 34

belongs_to :vuln,
class_name: 'Mdm::Vuln',
optional: true,
inverse_of: :notes

#workspace ⇒ Mdm::Workspace

The workspace in which the #host or #service exists.

Returns:



43
44
45
# File 'app/models/mdm/note.rb', line 43

belongs_to :workspace,
class_name: 'Mdm::Workspace',
inverse_of: :notes