Commit Graph

1034 Commits

Author SHA1 Message Date
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
Peter Holmberg
6912ed572c Core: Adding DashboardPicker component (#18811)
* Adding DashboardPicker component

* fix prop names

* fix prop names pt2
2019-09-03 09:54:01 +02:00
Torkel Ödegaard
fe658d7ac2
Prometheus: Fixed Prometheus query editor error (plus new ErrorBoundaryAlert component) (#18838)
* ErrorHandling: Fixed Prometheus query editor error and added error boundary

* Update public/app/core/components/ErrorBoundary/ErrorBoundary.tsx

Co-Authored-By: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Fixed ts error
2019-09-02 20:45:18 +02:00
Hugo Häggmark
e5e7bd3153
Dashboard: Adds Logs Panel (alpha) as visualization option for Dashboards (#18641)
* WIP: intial commit

* Switch: Adds tooltip

* Refactor: Adds props to LogsPanelEditor

* Refactor: Moves LogRowContextProvider to grafana/ui

* Refactor: Moves LogRowContext and Alert to grafana/ui

* Refactor: Moves LogLabelStats to grafana/ui

* Refactor: Moves LogLabels and LogLabel to grafana/ui

* Refactor: Moves LogMessageAnsi and ansicolor to grafana/ui

* Refactor: Moves calculateFieldStats, LogsParsers and getParser to grafana/data

* Refactor: Moves findHighlightChunksInText to grafana/data

* Refactor: Moves LogRow to grafana/ui

* Refactor: Moving ExploreGraphPanel to grafana/ui

* Refactor: Copies Logs to grafana/ui

* Refactor: Moves ToggleButtonGroup to grafana/ui

* Refactor: Adds Logs to LogsPanel

* Refactor: Moves styles to emotion

* Feature: Adds LogsRows

* Refactor: Introduces render limit

* Styles: Moves styles to emotion

* Styles: Moves styles to emotion

* Styles: Moves styles to emotion

* Styles: Moves styles to emotion

* Refactor: Adds sorting to LogsPanelEditor

* Tests: Adds tests for sorting

* Refactor: Changes according to PR comments

* Refactor: Changes according to PR comments

* Refactor: Moves Logs and ExploreGraphPanel out of grafana/ui

* Fix: Shows the Show context label again
2019-08-26 08:11:07 +02:00
Ryan McKinley
f7c55d3968 Plugins: better warning when plugins fail to load (#18671)
* better pluin feedback

* add server side check for module.js
2019-08-22 07:04:02 +02:00
Tobias Skarhed
ec492e55dc
Refactor: EmptyListCTA (#18516)
* Rewrite EmptyListCTA props and start removing css classes

* Add watchDepth onClick

* EmptyListCTA with React in annotaitons/editor

* Begin conversion of DashLinks editor EmptyListCTA

* Use React component in DashLinks, Variables and TeamGroupSync

* Remove scss file and add emotion styles

* Update snapshot

* Remove style import

* Fix feedback

* Update snapshot
2019-08-20 17:19:21 +02:00
Tobias Skarhed
3392471bb2 Login: Fixes undefined redirect (#18545) 2019-08-14 12:41:09 +01:00
Tobias Skarhed
91a911b64e
Login: Angular to React (#18116)
* Migrating login services

* Add user signup

* Remove lodash

* Remove media query and extarct LoginServices

* Add React LoginCtrl

* Handle location with Redux and start form validation

* Fix proposal

* Add basic validation

* Fix validation

* Remove state from controller

* Extract login forms

* Fix things up

* Add change password and LoginPage

* Add React page and route to it

* Make redux connection work

* Add validation for password change

* Change pws request

* Fix feedback

* Fix feedback

* LoginPage to FC

* Move onSkip to a method

* Experimenting with animations

* Make animations work

* Add input focus

* Fix focus problem and clean animation

* Working change password request

* Add routing with window.location instead of Redux

* Fix a bit of feedback

* Move config to LoginCtrl

* Make buttons same size

* Change way of validating

* Update changePassword and remove angular controller

* Remove some console.logs

* Split onChange

* Remove className

* Fix animation, onChange and remove config.loginError code

* Add loginError appEvent

* Make flex and add previosuly removed media query
2019-08-13 15:46:40 +02:00
Ryan McKinley
3ccc10f82c React: Rename deprecated UNSAFE_componentWillReceiveProps (#18526) 2019-08-13 10:08:33 +02:00
Marcus Efraimsson
8fd153edb7
API: Restrict anonymous user information access (#18422)
Existing /api/alert-notifications now requires at least editor access.
Existing /api/alert-notifiers now requires at least editor access.
New /api/alert-notifications/lookup returns less information than
/api/alert-notifications and can be access by any authenticated user.
Existing /api/org/users now requires org admin role.
New /api/org/users/lookup returns less information than
/api/org/users and can be access by users that are org admins,
admin in any folder or admin of any team.
UserPicker component now uses /api/org/users/lookup instead
of /api/org/users.

Fixes #17318
2019-08-12 20:03:48 +02:00
Elykov Alexandr
54f3e873a4 Frontend: adds folder name in home dash choose menu (#18346)
* Frontend:adds folder name in choose home dash menu(#18293)

* Frontend:adds folder name in choose home dash menu(#18293)
2019-08-06 18:22:45 +02:00
Hugo Häggmark
c8b195147e
Chore: Fixes some strict errors (#18381) 2019-08-05 12:07:35 +02:00
Tobias Skarhed
b62ab25c41 SignIn: Update redirect on reroute (#18360)
* Connect SignIn with redux and get url

* Update test snapshot
2019-08-03 16:21:17 +02:00
kay delaney
9d87923986
Chore: Upgrades typescript to version 3.5 (#18263)
* Chore: Upgrade typescript to version 3.5
2019-07-26 15:14:06 +01:00
Ryan McKinley
c194ae1ba5
Registry: add a reusable function registry (#17047) 2019-07-16 11:40:23 -07:00
Ryan McKinley
6599bdc7f1
AnnoList: add alpha annotations list plugin (#17187)
adding an alpha panel
2019-07-09 09:28:19 -07: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
Shavonn Brown
874b8abcc0 ChangePassword: Rewrite change password page to react (#17811)
* ChangePassword to React, created PasswordInput component, attempting UserProvider wrapper component, adding flex to btn row

* UserAPI interface, force classes on PasswordInput, remove api call from ChangePassword

* refactored out form

* clean up

* removed unnecessary bind, added loading state and loading component to change password form

* should be OR

* arrow funcs instead of binds, inline-block instead of flex, isSaving instead of isLoading, disabled button instead of spinner

* inline-flex on the react btn

* change state instatiatiation
2019-07-03 17:02:11 +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
Tobias Skarhed
0904607eda Password: Remove PasswordStrength (#17750)
* Closes #17748

* Remove remaining occurences

* And the last one
2019-06-25 13:56:35 +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
srid12
b950eebf99 JsonTree: fix jsonTree angular binding (#17608)
The API changed so it expects a numeric level rather than a boolean flag.  Since 6.1 plugins using jsonTree just show an empty div
2019-06-17 15:10:56 -07:00
Tobias Skarhed
6de75de755
Refactor buttons (#17611) 2019-06-17 16:15:49 +02:00
Shavonn Brown
40f95a95c0
16223 user auth token list and revoke (#17434)
* Start user auth token list on user profile (#16223)

* Now session found and first, better os regex (#16223)

* Revoke for user and admin user token manage (#16223)

* Tidying and styling (#16223)

* Tidying and styling (#16223)

* Update to use #16222 (#16223)

* Update for changes to 16222

* update per api issue
2019-06-11 14:23:54 +02:00
Ryan McKinley
96ba32d0c8
Add a @grafana/runtime package with backendSrv interface (#16533)
grafana-runtime/tsconfig.json imports query to avoid a build error  ¯\_(ツ)_/¯
2019-06-03 17:55:59 +02:00
Torkel Ödegaard
e421723992
Search: removed old not working search shortcuts (#17226) 2019-05-22 12:23:30 +02:00
Marcus Efraimsson
e6001f57a2
Explore: Allow switching between metrics and logs (#16959)
Adds basic support for switching between Metrics and Logs in Explore. 
Currently only test datasource that supports both Metrics and Logs.
Summary of changes:
* Moves mode (Metric, Logs) selection to the left of datasource 
picker and add some quick styling.
* Only trigger change in ToggleButton if not selected
* Set correct mode if datasource only supports logs

Closes #16808
2019-05-16 09:52:22 +02:00
Torkel Ödegaard
6c7224c74d
InfoPopover: Fixes transclude undefined error (#17063) 2019-05-14 15:28:09 +02:00
Torkel Ödegaard
e0b760e08e
Chore: No implict any fixes (#17020) 2019-05-13 09:38:19 +02:00
Torkel Ödegaard
f12d47ef52
Chore: Typescript no-implicit any fixes progress (#17018)
* Chore: Typescript no-implicit any fixes progress

* Fixed tests

* Updated snapshot
2019-05-12 14:15:23 +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
7194c6d9bf Search: Enable filtering dashboards in search by current folder (#16790)
* Added search-query-parser package

* Migrate search input field to react and enable current folter filtering

* Reveiw changes

* FIx tags

* Fix event handlers  passed to html elements directly

* noImplicitAny fix

* Debounce search method in search controller

* Search: have clear reset query as well
2019-05-02 08:49:03 +02:00
Ryan McKinley
26bd76b4c2
Refactor: move NavModel to @grafana/ui (#16813) 2019-04-30 07:46:46 -07:00
Dominik Prokop
19e824006a
Refactor: Make SelectOptionItem a generic type to enable select value typing (#16718)
* Make SelectOptionItem a generic type to enable select value typing
* TS ignores added because of optional value on Select items (it's no longer any)
2019-04-23 20:44:16 +02:00
Patrick O'Carroll
d040e336c1 UI: Remove old icons (#16335)
* removed unsused grafana-icon classes, replaced grafana-icons with gicons

* replaced old dashboard and datasource icons with gicon, fixed so icons on plugin list are shown

* removed unsused grafana-icon classes, replaced grafana-icons with gicons

* replaced old dashboard and datasource icons with gicon, fixed so icons on plugin list are shown

* replaced fontawesome cog, eye, link and edit with gicons

* updated snapshot

* fixed color of cog in dashboard nav, removed icons from buttons, ran preitterier on some files

* changed opacity on getting started icons and fixed getting started button

* .5 -> 0.5 fix for prettier
2019-04-17 15:18:32 +02:00
Johannes Schill
406ef962fc Explore & Dashboard: New Refresh picker (#16505)
* Added RefreshButton

* Added RefreshSelect

* Added RefreshSelectButton

* Added RefreshPicker

* Removed the magic string Paused

* Minor style changes and using Off instead of Pause

* Added HeadlessSelect

* Added HeadlessSelect story

* Added SelectButton

* Removed RefreshSelectButton

* Added TimePicker and moved ClickOutsideWrapper to ui/components

* Added TimePickerPopOver

* Added react-calendar

* Missed yarn lock file

* Added inputs to popover

* Added TimePicker and RefreshPicker to DashNav

* Moved TimePicker and RefreshPicker to app/core

* Added react-calendar to app and removed from ui/components

* Fixed PopOver onClick

* Moved everything back to ui components because of typings problems

* Exporing RefreshPicker and TimePicker

* Added Apply and inputs

* Added typings

* Added TimePickerInput and logic

* Fixed parsing of string to Moments

* Fixed range string

* Styling and connecting the calendars and inputs

* Changed Calendar styling

* Added backward forward and zoom

* Fixed responsive styles

* Moved TimePicker and RefreshPicker into app core

* Renamed menuIsOpen to isOpen

* Changed from className={} to className=""

* Moved Popover to TimePickerOptionGroup

* Renamed all PopOver to Popover

* Renamed popOver to popover and some minor refactorings

* Renamed files with git mv

* Added ButtonSelect and refactored RefreshPicker

* Refactored TimePicker to use new ButtonSelect

* Removed HeadlessSelect as suggested

* fix: Fix typings and misc errors after rebase

* wip: Enable time picker on dashboard and add tooltip

* Merge branch 'master' into hugoh/new-timepicker-and-unified-component

# Conflicts:
#	packages/grafana-ui/package.json
#	packages/grafana-ui/src/components/Input/Input.test.tsx
#	packages/grafana-ui/src/components/Input/Input.tsx
#	packages/grafana-ui/src/utils/validate.ts
#	public/app/features/dashboard/panel_editor/QueryOptions.tsx
#	yarn.lock

* fix: Snapshot update

* Move TimePicker default options into the TimePicker as statics, pass the tooltipContent down the line when wanted and wrap the button in a tooltip element

* fix: Override internal state prop if we provide one in a prop

* Updated snapshots

* Let dashnav control refreshPicker state

* feat: Add a stringToMs function

* wip: RefreshPicker

* wip: Move RefreshPicker to @grafana/ui

* wip: Move TimePicker to @grafana/ui

* wip: Remove comments

* wip: Add refreshPicker to explore

* wip: Use default intervals if the prop is missing

* wip: Nicer way of setting defaults

* fix: Control the select component

* wip: Add onMoveForward/onMoveBack

* Remove code related to the new time picker and refresh picker from dashnav

* Fix: Typings after merge

* chore: Minor fix after merge

* chore: Remove _.map usage

* chore: Moved refresh-picker logic out of the refresh picker since it will work a little differently in explore and dashboards until we have replaced the TimeSrv

* feat: Add an Interval component to @grafana/ui

* chore: Remove intervalId from redux state and move setInterval logic from ExploreToolbar to its own Interval component

* feat: Add refreshInterval to Explore's URL state

* feat: Pick up refreshInterval from url on page load

* fix: Set default refreshInterval when no value can be retained from URL

* fix: Update test initial state with refreshInterval

* fix: Handle URLs before RefreshPicker

* fix: Move RefreshInterval to url position 3 since the segments can take multiple positions

* fix: A better way of detecting urls without RefreshInterval in Explore

* chore: Some Explore typings

* fix: Attach refresh picker to interval picker

* chore: Sass fix for refresh button border radius

* fix: Remove refreshInterval from URL

* fix: Intervals now start when previous interval is finished

* fix: Use clearTimeout instead of clearInterval

* fix: Make sure there's a delay set before adding a timeout when we have slow explore queries

* wip: Add refresh picker to dashboard

* feat: Add util for removing keys with empty values

* feat: RefreshPicker in dashboards and tmp rem out old RefreshPicker

* fix: Remove the jumpy:ness in the refreshpicker

* Changed placement and made it hide when your in dashboard settings

* chore: Move logic related to refresh picker out of DashNav to its own component

* feat: Add tooltip to refreshpicker

* fix: Fix bug with refreshpicker not updating when setting to 'off'

* fix: Make it possible to override refresh intervals using the dashboard intervals

* chore: Change name of Interval to SetInterval to align with ecmascripts naming since its basically the same but declarative and async

* fix: Use default intervals when auto refresh is empty in dashboard settings

* fix: Hide time/interval picker when hidden is true on the model, such as on the home dashboard

* fix: Interval picker will have to handle location changes since timeSrv wont

* RefreshPicker: Refactoring refresh picker

* RefreshPicker: minor refactoring
2019-04-16 09:15:23 +02:00
Hugo Häggmark
7eabc282e9
Chore: Adds typings to lodash (#16590) 2019-04-15 12:11:52 +02:00
Hugo Häggmark
a887c344eb
Fix: Disables auto open datasource picker on focus (#16398) 2019-04-09 14:59:30 +02:00
Patrick O'Carroll
128fb8fa7e Theme: Reworking button styling (#16362)
* added new variables for height in theme, added height to gui button large, replaced add gicon with regular gicon, replaced + with gicon, changed button display to flex

* set fixed height to large button, removed xlarge button and replaced with large button

* removed button-mini and replaced with button-small, set fixed height to default button and button-small

* fixed padding for default and large button, fixed height for navbar button, fixed snapshots

* fixed padding and margin on navbar buttons

* gave special height to login btn-primary

* readded btn-mini class with same styling as btn-small and a deprecated notice

* fixed add panel widget buttons
2019-04-08 09:48:15 +02:00
Dominik Prokop
206921d21b
Feature: Introduced CallToActionCard to @grafana/ui (#16237)
CallToActionCard is an abstraction to display a card with message, call to action element and a footer. It is used i.e. on datasource add page.
2019-03-27 22:33:20 +01:00
Torkel Ödegaard
0a2d69c794
Merge pull request #16089 from grafana/no-implicit-any-fixes-p4
Fixed no implicit any for form dropdown & panel model
2019-03-20 07:01:14 +01:00
Torkel Ödegaard
4f134ea4b8
Merge pull request #16080 from grafana/hugoh/no-implicit-any
Cleaning up no implicit anys in search_srv and tests
2019-03-19 18:26:28 +01:00
Torkel Ödegaard
42c87141a5 Minor progress on fixing no-implicit any issues 2019-03-19 18:24:47 +01:00
Hugo Häggmark
d845aacbdc refactor: merged types and updated references 2019-03-19 17:44:58 +01:00
Hugo Häggmark
c1d585b156 chore: cleaning up noimplicit anys in search_srv and tests
progress: #14714
2019-03-19 14:48:35 +01:00
Hugo Häggmark
96aa4ae19f teams: remov permission select for non admin users 2019-03-19 14:01:12 +01:00
Hugo Häggmark
467b7a40d8 teams: feature toggle component 2019-03-19 13:57:24 +01:00
Peter Holmberg
384e11fd68 Copied from new timepicker and unified component branch 2019-03-18 15:41:46 +01:00
Hugo Häggmark
96af051cb2 chore: Cleaning up implicit anys in manage_dashboard.ts and manage_dashboard.test.ts
progress: #14714
2019-03-15 01:59:16 -07:00
Torkel Ödegaard
25b1bec250 Typescript noAny fixes, start of a long journey 2019-03-12 15:14:45 +01:00