Commit Graph

72 Commits

Author SHA1 Message Date
Marcus Andersson
7aa6926ef6
GraphNG: adding possibility to toggle tooltip, graph and legend for series (#29575) 2021-01-06 12:40:32 -08:00
Hugo Häggmark
112a755e18
Variables: Adds new Api that allows proper QueryEditors for Query variables (#28217)
* Initial

* WIP

* wip

* Refactor: fixing types

* Refactor: Fixed more typings

* Feature: Moves TestData to new API

* Feature: Moves CloudMonitoringDatasource to new API

* Feature: Moves PrometheusDatasource to new Variables API

* Refactor: Clean up comments

* Refactor: changes to QueryEditorProps instead

* Refactor: cleans up testdata, prometheus and cloud monitoring variable support

* Refactor: adds variableQueryRunner

* Refactor: adds props to VariableQueryEditor

* Refactor: reverted Loki editor

* Refactor: refactor queryrunner into smaller pieces

* Refactor: adds upgrade query thunk

* Tests: Updates old tests

* Docs: fixes build errors for exported api

* Tests: adds guard tests

* Tests: adds QueryRunner tests

* Tests: fixes broken tests

* Tests: adds variableQueryObserver tests

* Test: adds tests for operator functions

* Test: adds VariableQueryRunner tests

* Refactor: renames dataSource

* Refactor: adds definition for standard variable support

* Refactor: adds cancellation to OptionPicker

* Refactor: changes according to Dominiks suggestion

* Refactor:tt

* Refactor: adds tests for factories

* Refactor: restructuring a bit

* Refactor: renames variableQueryRunner.ts

* Refactor: adds quick exit when runRequest returns errors

* Refactor: using TextArea from grafana/ui

* Refactor: changed from interfaces to classes instead

* Tests: fixes broken test

* Docs: fixes doc issue count

* Docs: fixes doc issue count

* Refactor: Adds check for self referencing queries

* Tests: fixed unused variable

* Refactor: Changes comments
2020-11-18 15:10:32 +01:00
Domas
3423ef864c
respect fronted-logging.enabled flag (#29107) 2020-11-17 08:49:39 +01:00
Domas
76df096791
Logging: Log frontend errors (#28073)
* basic frontend  Sentry integration

* backend endpoint to capture sentry events

* WIP!

* log user email for frontend logs

* remove debug logging

* lint fixes

* Fix type exports & property names

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* additional struct naming fix

* rename log endpoint, config section & interface

* add sentry sample rate to config

* refac to use EchoSrv

* log user id

* backend tests

* tests for SentryEchoBackend

* sentry echo backend tests

* CustomEndpointTransport tests

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update conf/defaults.ini

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/api/frontend_logging_test.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* don't export unnecesasrily

* update go.sum

* get rid of Convey in tests, use stdlib

* add sentry config to sample.ini

* cleanup to set orig logging handler in test

* Apply suggestions from code review

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* PR feedback changes

* lock sentry version

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-12 12:29:43 +01:00
Torkel Ödegaard
c3ed644f66
Marked: Upgrade and always sanitize by default (#28796)
* Marked: Upgrade and always sanitize by default

* Added test

* corrected text panel logic
2020-11-05 09:40:12 +01:00
Torkel Ödegaard
5a11abe954
Events: Remove unused or unnecessary events (#28783)
* Events: Removing unused or unnessary events

* More cleanup

* Updated
2020-11-03 15:29:43 +01:00
Torkel Ödegaard
b35d4e1e8e
Dependencies: Update angularjs to 1.8.2 (#28736)
* Angular: Update to angukar v1.8 with backward compatability monkey patches

* Update fix

* Updated

* Updated

* Fixes

* Update wording

* Update
2020-11-03 13:18:10 +01:00
Torkel Ödegaard
a9cdc4b129
Dependencies: Remove unused dependency (#28711)
* Dependencies: Remove unused dependency

* Remove import

* Updated
2020-11-02 12:54:57 +01:00
kevin.xu
98f7a2ace0
Update app.ts (#27673)
fix typo
2020-09-21 16:56:33 +01:00
Mitsuhiro Tanda
077aec465c
Implicit import symbol-observable to avoid inconsistent symbol (#26288) 2020-07-14 09:25:17 +02:00
Marcus Andersson
1abbb477cf
TimeZone: unify the time zone pickers to one that can rule them all. (#24803)
* draft on a unified TimeZonePicker.

* most of the data structures is in place.

* wip.

* wip.

* wip: timezone selector in progress.2

* fixed so we have proper data on all timezones.

* started to add timezone into time picker.

* addeing time zone footer.

* footer is working.

* fixed so we use the timeZone picker in shared preferences.

* Added so we can change timeZone from picker.

* did some styling changes.

* will update timezone on all places that we need to update it.

* removed console.log

* removed magic string.

* fixed border on calendar.

* ignoring eslint cache.

* cleaned up the code a bit.

* made the default selectable.

* corrected so the behaviour about default works as expected.

* excluded timezone from change tracker.

* revert so default will always be the intial value.

* default will always fallback to the one in the config.

* do the country mapping on startup.

* fixed nit.

* updated snapshots for timepicker.

* fixed build errors.

* updating so snapshot tests is in sync.

* removed Date.now from prop since it will change each run in the snapshot tests.

* fixed so e2e tests works as before.

* moved files into separate folders.
2020-06-26 09:08:15 +02:00
Peter Holmberg
0da72131b9
Table: Make last cell value visible when right aligned (#24921)
* add some padding to accommodate for vertical scrollbar

* use theme spacing

* Move padding to inner div and make it use actual scrollbar width

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-05-25 14:26:44 +02:00
Ryan McKinley
e36a6ac476
TransformersUI: move transformer ui to grafana app (#24360) 2020-05-07 10:53:58 -07:00
Marcus Andersson
1a0c1a39e4
DateTime: adding support to select preferred timezone for presentation of date and time values. (#23586)
* added moment timezone package.

* added a qnd way of selecting timezone.

* added a first draft to display how it can be used.

* fixed failing tests.

* made moment.local to be in utc when running tests.

* added tests to verify that the timeZone support works as expected.

* Fixed so we use the formatter in the graph context menu.

* changed so we will format d3 according to timeZone.

* changed from class base to function based for easier consumption.

* fixed so tests got green.

* renamed to make it shorter.

* fixed formatting in logRow.

* removed unused value.

* added time formatter to flot.

* fixed failing tests.

* changed so history will use the formatting with support for timezone.

* added todo.

* added so we append the correct abbrivation behind time.

* added time zone abbrevation in timepicker.

* adding timezone in rangeutil tool.

* will use timezone when formatting range.

* changed so we use new functions to format date so timezone is respected.

* wip - dashboard settings.

* changed so the time picker settings is in react.

* added force update.

* wip to get the react graph to work.

* fixed formatting and parsing on the timepicker.

* updated snap to be correct.

* fixed so we format values properly in time picker.

* make sure we pass timezone on all the proper places.

* fixed so we use correct timeZone in explore.

* fixed failing tests.

* fixed so we always parse from local to selected timezone.

* removed unused variable.

* reverted back.

* trying to fix issue with directive.

* fixed issue.

* fixed strict null errors.

* fixed so we still can select default.

* make sure we reads the time zone from getTimezone
2020-04-27 15:28:06 +02:00
Dominik Prokop
58257a95a3
Transformations: Refactor to use single registry for transformations (#23502)
* Use single registry for transformations

* Fix transformations tests

* Added documentation comments and minor refactor

* Added documentation comments and minor refactor
Minor misunderstanding between me and Typescript. We should be good friends back now.

* Fix registry import
2020-04-10 19:21:49 +02:00
Torkel Ödegaard
278c312d58
React: Add why-did-you-render dev extension to better see what components re-render and why (in console) (#23455)
* React: Add why-did-you-render dev extension to better understand what components re-renders

* Lock version

* Updated yarn locj
2020-04-09 19:44:05 +02:00
Dominik Prokop
4eae1b5483
NewPanelEditor: fluent API for custom field config and panel options creation (#23070)
* Registry of standard option editors

* Move override processors  to grafana data

* API for declaratively creating field config/panel options

* Enable declarative API in PanelPlugin for options and field config

* Use new api in react table panel

* Add color and unit picker to option registries

* Add some docs and tests

* Fix tests
2020-03-26 21:48:46 +01:00
Hugo Häggmark
cf5064bfa0
Variables: replaces homegrown variableAdapters with Registry (#22866)
* Refactor: intial commit

* Tests: fixes tests

* Refactor: adds stricter typings
2020-03-23 15:33:17 +01:00
Ryan McKinley
2c9b321c48
FieldOverides: apply field overrides based on configuration (#22047)
* test apply

* test apply

* Move standard field config editor registry to grafana-data

* merge master

* Apply field config defaults

* Make field and dataFrameIndex optional on on FieldOverrideContext

* Apply custom field config overrides

* Gauge - make sure thresholds are set

* Move series and field scoped vars calculation

* Enable template variables interpolation in title fields

* Expose standars field configs from grafana ui via function

* Add missing option to the config for the min value to be derived from field values

* Fix ts issue

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-02-13 21:37:24 +01:00
Steven Vachon
9005b484f0
Replace ts-loader with Babel (#21587)
* Applied prettier to relevant webpack configs

* Replaced ng-annotate with babel-plugin-angularjs-annotate

… and replaced ts-loader with @preset/typescript

* Removed redundant import

… that is problematic with Babel's module resolver

* Updated lockfile

* Traspile debug package to es5 for PhantomJS support

* Update babel to latest version

* Remove @babel/poolyfill and url search params polyfill

* Add ts-loader to grafana-ui dependencies

* Update prod webpack build to use cor-js 3

* Applied prettier to relevant webpack configs

* Replaced ng-annotate with babel-plugin-angularjs-annotate

… and replaced ts-loader with @preset/typescript

* Updated lockfile

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-30 10:54:11 +01:00
Dominik Prokop
cdfac32dfd
PhantomJS: Fix rendering of panels using Prometheus datasource
In 043bb59 a URLSearchParams usage was introduced which is not supported by PhantomJS. @babel/polyfill(deprecated) does not contain polyfill for URLSearchParams, hence the code (and Prometheus graphs rendering) was failing in PhantomJS environment.

The solution is to add https://www.npmjs.com/package/url-search-params-polyfill that takes care of the URLSearchParams
2020-01-23 13:10:38 +01:00
Hugo Häggmark
5dddc91ba5
Chore: Fixes PhantomJs by adding polyfills for fetch and AbortController (#21655)
* Chore: Fixes PhantomJs rendering

* Docs: Updated docs

* Update contribute/style-guides/e2e.md

Co-Authored-By: Dominik Prokop <dominik.prokop@grafana.com>

* Docs: Updates docs according to PR comments

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-22 08:15:31 +01:00
Marcus Efraimsson
71382ae7ed phantomjs: performance.getEntriesByType not supported (#21009) 2019-12-16 09:40:12 +01:00
Dominik Prokop
178bb1d3ab Echo: mechanism for collecting custom events lazily (#20365)
* Introduce Echo for collecting frontend metrics

* Update public/app/core/services/echo/Echo.ts

Co-Authored-By: Peter Holmberg <peterholmberg@users.noreply.github.com>

* Custom meta when adding event

* Rename consumer to backend

* Remove buffer from Echo

* Minor tweaks

* Update package.json

* Update public/app/app.ts

* Update public/app/app.ts

* Collect paint metrics when collecting tti. Remove echoBackendFactory

* Update yarn.lock

* Move Echo interfaces to runtime

* progress on meta and echo

* Collect meta analytics events

* Move MetaanalyticsBackend to enterprise repo

* Fixed unit tests

* Removed unused type from test

* Fixed issues with chunk loading (reverted index-template changes)

* Restored changes

* Fixed webpack prod
2019-12-05 08:30:39 +01:00
Peter Holmberg
31a346fcf2 Core: Show browser not supported notification (#19904)
* display appEvent on load

* move to app.ts, create util and tests

* adding case for ie edge

* Updated browser notice text
2019-10-23 10:30:31 +02:00
Hugo Häggmark
c8b195147e
Chore: Fixes some strict errors (#18381) 2019-08-05 12:07:35 +02:00
Ryan McKinley
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
Torkel Ödegaard
bd4a7ddf3a
TimePicker: Style and responsive fixes, restored dashboard settings (#17822)
* TimePicker: Restore time picker settings

* CleanUp: removed unuused angular-ui (calendar) components

* Fix angular boot dependency list

* TimePicker: set time to 23:59:00 when setting To time using calendar
2019-07-01 10:16:33 +02:00
Tobias Skarhed
8541214c9e
Markdown: Replace rendering library (#17686)
* Replace remarkable with marked

* Add wrapper and options for marked
2019-06-26 13:15:45 +02:00
Hugo Häggmark
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
Hugo Häggmark
7eabc282e9
Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
Ryan McKinley
d6887bf77f Plugins: Optionally preload some plugins during frontend app boot (#15266)
* auto load

* update comments

* gofmt

* use preload from json

* fix formatting

* change general plugin loader to app

* Refactoring: Plugin preloading #15266
2019-04-11 08:02:22 +02:00
Hugo Häggmark
aa4b593dfa chore: Cleaning up implicit anys in app.ts
progress: #14714
2019-03-15 01:59:16 -07:00
Johannes Schill
45fc9c1860 fix: Enable -webkit-scrollbar related css when there's no overlay scrollbar #14807 2019-01-24 12:43:25 +01:00
David Kaltschmidt
c1347e4ecb WIP babel 7 2018-10-29 12:20:10 +01:00
Torkel Ödegaard
543c67a297 react panels: got data 2018-10-14 16:31:20 +02:00
Torkel Ödegaard
c1fd4265a9 renamed extension point in the frontend 2018-10-12 07:19:05 +02:00
Torkel Ödegaard
69e0311cbc Merge branch '13425-team-picker-bug' 2018-10-11 12:52:48 -07:00
Torkel Ödegaard
abef94b0da made it possible to have frontend code in symlinked folders that can add routes 2018-10-11 12:36:04 +02:00
Johannes Schill
f552a7a421 Replace System.import() with import() to get rid of warning 2018-10-10 14:15:26 +02:00
Patrick O'Carroll
72ab24f300 Changed functions to arrow functions for only-arrow-functions rule. (#13131) 2018-09-05 07:47:30 +02:00
Patrick O'Carroll
7837ee4466 Updated rules for variable name (#13106)
* updated rules for variable name and fixed files that didn't follow new rules

* fixed test so it uses new rule

* made exceptions to rule in interval_variable
2018-09-03 11:00:46 +02:00
Torkel Ödegaard
e1beaaa0f7
tslint: tslint to const fixes part3 (#13036) 2018-08-26 21:52:57 +02:00
Torkel Ödegaard
27835f373e cleanup: removed unused typescript typings import 2018-01-04 10:12:02 +01:00
Torkel Ödegaard
4181602b78 react: progress on react containers and mobx-state-tree store 2017-12-21 11:56:45 +01:00
Torkel Ödegaard
3a1f52d8a2 prettier: ran on all files again, sorry. now settings are defined in package.json 2017-12-21 08:39:31 +01:00
Torkel Ödegaard
354913a704 mobx: progress on poc 2017-12-20 17:24:04 +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
2bc23d2063 tech: updated ngreact and with custom PR applied 2017-12-08 12:26:19 +01:00