Commit Graph

62 Commits

Author SHA1 Message Date
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
kay delaney
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
Hugo Häggmark
34b4f7c717
Chore: Reduces strict errors (#33012)
* Chore: reduces strict error in OptionPicker tests

* Chore: reduces strict errors in FormDropdownCtrl

* Chore: reduces has no initializer and is not definitely assigned in the constructor errors

* Chore: reduces has no initializer and is not definitely assigned in the constructor errors

* Chore: lowers strict count limit

* Tests: updates snapshots

* Tests: updates snapshots

* Chore: updates after PR comments

* Refactor: removes throw and changes signature for DashboardSrv.getCurrent
2021-04-15 14:21:06 +02:00
Torkel Ödegaard
f109f06485
Graph: Fixes auto decimals issue in legend and tooltip (#30628)
* Graph: Fixes auto decimals issue in legend and tooltip

* Updated decimals
2021-01-26 12:37:48 +01:00
jedstar
77f6c241b1
StatPanels: Add new calculation option for percentage difference (#26369)
* Update fieldReducer.ts

addition of percentage difference to the singlestat panel

* Update time_series2.ts

* Update module.ts

* Update calculations-list.md

* Update docs/sources/panels/calculations-list.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update public/app/plugins/panel/singlestat/module.ts

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update module.ts

* Update calculations-list.md

* Update calculations-list.md

* Update module.ts

* Update fieldReducer.ts

* Update fieldReducer.ts

* Update fieldReducer.test.ts

* change name to remove wildcard characters

* Update calculations-list.md

* Update time_series2.ts

Fix spelling

* Update module.ts

* Update fieldReducer.ts

* formatting

* Update fieldReducer.ts

* Update fieldReducer.test.ts

* Update fieldReducer.test.ts

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-11-04 10:19:23 +01:00
Torkel Ödegaard
8f78b0e7bc
Chore: Fix all Typescript strict null errors (#26204)
* Chore: Fix typescript strict null errors

* Added new limit

* Fixed ts issue

* fixed tests

* trying to fix type inference

* Fixing more ts errors

* Revert tsconfig option

* Fix

* Fixed code

* More fixes

* fix tests

* Updated snapshot

* Chore: More ts strict null fixes

* More fixes in some really messed up azure config components

* More fixes, current count: 441

* 419

* More fixes

* Fixed invalid initial state in explore

* Fixing tests

* Fixed tests

* Explore fix

* More fixes

* Progress

* Sub 300

* Now at 218

* Progress

* Update

* Progress

* Updated tests

* at 159

* fixed tests

* Progress

* YAy blow 100! at 94

* 10,9,8,7,6,5,4,3,2,1... lift off

* Fixed tests

* Fixed more type errors

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2020-07-10 12:46:59 +02:00
Torkel Ödegaard
8aedf81133
Graph: Legend decimals now work as expected (#24931)
* Graph: Legend decimals now work as expected

* removed new test that I could not get green
2020-05-20 17:28:41 +02:00
Stephanie Closson
3acc318d72
Chore: reduce null check errors to 788 (currently over 798) (#23449)
* Fixed ts errors so build will succeed

* Update packages/grafana-data/src/types/graph.ts

Co-Authored-By: Ryan McKinley <ryantxu@gmail.com>

* Feedback from code review

* Leaving out trivial typing's

* Fix error with color being undefined now.

* fix test with timezone issue

* Fixed test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-04-09 08:29:36 +02:00
Arve Knudsen
15455ab593
CircleCI: Run golangci-lint in two batches (#23021)
* CircleCI: Run golangci-lint in two batches

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* CircleCI: Fix typo

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: adds fallback value to time series class

* Chore: changes fallback value from null to empty string in FilterInput component

* Update public/app/core/time_series2.ts

Co-Authored-By: Hugo Häggmark <hugo.haggmark@grafana.com>

* Chore: updates || to ?? operators

Co-authored-by: Lukas Siatka <lukasz.siatka@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2020-03-24 13:50:05 +01:00
Hendrik van Huyssteen
bf0d87aaf6 Graph: Add fill gradient option to series override line fill (#20941) 2019-12-10 09:09:48 +01:00
Ryan McKinley
d7c76dacad ValueFormats: dynamically create units (#20763)
* update fixed

* update fixed

* update fixed

* don't change any tests

* add mising space

* Custom unit formats

* return a string for kbn

* return a string for kbn

* return a string for kbn

* Simplify unit tests

* More units

* fix more tests

* fix more tests

* fix more tests

* format values

* format values

* TimeSeries to string

* more kbn tests

* use the formatted value

* BarGauge: Fixed font size calculations

* support prefix

* add si support

* avoid npe

* BarGauge/BigValue: value formatting

* fix some tests

* fix tests

* remove displayDateFormat

* another unicode char

* Graph: Use react unit picker

* Updated unit picker

* Fixed build errors

* more formatting

* graph2 tooltip formatting

* optional chaining
2019-12-04 09:08:07 +01:00
Gaurav M Shah
069d718b84 Graph: Added series override option to have hidden series be persisted (#20124) 2019-11-01 14:46:35 +01:00
Dominik Prokop
9b7748ec13
Chore: Reorg packages (#20111)
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data

* Move types from grafana-ui to grafana-data

* Move valueFormats to grafana-data

* Move utils from grafana-ui to grafana-data

* Update imports in grafana-ui

* revert data's tsconfig change

* Update imports in grafana-runtime

* Fix import paths in grafana-ui

* Move rxjs to devDeps

* Core import updates batch 1

* Import updates batch 2

* Imports fix batch 3

* Imports fixes batch i don't know

* Fix imorts in grafana-toolkit

* Fix imports after master merge
2019-10-31 10:48:05 +01:00
Dominik Prokop
0607189ed5
TimeSeries: Replace fieldName with fieldIndex (#19030) 2019-09-12 09:55:15 +02:00
Dominik Prokop
0994350e8b
TimeSeries: Add data frame index and field name (#19005) 2019-09-12 08:47:18 +02:00
Hugo Häggmark
b05afd7e4e
Explore: Moves GraphSeriesXY and DisplayValue to grafana/data (#18400)
* Chore: Move DisplayValue to grafana/data

* Chore: Move GraphSeriesXY to grafana/data
2019-08-06 10:49:54 +02:00
Ryan McKinley
401615847c
Build: add @grafana/data package (#17436)
first step in moving non-ui components to their own package
2019-06-18 08:17:27 -07:00
Hugo Häggmark
fb39831df2
Explore: Queries the datasource once per run query and uses DataStreamObserver (#17263)
* Refactor: Removes replaceUrl from actions

* Refactor: Moves saveState thunk to epic

* Refactor: Moves thunks to epics

* Wip: removes resulttype and queries once

* Refactor: LiveTailing uses observer in query

* Refactor: Creates epics folder for epics and move back actioncreators

* Tests: Adds tests for epics and reducer

* Fix: Checks for undefined as well

* Refactor: Cleans up previous live tailing implementation

* Chore: merge with master

* Fix: Fixes url issuses and prom graph in Panels

* Refactor: Removes supportsStreaming and adds sockets to DataSourcePluginMeta instead

* Refactor: Changes the way we create TimeSeries

* Refactor: Renames sockets to streaming

* Refactor: Changes the way Explore does incremental updates

* Refactor: Removes unused method

* Refactor: Adds back Loading indication
2019-06-03 14:54:32 +02:00
Torkel Ödegaard
e0b760e08e
Chore: No implict any fixes (#17020) 2019-05-13 09:38:19 +02:00
ryan
b2a7891b08 move stringToJsRegex 2019-03-09 23:50:46 -08:00
Jeff Hage
f13018ce05 Replace usages of kbn.valueFormats with ui/getValueFormat 2019-01-30 18:57:33 -05:00
Dominik Prokop
c8ac23f3c1 Rendering arrows for color picker, applying color changes to time series 2019-01-22 09:11:30 +01:00
Dominik Prokop
33fa40a1f3 Migrating color pickers to Popper from drop.js pt1 2019-01-22 09:11:30 +01:00
Patrick O'Carroll
552a61b6ae changed var to let in 50 files (#13075) 2018-08-30 09:03:11 +02:00
Patrick O'Carroll
a702603e7b changed var to const 2 (#13068)
* changed var to const

* fixed typo created in last commit

* added or empty object to options in prometheus/datasource
2018-08-29 14:27:29 +02:00
Torkel Ödegaard
9b978b7203
tslint: autofix of let -> const (#13033) 2018-08-26 17:14:40 +02:00
Mitsuhiro Tanda
04fcd2a054 add series override option to hide tooltip (#12378)
* add series override option to hide tooltip

* fix test

* invert option

* fix test

* remove initialization
2018-08-02 02:49:40 -07:00
Alexander Zobnin
24f6d34abd
graph: fix legend decimals precision calculation 2018-06-07 16:02:44 +03:00
Chris Rice
10f934d287 Add alpha color channel support for graph bars (#10956)
* Set fillColor in bars on load and on color change

* Change bar fill color on color override

* Added test for series overrides

* Moved bars fill color setting into time_series. Fixed issue with prev commit where you could not show bars because of series overrides.
2018-05-08 15:18:57 +02:00
Alexander Zobnin
1108101087 Fix tooltip unit when legend isn't shown (#10348)
* graph: fix tooltip unit when legend isn't shown, #10311

* fix broken tests (updateLegendValues() function)
2017-12-27 09:50:51 +01:00
Torkel Ödegaard
85879a7014 prettier: change to single quoting 2017-12-20 12:33:33 +01:00
Torkel Ödegaard
fadfc665e4 tech: ran pretttier on all typescript files 2017-12-19 16:06:54 +01:00
Torkel Ödegaard
35a7109a6a refactoring: fixing bug when all values are null 2017-12-08 11:45:44 +01:00
Torkel Ödegaard
c629a58b6d refactor: removed graph height from legend decimal calc 2017-12-07 18:13:56 +01:00
Alexander Zobnin
3cdf0dce56 graph: move auto decimals calc to ticks.ts and use it for legend values format. 2017-12-07 10:49:00 +03:00
Torkel Ödegaard
b986f744e4 fix: escape series name in graph legend, added aliasEscaped to time series model to reuse escape, fixes #9615 2017-10-23 10:15:58 +02:00
Alexander Zobnin
3184942aeb Fix NaN handling (#9469)
* graph: fix NaN formatting, #9012

* singlestat: prevent null value coloring, #9012, #8404

* timeseries: add tests for #9012 and move test file to TS
2017-10-10 14:25:57 +02:00
Torkel Ödegaard
491fa6cad8 tech: more tslint rules 2017-09-21 17:23:31 +02:00
Alin Sinpalean
5d4b8b5a5c Have 'Hide series with only zeros' ignore nulls (#9179)
* Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000.

* Have the 'Hide series with only zeros' option also apply to series with some null values.
2017-09-06 16:50:55 +02:00
Daniel Lee
3292a48381 graph: dashes with linewidth fix. Fixes #8469
Adds series override options for dash spaces and dash length.
2017-05-26 15:09:05 +02:00
Daniel Lee
6707d77af5 graph: dashes option only used in series overrides
Removes dashes option from Display tab so that it is only available
for series overrides. Also removes options for dash space and length
in series overrides and just uses the default values of 10 for both of
them.
2017-04-26 13:19:24 +02:00
smalik
1a3bc60e69 feat(dashed lines): Implementing dashed lines
Adding support for dashed lines using jquery.flot.dashes.js
2017-04-26 13:19:24 +02:00
Torkel Ödegaard
f1276774a0 typescript: updated tslint and fixed new warnings 2017-04-20 11:16:37 +02:00
Daniel Lee
28cf229707 Merge branch 'autologscale' of git://github.com/bigbenhur/grafana into bigbenhur-autologscale 2017-03-10 11:57:00 +01:00
oliverpool
2b932492c2 Add a diff aggregate
`diff = current - first` (when available)
2017-01-12 16:19:18 +01:00
Dirk le Roux
49dda7e5c1 first, delta, range passing unit tests
Signed-off-by: Dirk le Roux <dirk.leroux@gmail.com>
2016-11-29 08:26:31 +02:00
Torkel Ödegaard
71eb0f3278 fix(graph): fixed issue with bar width when used in series override, fixes #6528 2016-11-10 10:50:48 +01:00
Ben RUBSON
6495ba155a Correct timeStep in case of missing values (#6526)
* Correct timeStep in case of missing values

* Comment
2016-11-10 10:20:27 +01:00
Torkel Ödegaard
34f15d92d0 feat(testdata): worked on testdata app 2016-09-27 14:39:51 +02:00
bigbenhur
29b9d17faa fix crash due to zero or negative data values in graph with log scale 2016-06-03 22:30:38 +02:00