Commit Graph

57 Commits

Author SHA1 Message Date
Fabrizio
8beff98142
Update Prettier checks to parse also JSON files (#82046) 2024-02-09 13:16:40 +02:00
Josh Hunt
8f0ae76afe
Chore: Use yarn node-modules linker (#79947)
* Chore: Use yarn node-modules linker

* fix react-router types resolution

* temp skip failing tests

* remove yarn-links for internal path aliases to fix some webpack errors

* transpile all .ts files, even those in node_modules (usually our internal workspace packages

* fix transformers mock

* import react router type directly

* remove old resolution

* more cleanup

* remove preserveSymlinks: true from tsconfig to make Go To Definition resolve grafana ui to the original location

* developer guide

* update dev guide

* remove sdks

* reenable tests

* fix tsconfig trailing commas (where did they come from)
2024-01-29 14:27:35 +00:00
Andres Martinez Gotor
157ea31b03
Build testdata frontend standalone (#75833) 2023-10-16 17:31:43 +02:00
Dominik Prokop
61459e2b96
Bump scenes to 0.17.2 (#70893)
* Bump scenes to 0.17.2

* Update jest config

* Update tsconfig

* Update webpack config

* Update to latest API
2023-07-05 07:24:48 -07:00
Andre Pereira
afd39c18ba
Explore: Refactor trace view and move to core (#61938)
* Move TraceView to core grafana

* Remove unused code

* yarn install

* Remove jaeger-ui-components from CODEOWNERS and other tools

* Type fixes

* yarn install

* Remove mock that we no longer need

* Fix merge conflicts

* Re-add Apache license for trace view components

* Use an exclamation-circle instead of triangle to denote errors

* Remove eslint disables and update betterer results instead
2023-01-27 14:13:17 +00:00
Dominik Prokop
5dbbaab3f1
Scenes: Use @grafana/scenes (#60972)
* Use @grafana/scenes WIP

* Use @grafana/scenes package

* Use released @grafana/scenes

* Fix template_srv test
2023-01-10 03:30:53 -08:00
Ashley Harrison
803473f479
Chore: Enable useUnknownInCatchVariables for stricter type checking in catch blocks (#50591)
* wrap a bunch of errors

* wrap more things!

* fix up some unit tests

* wrap more errors

* tiny bit of tidy up
2022-06-15 08:59:29 +01:00
Zoltán Bedi
15b48fc188
Table: Add enable pagination option (#45732)
* Table: Add page size option / pagination

* Update docs/sources/visualizations/table/_index.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* FIx packages build

* Move pagination below footer

* Move styles to tableStyles

* Fix typecheck in jaeger-ui

* Set footer to hide onChange

* Styling tweaks

* Center paging

* Tweaks

* Change pageSize to enablePagination

* Move header and footer options to a separate category

* Fix performance and styling issue for the pagination

* Some more styling and tweaking

* Fix tests

* Update docs/sources/visualizations/table/_index.md

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Update docs/sources/visualizations/table/_index.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-03-31 09:36:04 +02:00
Jack Westbrook
efe9eed758
Chore: Move Typescript cache file to root (#45964)
* chore(typescript): move TS cache file to root of repo

* chore(typescript): cache packages ts checks to disk for faster yarn typecheck
2022-03-04 09:26:25 +01:00
Jack Westbrook
5fad5511e9
Build: Enable persistent cache for faster Webpack builds (#41430)
* build(webpack): enable caching for development and production builds

* build(webpack): introduce unminified production build script

* build(typescript): introduce incremental flag to cache typechecking

* chore(git): ignore typescript cache file

* chore(webpack): bump dependencies to latest
2021-11-11 14:32:34 +01:00
Josh Hunt
14ddb2939c
Chore: Enable strict Typescript checks (#41198)
* Chore: Enable strict Typescript checking

* Chore: Remove old strict budget checks
2021-11-02 15:23:44 +00:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Ryan McKinley
1c64f7d3ff
Chore: update typescript and tslib versions (#39389)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-22 21:15:37 +02:00
Ryan McKinley
9cd8e11c30
Geomap: add basic gazetteer support (#37082) 2021-07-21 23:41:27 -07:00
Hugo Häggmark
4b711372c5
Tests: Adds expects for observables (#28929)
* Tests: Adds expects for observables

* Refactor: renames matcher

* Chore: changed jest version and removed as dev dependency

* Refactor: Changes after PR review

* wip

* Chore: revert

* Chore: Adds jest-matcher-utils

* Chore: fixed merge error

* Tests: Removed inline snapshots as they are env dependent

* Tests: missed a snapshot

* Refactor: Removed type file after PR comments
2020-11-18 15:18:55 +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
Kirill Freiman
643735f590
tsconfig: set jsx option to "react" (#23335)
Explicit setting of this option helps to vscode properly work with .tsx files (https://github.com/Microsoft/vscode/issues/15814)
2020-04-03 13:48:41 -07:00
Andrej Ocenas
a4d4dd325f
Explore: Add trace UI to show traces from tracing datasources (#23047)
* Add integration with Jeager
Add Jaeger datasource and modify derived fields in loki to allow for opening a trace in Jager in separate split.
Modifies build so that this branch docker images are pushed to docker hub
Add a traceui dir with docker-compose and provision files for demoing.:wq

* Enable docker logger plugin to send logs to loki

* Add placeholder zipkin datasource

* Fixed rebase issues, added enhanceDataFrame to non-legacy code path

* Trace selector for jaeger query field

* Fix logs default mode for Loki

* Fix loading jaeger query field services on split

* Updated grafana image in traceui/compose file

* Fix prettier error

* Hide behind feature flag, clean up unused code.

* Fix tests

* Fix tests

* Cleanup code and review feedback

* Remove traceui directory

* Remove circle build changes

* Fix feature toggles object

* Fix merge issues

* Add trace ui in Explore

* WIP

* WIP

* WIP

* Make jaeger datasource return trace data instead of link

* Allow js in jest tests

* Return data from Jaeger datasource

* Take yarn.lock from master

* Fix missing component

* Update yarn lock

* Fix some ts and lint errors

* Fix merge

* Fix type errors

* Make tests pass again

* Add tests

* Fix es5 compatibility

Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2020-04-02 13:34:16 +02:00
Steven Vachon
f48169633c
TSLint → ESLint (#21006)
* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
2020-02-08 02:40:04 +01:00
Steven Vachon
f6130db03d
@grafana/toolkit: cleanup (#21441)
* Clarify readme for extended webpack config

* Add support for ES2019 features

* Build task: path.resolve → resolvePath

* Build task: avoid fs race conditions

* Build task: use async fs functions

* Build task: use rimraf directly

... because depending on the workspace parent to have it installed is fragile, and a child process is always slower.

* Build task: misc
2020-01-15 18:51:37 -05:00
kay delaney
c60882b497
Dev: Sets preserveSymlinks to false in top-level tsconfig (#19395)
* Dev: Sets `preserveSymlinks` to `false` in top-level tsconfig
Improves dev experience in vscode

* Removed preserveSymlinks from tsconfig since default option is false
2019-09-25 10:50:41 +01:00
kay delaney
68d6da77da
Chore: Update Slate to 0.47.8 (#19197)
* Chore: Update Slate to 0.47.8
Closes #17430
2019-09-23 12:26:05 +01:00
Dominik Prokop
503dccb771 Revert "Chore: Update Slate to 0.47.8 (#18412)" (#19167)
This reverts commit 601853fc84.
2019-09-17 13:21:50 +02:00
kay delaney
601853fc84 Chore: Update Slate to 0.47.8 (#18412)
* Chore: Update Slate to 0.47.8
Closes #17430

* Add slate and immutable to grafana-ui deps

* Fixes some small regressions introduced

* Fix suggestions for multiple query fields

* Pin upgraded dependencies

* Prettier fix

* Remove original slate-react dependency

* Fix tiny-invariant dep

* (Temporarily) comments out source maps for grafana-ui
2019-09-17 13:16:24 +02:00
Tobias Skarhed
1db9fff056 strictNullChecks: First batch (#18390)
* First batch of strictNullChecks

* Remove undefined

* Check an alternative solution

* Fix strict nullChecks

* Low hanging strictNullChecks

* Fixing strict nulls issues and more

* Minor change

* fixed unit test

* Fix feedback

* Update public/vendor/ansicolor/ansicolor.ts

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

* Update public/vendor/ansicolor/ansicolor.ts

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

* Update public/vendor/ansicolor/ansicolor.ts

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

* Fix build errors
2019-08-12 16:11:06 +02:00
Tobias Skarhed
83da3660da
Chore: noImplictAny no errors left (#18303)
* Add types and rewrite datasourceChanged to async/await
2019-08-01 14:38:34 +02:00
Johannes Schill
f30e5cce59 Chore: Bump ts-node to 8.1.0 (#17093) 2019-05-15 14:40:53 +02:00
Hugo Häggmark
a4d287d2e1
Tests: Adds end-to-end tests skeleton and basic smoke test scenario (#16901)
* Chore: Adds neccessary packages

* Wip: Initial dummy test in place

* Feature: Downloads Chromium if needed

* Fix: Adds global config object

* Refactor: Adds basic e2eScenario

* Build: Adds end to end tests to config

* Build: Changes end to end job

* Build: Adds browsers to image

* Build: Adds failing test

* Refactor: Adds first e2e-test scenario

* Fix: Ignores test output in gitignore

* Refactor: Adds compare screenshots ability

* Refactor: Removes unnecessary code

* Build: Removes jest-puppeteer

* Fix: Replaces test snapshots

* Refactor: Creates output dir if missing

* Refactor: Changes aria-labels to be more consistent

* Docs: Adds section about end to end tests

* Fix: Fixes snapshots

* Docs: Adds information about ENV variables
2019-05-08 16:50:21 +02:00
Dominik Prokop
c2e9daad1e
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
2019-03-25 12:08:28 +01:00
Torkel Ödegaard
42c87141a5 Minor progress on fixing no-implicit any issues 2019-03-19 18:24:47 +01:00
Torkel Ödegaard
37496fe6a8 Fixed more typescript no implicit any issues 2019-03-12 17:55:01 +01:00
David Kaltschmidt
26236b4bc3 fix(renderer): Vendor ansicolor as typescript
Fixes #15635

Importing ansicolor from node_modules or vendored as is failed because
there is no ES5 transpiler configured for ES6 libs.

- remove ansicolor from package.json
- add ansicolor to public/vendor/ansicolor and port to typescript
- adapt all ansicolor imports
- add `public/vendor` as a path to be considered by ts compiler
2019-03-06 14:22:59 +01:00
Dominik Prokop
2991b64b60 Merge branch 'grafana-ui/move-spectrum' into tooling/storybook-poc 2019-01-15 16:14:01 +01:00
Dominik Prokop
b3b1c21d77 Fixed Gauge being cropped when resizing panel
Enabled import of SASS viariables into TS
2019-01-14 09:45:55 +01:00
Dominik Prokop
0fb23bd334 WIP 2019-01-09 09:40:57 +01:00
Torkel Ödegaard
19da963a19 Typings issues 2018-12-25 08:55:44 +01:00
Torkel Ödegaard
80d6ef535d tsconfig: started on setting noImplicitThis to true 2018-08-30 08:53:13 +02:00
Torkel Ödegaard
ceadced6f0 tsconfig: format file 2018-08-30 08:33:29 +02:00
David Kaltschmidt
84e431d377 Add tslib to TS compiler
- using tslib reduces bundle sizes
- add compiler option for easier default imports of CJS modules
- remove double entry of fork-ts-checker-plugin
- speed up hot reload by using exprimental ts-loader API
2018-07-25 17:06:44 +02:00
Torkel Ödegaard
ee216ba6fb poc: mobx test 2017-12-20 10:53:16 +01: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
Daniel Lee
0841eb94a8 build: add noUnusedLocals to tsc parameters 2017-10-05 11:37:00 +02:00
Torkel Ödegaard
0c86241c5b Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
2017-10-01 20:02:25 +02:00
Torkel Ödegaard
7b42e13c79 typescript: stricter typescript option 2017-09-26 11:24:58 +02:00
Torkel Ödegaard
8fe21b43e9 tech: updated tsconfig 2017-09-21 17:34:22 +02:00
Torkel Ödegaard
b8d9722b4f tech: removing unused variables from typescript files, and making tslint rules more strict 2017-09-21 16:40:18 +02:00
Torkel Ödegaard
84b1519480 tech: initial react poc 2017-09-20 17:44:23 +02:00
Torkel Ödegaard
87f5222907 typescript: fixed issue with tslint in testsW 2017-05-17 13:43:17 +02:00
Torkel Ödegaard
40b359334b fix(typescript): fixed sourcemap issue, #6904 2016-12-12 14:24:36 +01:00
Gabriel Nepomuceno
2f46c56672 removing type validation because copy needs to be done first 2016-12-09 23:41:07 +00:00