feat(Explore): make sure Loki labels are up to date (#16131)
* Migrated loki syntax and labels logic to useLokiSyntax hook * Enable loki labels refresh after specified interval has passed * Enable periodic loki labels refresh when labels selector is opened * Fix prettier * Add react-hooks-testing-library and disable lib check on typecheck * Add tests for loki syntax/label hooks * Move tsc's skipLibCheck option to tsconfig for webpack to pick it up * Set log labels refresh marker variable when log labels fetch start * Fix prettier issues * Fix type on activeOption in useLokiLabel hook * Typo fixes and types in useLokiSyntax hook test fixes * Make sure effect's setState is not performed on unmounted component * Extract logic for checking if is component mounted to a separate hook
Showing
... | @@ -20,6 +20,7 @@ | ... | @@ -20,6 +20,7 @@ |
"@types/angular": "^1.6.6", | "@types/angular": "^1.6.6", | ||
"@types/chalk": "^2.2.0", | "@types/chalk": "^2.2.0", | ||
"@types/classnames": "^2.2.6", | "@types/classnames": "^2.2.6", | ||
"@types/clipboard": "^2.0.1", | |||
"@types/commander": "^2.12.2", | "@types/commander": "^2.12.2", | ||
"@types/d3": "^4.10.1", | "@types/d3": "^4.10.1", | ||
"@types/enzyme": "^3.1.13", | "@types/enzyme": "^3.1.13", | ||
... | @@ -34,7 +35,6 @@ | ... | @@ -34,7 +35,6 @@ |
"@types/react-select": "^2.0.4", | "@types/react-select": "^2.0.4", | ||
"@types/react-transition-group": "^2.0.15", | "@types/react-transition-group": "^2.0.15", | ||
"@types/react-virtualized": "^9.18.12", | "@types/react-virtualized": "^9.18.12", | ||
"@types/clipboard": "^2.0.1", | |||
"angular-mocks": "1.6.6", | "angular-mocks": "1.6.6", | ||
"autoprefixer": "^9.4.10", | "autoprefixer": "^9.4.10", | ||
"axios": "^0.18.0", | "axios": "^0.18.0", | ||
... | @@ -95,6 +95,7 @@ | ... | @@ -95,6 +95,7 @@ |
"postcss-loader": "^3.0.0", | "postcss-loader": "^3.0.0", | ||
"postcss-reporter": "^6.0.1", | "postcss-reporter": "^6.0.1", | ||
"prettier": "1.16.4", | "prettier": "1.16.4", | ||
"react-hooks-testing-library": "^0.3.7", | |||
"react-hot-loader": "^4.3.6", | "react-hot-loader": "^4.3.6", | ||
"react-test-renderer": "^16.5.0", | "react-test-renderer": "^16.5.0", | ||
"redux-mock-store": "^1.5.3", | "redux-mock-store": "^1.5.3", | ||
... | ... |
public/app/core/hooks/useRefMounted.ts
0 → 100644
Please
register
or
sign in
to comment