mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
8e37b8938c
Created 3 new components: <OsqueryOptionsPage /> , <OsqueryOptionsForm />, and <YamlAce /> The <OsqueryOptionsPage /> component is rendered at the new route /admin/osquery. The user navigates to this route by selecting the "Osquery Options" sub-navigation in the admin dropdown menu. On the Osquery Options page, the user is presented with a ACE editor filled with the current osquery options. The current osquery options are retrieved from the serve when the page component mounts. These current osquery options are stored in the osquery slice of state. Clicking "UPDATE OPTIONS" will trigger a form submit and hit the v1/kolide/spec/osquery_options endpoint if the yaml is valid. If the yaml is not valid, an error message is presented to the user with details on what the error is and where it occurred. If the yaml is valid, the osquery options will be updated even if the options haven't change.
45 lines
669 B
SCSS
45 lines
669 B
SCSS
.yaml-ace {
|
|
&__label {
|
|
font-size: 16px;
|
|
font-weight: $bold;
|
|
font-style: normal;
|
|
font-stretch: normal;
|
|
letter-spacing: -0.5px;
|
|
color: $text-dark;
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
min-height: 25px;
|
|
|
|
&--error {
|
|
color: $alert;
|
|
}
|
|
}
|
|
|
|
&__wrapper {
|
|
&--error {
|
|
.ace-kolide {
|
|
border: 1px solid $alert;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Added to remove the "popping" effect when the editor first loads.
|
|
min-height: 408px;
|
|
|
|
.ace_gutter-layer {
|
|
min-height: 408px;
|
|
}
|
|
|
|
.ace_line {
|
|
min-height: 24px;
|
|
}
|
|
|
|
.ace_gutter-cell {
|
|
min-height: 24px;
|
|
}
|
|
|
|
.ace_fold-widget {
|
|
min-height: 24px;
|
|
}
|
|
}
|