50 Commits

Author SHA1 Message Date
bad048b7ba Performance: Standardize lodash imports to use destructured members (#33040)
* Performance: Standardize lodash imports to use destructured members
Changes lodash imports of the form `import x from 'lodash/x'` to
`import { x } from 'lodash'` to reduce bundle size.

* Remove unnecessary _ import from Graph component

* Enforce lodash import style

* Fix remaining lodash imports
2021-04-21 09:38:00 +02:00
d92145be28 Babel: Updates babel dependencies to latest version (#32534)
* Babel: Updates babel dependencies to latest version

* Fixed problem introduced by babel where calling super with prefedefined this is not supported

* fixing test

* Fixed tests

* Improve fix for QueryCtrl

* Fixed more tests

* Updated tests
2021-03-31 17:03:07 +02:00
1d689888b0 Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
ca3dff99e8 Chore: Bumps prettier version for new typescript syntax support (#20463)
* Chore: Bumps prettier version for new typescript syntax support

* Ran new version of prettier against the codebase
2019-11-19 13:59:39 +00:00
2474511d03 Heatmap: use DataFrame rather than LegacyResponseData (#19026)
* merge master

* TimeSeries: datasources with labels should export tags (not labels) (#18977)

* merge master

* export prometheus tags

* Annotations: Add annotations support to Loki (#18949)

* Explore: Unify background color for fresh logs (#18973)

* Singlestat: render lines on the panel when sparklines are enabled (#18984)

* Image rendering: Add deprecation warning when PhantomJS is used for rendering images (#18933)

* Add deprecation warning

* Update pkg/services/rendering/rendering.go

Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Units: Adding T,P,E,Z,and Y bytes (#18706)

* Adding T and P for bytes

Luckily, all the hard work was done before; just added in these prefixes for our production environment.

* Future-proofing with other values (why not?)

* Yottaflops?

* Cutting back down to Peta sizes, except for hashes

* Refactor: move ScopedVars to grafana/data (#18992)

* Refactor: Move sql_engine to sub package of tsdb (#18991)

this way importing the tsdb package does not come with xorm dependencies

* use DataFrame in heatmaps

* actually use the setting :)

* remove unused timeSrv

* merge with master / useDataFrames

* fix test function

* merge master

* fix datasource type on snapshot

* reuse DataFrame calcs from graph panel

* update comments
2019-09-24 14:56:15 +02:00
3f15170914 Refactor: move some files to @grafana/data (#17952)
* moving to data WIP

* more refactoring

* add missing test

* mock full path

* remove sinon from grafana-ui
2019-07-06 08:05:53 +02:00
3045daedbd noImplicitAny: Reduce errors to 3800-ish (#17781)
* Reduce noImplicitAny errors to 3900-ish

* Fix lots of errors

* Add interface
2019-06-27 13:21:04 +02:00
c9ad411d8e noImplicitAny: Fix basic errors (#17668)
* Fix basic noImplicitAny errors

* noImplicitAny HeatmapCtrl

* Update error limit
2019-06-19 19:59:03 +02:00
17826796da Chore: Fix noImplicitAny issues (#17636)
* noImplicitAny: TableRenderer

* noImplicitAny and add types

* HeatmapData interface

* Heatmap rendering

* Fix optional type

* Remove use of lodash
2019-06-19 13:40:42 +02:00
ceb9f0855b Chore: Replaces moment with Grafanas DateTime (#16919)
* Wip: Initial commit

* Refactor: Replaces moment.utc(

* Refactor: replaces the last isMoment statements

* Refactor: Removes almost all moment imports

* Refactor: Moves moment_wrapper to grafana/ui

* Refactor: Renames momentWrapper

* Refactor: Removes one more moment import

* Refactor: Removes unitOfTime import

* Fix: Fixes Prettier error

* Refactor: Renames DateTimeType to DateTime

* Refactor: Renames isDateTimeType to isDateTime

* Refactor: Renames dateTime to dateTime

* Feature: Bans moment imports and types
2019-05-08 13:51:44 +02:00
0f326f18dc changed functions to arrowfunctions for only-arrow-functions rule (#13127) 2018-09-04 15:55:41 +02:00
b8d82df97e added no-angle-bracket-type-assertion rule and updatet files to follow rule (#13115) 2018-09-03 11:30:44 +02:00
314b645857 tslint: changing vars -> const (#13034) 2018-08-26 18:43:07 +02:00
9b978b7203 tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
660530a3a6 Merge pull request #12914 from dehrax/12224-final
Karma to Jest: rename and cleanup
2018-08-14 12:55:23 +02:00
a65589a5fb Rename test files 2018-08-14 10:52:41 +02:00
53bab1a84b Remove tests and logs 2018-08-14 09:15:14 +02:00
2e2de38b31 Mock things 2018-08-13 13:55:47 +02:00
a79c43420a Add mocks 2018-08-13 10:57:32 +02:00
520aad819d Replace element 2018-08-10 16:30:51 +02:00
9188f7423c Begin conversion 2018-08-10 09:35:19 +02:00
805dc3542f Remove extra mock 2018-07-27 16:46:41 +02:00
26f709e87e Karm to Jest 2018-07-27 16:45:03 +02:00
dfe8b0a0d2 heatmap: add rendering tests for tsbuckets mode 2018-02-28 15:58:28 +03:00
7c78e8e383 heatmap: add few tests for histogram converter 2018-02-27 14:17:29 +03:00
ceb8223ddf Fixes for heatmap panel in Grafana 5 (#10973)
* heatmap: fix chart height

* heatmap: fix font size

* heatmap: fix legend size

* heatmap: fix rendering tests
2018-02-21 09:16:56 +01:00
27835f373e cleanup: removed unused typescript typings import 2018-01-04 10:12:02 +01:00
3a1f52d8a2 prettier: ran on all files again, sorry. now settings are defined in package.json 2017-12-21 08:39:31 +01:00
fadfc665e4 tech: ran pretttier on all typescript files 2017-12-19 16:06:54 +01:00
e7f3480803 heatmap: fix tooltip in "Time series bucket" mode, #9332 (#9867) 2017-11-13 15:20:12 +01:00
4aa227dd84 [Tech]: Start migrating to Jest for tests (#9610)
* tech: investigating karma + jest mix

* tech: migrating tests to jest

* tech: moved anoter test file to jest

* test: migrated two more test files to jest

* test: updated readme and made test fail to verify that it causes CI build failure

* tech: added code coverage for jest tests

* tech: testing codecov coverage

* tech: migrated more tests

* tech: migrated template srv to typescript and the tests to jest

* tech: minor build fix

* tech: build fixes

* build: another attempt at fixing go test with coverage
2017-10-22 07:03:26 +02:00
b8d9722b4f tech: removing unused variables from typescript files, and making tslint rules more strict 2017-09-21 16:40:18 +02:00
77b7f4b376 heatmap: add unit tests for convertToCards() 2017-08-02 21:27:10 +03:00
c7e8b98d14 heatmap: minor refactor, don't repeat cards stats calculation 2017-08-02 21:24:59 +03:00
f7ea08dba7 heatmap: fix rendering tests 2017-08-01 16:51:55 +03:00
97a7081b57 Fix 8706 (#8734)
* heatmap: fix incorrect time for UTC timezone, fixes #8706

* heatmap: fix tests for time format
2017-06-29 10:40:28 +02:00
c12a7d7f59 heatmap: adjust tests for fixed decimals calc 2017-06-27 22:24:27 +02:00
30b6c3b54a build: fixed heatmap test 2017-05-11 08:56:32 +02:00
acff78d421 Merge branch 'master' into heatmap-refactoring2 2017-05-09 12:41:11 +02:00
ece21b2d95 heatmap: more refactoring 2017-05-05 17:28:33 +02:00
dd5a426911 heatmap: refactoring heatmap 2017-05-05 16:15:08 +02:00
2361e2ddd9 fix moment.js deprecation warning when running tests 2017-04-27 15:29:32 -04:00
f77f8ebfc6 heatmap: changes to color spectrum, inverted some on dark theme 2017-03-31 17:12:50 +02:00
cb136c07b8 heatmap: add function for bucket size calculation 2017-03-31 11:44:44 +03:00
3170f0d84a heatmap: add ES histogram converter 2017-03-30 20:55:10 +03:00
114431beed heatmap: add tests for heatmap_data_converter 2017-03-30 18:21:22 +03:00
65a829b64d heatmap tests: fix timezone-dependent test error 2017-03-29 13:41:19 +03:00
7770c38e30 heatmap: test for Y axis rendering 2017-03-29 11:30:30 +03:00
ece6fd73a1 heatmap: add initial rendering tests 2017-03-28 17:46:10 +03:00
0a56db7745 Add unit tests for heatmap_ctrl. 2017-03-26 18:22:54 +03:00