fleet/frontend/components/YamlAce/_styles.scss
noahtalerman 8e37b8938c
Implement osquery options page (#11)
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.
2020-11-04 18:00:51 -08:00

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;
}
}