-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into move-config-schema-to-server/kbn-optimizer
- Loading branch information
Showing
242 changed files
with
5,258 additions
and
1,861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
examples/controls_example/public/app/react_control_example/runtime_control_group_state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { ControlGroupRuntimeState } from '../../react_controls/control_group/types'; | ||
|
||
const RUNTIME_STATE_SESSION_STORAGE_KEY = | ||
'kibana.examples.controls.reactControlExample.controlGroupRuntimeState'; | ||
|
||
export function clearControlGroupRuntimeState() { | ||
sessionStorage.removeItem(RUNTIME_STATE_SESSION_STORAGE_KEY); | ||
} | ||
|
||
export function getControlGroupRuntimeState(): Partial<ControlGroupRuntimeState> { | ||
const runtimeStateJSON = sessionStorage.getItem(RUNTIME_STATE_SESSION_STORAGE_KEY); | ||
return runtimeStateJSON ? JSON.parse(runtimeStateJSON) : {}; | ||
} | ||
|
||
export function setControlGroupRuntimeState(runtimeState: Partial<ControlGroupRuntimeState>) { | ||
sessionStorage.setItem(RUNTIME_STATE_SESSION_STORAGE_KEY, JSON.stringify(runtimeState)); | ||
} |
Oops, something went wrong.