Commit Graph

2062 Commits

Author SHA1 Message Date
Torkel Ödegaard
68562a2077 Merge branch 'master' into develop 2017-10-24 11:02:48 +02:00
Patrick O'Carroll
a8285d0eb4 shore: migrating config/settings.js to typescript 2017-10-24 10:45:46 +02:00
utkarshcmu
a4a10f2b03 Fixed #9636 2017-10-24 00:49:03 -07:00
Torkel Ödegaard
b44daaabf2 Merge branch 'master' into develop 2017-10-24 09:06:09 +02:00
Alexander Zobnin
396eadc5ac Use d3 from node_modules (#9625)
* tech: annotations refactor, add tests for regions processing

* tech: move d3 to npm and webpack, #9480

* tech: move color scale functions to separate module

* fix opacity legend rendering
2017-10-23 20:30:43 +02:00
bergquist
d25d689efa tests: removes commented tests 2017-10-23 11:32:34 +02:00
bergquist
fcd5d581a8 graph: invert order when sorting by legend
sort order have now been inverted. Biggest values should
be at bottom of the graph.

ref #9538
2017-10-23 11:32:09 +02: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
Torkel Ödegaard
4632b8daa5 build: another build fix 2017-10-22 18:10:22 +02:00
Torkel Ödegaard
7a277c69ac tests: migrated two more tests to jest 2017-10-22 17:36:50 +02:00
Torkel Ödegaard
fff0fa2aee Merge branch 'master' into develop 2017-10-22 11:51:14 +02:00
Torkel Ödegaard
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
Carl Bergquist
1d7a0db54b Sort series in the same order as legend in graph panel (#9563)
* graph: sort series in the same order as legend

closes #9538

* style: use function arrows

* graph: remove sort by legend option

sort series based on legend by default is sort order
is set and stack is enabled

* graph: remove useless sort

* graph: make code simpler
2017-10-19 13:04:02 +02:00
Carl Bergquist
e8141b48d2 Merge pull request #9555 from mtanda/prometheus_46_improve_minor_fix
(prometheus) minor fix of auto complete
2017-10-19 10:42:34 +02:00
Sven Klemm
b2d880c6de modify $__timeGroup macro so it can be used in select clause (#9527)
* modify $__timeGroup macro so it can be used in select clause

* fix $__interval_ms for postgres datasource

* use $__timeGroup macro in documentation

* fix annotation template query
remove title since its no longer used and add tags instead

* change __timeFilter macro to work on postgresql < 8.1 and redshift
2017-10-18 18:10:01 +02:00
Alexander Zobnin
92c67e8c83 Fix heatmap Y axis rendering (#9580)
* heatmap: fix Y axis rendering, #9576

* heatmap: fix color legend rendering
2017-10-18 15:19:20 +02:00
bergquist
c2c5f529f3 prometheus: add builtin template variable as range vectors
add $__interval and $__interval_ms as range vectors to
prometheus editor
2017-10-18 14:03:23 +02:00
Carl Bergquist
e8da084baf Merge pull request #9561 from mtanda/prometheus_46_fix_range
(prometheus) fix to show vector range popup
2017-10-18 13:39:57 +02:00
Torkel Ödegaard
8d68bd6bb9 fix: fixed prometheus step issue that caused browser crash, fixes #9575 2017-10-18 13:28:18 +02:00
Torkel Ödegaard
039fc2964a fix: getting started panel and mark adding data source as done, fixes #9568 2017-10-18 12:02:57 +02:00
Mitsuhiro Tanda
8a43d4e25c fix vector range 2017-10-17 21:27:04 +09:00
Carl Bergquist
5910453e8a Merge pull request #9560 from mtanda/prometheus_46_metric_name_matching
(prometheus) allow ":" character for metric name
2017-10-17 13:34:25 +02:00
Mitsuhiro Tanda
ebebbddb2d allow ":" character for metric name 2017-10-17 19:44:59 +09:00
Torkel Ödegaard
d8230f8fa7 Merge branch 'master' into develop 2017-10-17 11:17:28 +02:00
Mitsuhiro Tanda
0f87279ab8 fix template variable expanding 2017-10-17 18:11:21 +09:00
Mitsuhiro Tanda
c4c64365f1 remove duplicative prometheus function 2017-10-17 12:24:29 +09:00
Mitsuhiro Tanda
c51f84a12e remove label match operator from keyword.operator 2017-10-17 12:19:56 +09:00
Mitsuhiro Tanda
8580b78ce6 remove label match operator from keyword.operator 2017-10-17 12:19:42 +09:00
Mitsuhiro Tanda
cc1e69ace3 remove extra state push 2017-10-17 11:50:33 +09:00
Mitsuhiro Tanda
7edc95cc35 (cloudwatch) fix cloudwatch query error over 24h (#9536)
fix cloudwatch query error over 24h
2017-10-16 08:31:05 +02:00
Mitsuhiro Tanda
40b11654fd show error message when cloudwatch datasource can't add 2017-10-16 13:05:53 +09:00
Torkel Ödegaard
88ceb19d96 Merge branch 'master' into develop 2017-10-12 16:32:44 +02:00
Daniel Lee
4bdc3a5829 graph: fix y-axis decimalTick check. Fixes #9405 2017-10-12 12:45:20 +02:00
Torkel Ödegaard
9358d0c6f7 Merge branch 'develop' of github.com:grafana/grafana into develop 2017-10-11 16:48:30 +02:00
Torkel Ödegaard
ad1d69861e Merge branch 'master' of github.com:grafana/grafana into develop 2017-10-11 16:47:16 +02:00
Torkel Ödegaard
331b50dcaa grid: edit/view now works 2017-10-11 16:32:05 +02:00
Torkel Ödegaard
d8e4decc60 grid: fixed migration for rows without height 2017-10-11 14:36:25 +02:00
Daniel Lee
7713009caa postgres: add missing ngInject decorator 2017-10-11 09:15:55 +02:00
Daniel Lee
d1c9760fa8 Postgres Data Source (#9475)
* add postgresql datasource

* add rest of files for postgres datasource

* fix timeseries query, remove unused code

* consistent naming, refactoring

* s/mysql/postgres/

* s/mysql/postgres/

* couple more tests

* tests for more datatypes

* fix macros for postgres

* add __timeSec macro

* add frontend for postgres datasource

* adjust documentation

* fix formatting

* add proper plugin description

* merge editor changes from mysql

* port changes from mysql datasource

* set proper defaultQuery for postgres

* add time_sec to timeseries query
accept int for value for timeseries query

* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column

* fix tslint error

* handle decimal values in timeseries query

* allow setting sslmode for postgres datasource

* use type switch for handling data types

* fix value for timeseries query

* refactor timeseries queries to make them more flexible

* remove debug statement from inner loop in type conversion

* use plain for loop in getTypedRowData

* fix timeseries queries

* adjust postgres datasource to tsdb refactoring

* adjust postgres datasource to frontend changes

* update lib/pq to latest version

* move type conversion to getTypedRowData

* handle address types cidr, inet and macaddr

* adjust response parser and docs for annotations

* convert unknown types to string

* add documentation for postgres datasource

* add another example query with metric column

* set more helpful default query

* update help text in query editor

* handle NULL in value column of timeseries query

* add __timeGroup macro

* add test for __timeGroup macro

* document __timeGroup and set proper default query for annotations

* fix typos in docs

* add postgres to list of datasources

* add postgres to builtInPlugins

* mysql: refactoring as prep for merging postgres

Refactors out the initialization of the xorm engine and the query logic
for an sql data source.

* mysql: rename refactoring + test update

* postgres:refactor to use SqlEngine(same as mysql)

Refactored to use a common base class with the MySql data source.

Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint

Fixes #9209 (the original PR)

* postgres: encrypt password on config page

With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.

* postgres: change back col name to time from time_sec

* postgres mysql: remove annotation title

Title has been removed from annotations

* postgres: fix images for docs page

* postgres mysql: fix specs
2017-10-10 15:19:14 +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
10a3504309 grid: progress on new grid, resize & saving layouts works 2017-10-10 14:20:53 +02:00
Daniel Lee
002b4d3403 mysql: fix interpolation for numbers in temp vars 2017-10-10 11:59:44 +02:00
Torkel Ödegaard
647a3cc5ae Merge branch 'master' into develop 2017-10-09 16:01:54 +02:00
Alexander Zobnin
a174ad4c9a Unified Color picker fixes (#9466)
* colorpicker: fix opening error when color is undefined

* colorpicker: replace spectrum picker by new color picker

* colorpicker: remove old spectrum picker directive

* annotations: use tinycolor for working with region colors
2017-10-09 13:54:14 +02:00
Axel
6ce990af57 Show min interval query option for mixed datasource (#9467) 2017-10-09 12:56:34 +02:00
Torkel Ödegaard
b228c23dbe testing: fixing tests 2017-10-07 22:05:31 +02:00
Torkel Ödegaard
25aa9df270 Create annotations (#8197)
* annotations: add 25px space for events section

* annotations: restored create annotation action

* annotations: able to use fa icons as event markers

* annotations: initial emoji support from twemoji lib

* annotations: adjust fa icon position

* annotations: initial emoji picker

* annotation: include user info into annotation requests

* annotation: add icon info

* annotation: display user info in tooltip

* annotation: fix region saving

* annotation: initial region markers

* annotation: fix region clearing (add flot-temp-elem class)

* annotation: adjust styles a bit

* annotations: minor fixes

* annoations: removed userId look in loop, need a sql join or a user cache for this

* annotation: fix invisible events

* lib: changed twitter emoij lib to be npm dependency

* annotation: add icon picker to Add Annotation dialog

* annotation: save icon to annotation table

* annotation: able to set custom icon for annotation added by user

* annotations: fix emoji after library upgrade (switch to 72px)

* emoji: temporary remove bad code points

* annotations: improve icon picker

* annotations: icon show icon picker at the top

* annotations: use svg for emoji

* annotations: fix region drawing when add annotation editor opened

* annotations: use flot lib for drawing region fill

* annotations: move regions building into event_manager

* annotations: don't draw additional space if no events are got

* annotations: deduplicate events

* annotations: properly render cut regions

* annotations: fix cut region building

* annotations: refactor

* annotations: adjust event section size

* add-annotations: fix undefined default icon

* create-annotations:  edit event (frontend part)

* fixed bug causes error when hover event marker

* create-annotations:  update event (backend)

* ignore grafana-server debug binary in git (created VS Code)

* create-annotations: use PUT request for updating annotation.

* create-annotations: fixed time format when editing existing event

* create-annotations: support for region update

* create-annotations: fix bug with limit and event type

* create-annotations: delete annotation

* create-annotations: show only selected icon in edit mode

* create-annotations: show event editor only for users with at least Editor role

* create-annotations: handle double-sized emoji codepoints

* create-annotations: refactor

use CP_SEPARATOR from emojiDef

* create-annotations: update emoji list, add categories.

* create-annotations: copy SVG emoji into public/vendor/npm and use it as a base path

* create-annotations: initial tabs for emoji picker

* emoji-picker: adjust styles

* emoji-picker: minor refactor

* emoji-picker: refactor - rename and move into one directory

* emoji-picker: build emoji elements on app load, not on picker open

* emoji-picker: fix emoji searching

* emoji-picker: refactor

* emoji-picker: capitalize category name

* emoji-picker: refactor

move buildEmojiElem() into emoji_converter.ts for future reuse.

* jquery.flot.events: refactor

use buildEmojiElem() for making emojis, remove unused code for font awesome based icons.

* emoji_converter: handle converting error

* tech: updated

* merged with master

* shore: clean up some stuff

* annotation: wip tags

* annotation: filtering by tags

* tags: parse out spaces etc. from a tags string

* annotations: use tagsinput component for tag filtering

* annotation: wip work on how we query alert & panel annotations

* annotations: support for updating tags in an annotation

* linting

* annotations: work on unifying how alert history annotations and manual panel annotations are created

* tslint: fixes

* tags: create tag on blur as well

Currently, the tags directive only creates the tag when the
user presses enter. This change means the tag is created on
blur as well (when the user clicks outside the input field).

* annotations: fix update after refactoring

* annotations: progress on how alert annotations are fetched

* annotations: minor progress

* annotations: progress

* annotation: minor progress

* annotations: move tag parsing from tooltip to ds

Instead of parsing a tag string into an array in the annotation_tooltip
class, this moves the parsing to the datasources. InfluxDB ds already
does that parsing. Graphite now has it.

* annotations: more work on querying

* annotations: change from tags as string to array

when saving in the db and in the api.

* annotations: delete tag link if removed on edit

* annotation: more work on depricating annotation title

* annotations: delete tag links on delete

* annotations: fix for find

* annotation: added user to annotation tooltip and added alertName to annoation dto

* annotations: use id from route instead from cmd for updating

* annotations: http api docs

* create annotation: last edits

* annotations: minor fix for querying annotations before dashboard saved

* annotations: fix for popover placement when legend is on the side (and doubel render pass is causing original marker to be removed)

* annotations: changing how the built in query gets added

* annotation: added time to header in edit mode

* tests: fixed jshint built issue
2017-10-07 10:31:39 +02:00
Lucas Costa
43903d71ec fix: threshold's colors in table panels (#9445) (#9453) 2017-10-06 17:05:26 +02:00
Alexander Zobnin
5561a099b0 singlestat: fix sizing bug #9337 (#9448) 2017-10-06 13:41:39 +02:00
Torkel Ödegaard
7af4daf23b Revert "Fix coloring in singlestat if null value (#9438)" (#9443)
This reverts commit 213ba0377b.
2017-10-05 20:29:06 +02:00