Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Oct 17, 2021
1 parent 4664873 commit 46d509d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const OsqueryManagedPolicyCreateImportExtension = React.memo<

const { form: configForm } = useForm({
defaultValue: {
config: JSON.stringify(get(newPolicy, 'inputs[0].config?.osquery.value', {}), null, 2),
config: JSON.stringify(get(newPolicy, 'inputs[0].config.osquery.value', {}), null, 2),
},
schema: {
config: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ export const createStatusRoute = (router: IRouter, osqueryContext: OsqueryAppCon
produce(packagePolicy, (draft) => {
unset(draft, 'id');

set(draft, 'name', `osquery_manager-1`);
set(draft, 'name', 'osquery_manager-1');

set(draft, 'inputs[0].streams', []);
set(draft, 'inputs[0]', {
enabled: true,
policy_template: 'osquery_manager',
streams: [],
type: 'osquery',
});

each(agentPacks, (agentPack) => {
// @ts-expect-error update types
Expand Down

0 comments on commit 46d509d

Please sign in to comment.