diff options
| author | jc0b <j@jc0b.computer> | 2020-07-10 15:18:49 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:02 +0200 |
| commit | d8479e7e3744b8d1d31ac4d9f972e560eacd2cf8 (patch) | |
| tree | 79b7dfccec6e3cc1fce189b4605a37b354d676a2 /frontend/src/util | |
| parent | 4befa57993831274ad7e6ca62f96aa582f81cc5d (diff) | |
| parent | 3b4e27320c479bd6ef48998f448ed070e8bd7511 (diff) | |
Merge branch 'master' of github.com:atlarge-research/opendc-dev
Diffstat (limited to 'frontend/src/util')
| -rw-r--r-- | frontend/src/util/available-metrics.js | 4 | ||||
| -rw-r--r-- | frontend/src/util/state-utils.js | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/frontend/src/util/available-metrics.js b/frontend/src/util/available-metrics.js new file mode 100644 index 00000000..c8035ddd --- /dev/null +++ b/frontend/src/util/available-metrics.js @@ -0,0 +1,4 @@ +export const AVAILABLE_METRICS = [ + 'granted-cpu', + 'overcommitted-cpu', +] diff --git a/frontend/src/util/state-utils.js b/frontend/src/util/state-utils.js new file mode 100644 index 00000000..ba248c60 --- /dev/null +++ b/frontend/src/util/state-utils.js @@ -0,0 +1,5 @@ +export const getState = (dispatch) => new Promise((resolve) => { + dispatch((dispatch, getState) => { + resolve(getState()) + }) +}) |
