Commit Graph

32 Commits

Author SHA1 Message Date
Torkel Ödegaard
b0ffcfd558
Babel: Refactoring config so that it's shared and removes legacy plugin (#32559)
* Updated plugins

* Fixing stuff

* Update

* Fixing more stuff
2021-03-31 19:09:19 +02:00
Torkel Ödegaard
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
Zoltán Bedi
ae30482465
Chore: MEGA - Make Eslint Great Again 💅 (#26094)
* Fix lint error in types.ts

* Bump eslint and its deps to latest

* Add eslintignore and remove not needed eslintrcs

* Change webpack configs eslint config

* Update package.jsons and removed unused eslintrc files

* Chore yarn lint --fix 💅

* Add devenv to eslintignore

* Remove eslint disable comments for rules that are not used

* Remaining eslint fixes 💅

* Bump grafana/eslint-config 💥

* Modify package.json

No need for duplicate checks.

* Modify eslintignore to ignore data and dist folders

* Revert removing .eslintrc to make sure not to use certain packages

* Modify package.json to remove not needed command

* Use gitignore for ignoring paths
2020-08-11 17:52:44 +02:00
Zoltán Bedi
c16890c22d
Chore: use fork-ts-checker plugin for eslint check (#25631)
* Use fork-ts-checker for eslint check

* Fix lint issue

* Add packages to lint

* Add comments to webpack configs
2020-06-22 16:15:29 +02:00
Torkel Ödegaard
4e25823705
Webpack: Updated terser plugin (#22669) 2020-03-10 11:09:45 +01:00
Torkel Ödegaard
4f9b6c55c0
Webpack: Upgrade terser webpack plugin (#22332) 2020-02-20 11:38:37 +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
Dominik Prokop
60ed1e9527
Increase ts fork check mem limit (#22118) 2020-02-12 12:08:37 +01: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
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
8bc4ef3e9c Revert "Babel: use babel-loader instead of ts-loader, ng-annotate with babel-plugin-angularjs-annotate (#21554)" (#21570)
This reverts #21554 which caused problems with e2e.
This reverts commit e7e0d18bc8.
2020-01-17 15:52:56 +01:00
Steven Vachon
e7e0d18bc8 Babel: use babel-loader instead of ts-loader, ng-annotate with babel-plugin-angularjs-annotate (#21554)
* Applied prettier to some webpack configs

* Removed ng-annotate

… and used same annotation approach as webpack.hot.js

* Removed redundant import

… that is problematic with Babel's module resolver

* Updated lockfile

* Replace ts-loader with babel-loader in webpack.dev

* Change tslint-loade order in dev webpack config

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2020-01-17 12:36:46 +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
kay delaney
7985aa1e57
Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements (#18544)
* Performance/Webpack: Introduces more aggressive code-splitting and other perf improvements
- Introduces dynamic imports for built-in plugins
- Uses dynamic imports for various packages (rst2html, brace)
- Introduces route-based dynamic imports
- Splits angular and moment into separate bundles
2019-09-03 09:29:02 +01:00
David
89abc77b22
Build: Optional skipping of typescript checking in dev bundler (#18772)
* Build: Removed typescript checking from dev bundler

- when switching branches and trying out features, TS checking and bundling are eating up a lot
of CPU
- most of us are using an editor with typechecking support
- this commit removes type checking from the dev bundler
- we still have type checking enabled as a precommit hook and as part of
the prod bundler

* Adds new npm script: start:noTsCheck
2019-08-30 14:02:31 +02:00
Johannes Schill
79f6b4f8e6 chore: Bump css-loader and remove minimize option since its removed in css-loader 2019-03-14 08:25:54 +01:00
Johannes Schill
76eff009d2 chore: Prod builds should not cache 2019-03-14 08:25:51 +01:00
Johannes Schill
8eab2bef33 chore: Replace Uglify with Terser 2019-03-14 08:25:51 +01:00
Johannes Schill
e3ddfccb61 fix: Move chunk splitting from prod to common so we get the same files in dev as prod 2019-03-05 13:29:54 +01:00
Simon Podlipsky
c39dc1fb15 Some cleanup 2019-01-05 15:25:07 +01:00
Torkel Ödegaard
34c70ca7ce fix for issue with error view in production builds 2018-11-20 13:47:45 +01:00
Torkel Ödegaard
b415d82611 fixed to template PR issues, #13938 2018-11-02 10:49:46 +01:00
Tarek Becker
70bb81c6eb Load hash based styles in error.html, too 2018-11-01 23:31:17 +01:00
Tarek Becker
4d4eb354b7 Add [hash] to filename of grafana.{light,dark}.css 2018-11-01 21:43:07 +01:00
Pierre GIRAUD
a92d51731d Webpack tapable plugin deprecation (#12960)
* Remove unrequired extract-text-webpack-plugin

* Update ngAnnotate to avoid deprecation warning

* Avoid deprecation warning (Tapable.plugin -> hooks)
2018-08-20 11:55:29 +02:00
Torkel Ödegaard
713a87fb5b
Webpack 4 (WIP) (#12098)
* Webpack 4

* webpack: force angular version 1.6 as 1.7 has removed a legacy feature toggle Grafana needs, switched from awesome-typescript-loader to ts-loader & forked ts checker

* Webpack 4

* webpack: force angular version 1.6 as 1.7 has removed a legacy feature toggle Grafana needs, switched from awesome-typescript-loader to ts-loader & forked ts checker

* upgrade ts loader

* simplified splitChunks

* upgrade circle node image to v8

* webpack: minor changes, using the new mode option, removed unused awesome-typescript loader, investigating karma issue but no solution yet

* fix: change angular mocks version restriction to be more strict

* add babel-loader for HMR support, fix karma debug runner

* babel-loader to yarn.lock

* webpack: changed from ExtractTextPlugin  to MiniCssExtractPlugin, and updated the minification step to use new webpack4 optimization config section

* webpack: remove css minifcation from general css processing as it's done in the webpack optimization step

* limit vendors chunk to .ts and .js files

* fix: removed typescript compile error, wanted to see if we still got test failure for that

* tech: upgrade uglify-js, should be faster now
2018-06-26 01:28:37 -07:00
David Kaltschmidt
f1220fd2a4 Explore WIP 2018-04-26 20:27:19 +02:00
David Kaltschmidt
cc5d7002b0 Add weback-dev-server with hot/hmr support
* adds `npm start` / `yarn start` script
* starts a webpack-dev-server using the dev config, served on :3333
* hot reloading (HMR) for react/styles, not working for angular code
* new entry `dev.ts` for dynamic imports of CSS theme (ExtractText does
not work with HMR)
* TS loader pipeline moved out of common to add HMR for react
* applied `hot()` to some react containers (that's their new default
 export, named exports remains for testing)
* added sections to README
* updated yarn.lock
2018-04-19 11:42:53 +02:00
Torkel Ödegaard
48f384dcf1 build: reduced webpack log output and remove race flag from go tests 2017-10-22 20:16:32 +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
Torkel Ödegaard
4c4564b138 plugibs: expose more to plugins 2017-10-03 11:02:40 +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