Commit Graph

23577 Commits

Author SHA1 Message Date
Alexander Zobnin
8505d90768 Admin: New Admin User page (#20498)
* admin: user page to react WIP

* admin user page: basic view

* admin user page: refactor, extract orgs and permissions components

* admin user: change sessions actions styles

* admin user: add disable button

* user admin: add change grafana admin action

* user admin: able to change org role and remove org

* user admin: confirm force logout

* user admin: change org button style

* user admin: add confirm modals for critical actions

* user admin: lock down ldap user info

* user admin: align with latest design changes

* user admin: add LDAP sync

* admin user: confirm button

* user admin: add to org modal

* user admin: fix ConfirmButton story

* admin user: handle grafana admin change

* ConfirmButton: make styled component

* ConfirmButton: completely styled component

* User Admin: permissions section refactor

* admin user: refactor (orgs and sessions)

* ConfirmButton: able to set confirm variant

* admin user: inline org removal

* admin user: show ldap sync info only for ldap users

* admin user: edit profile

* ConfirmButton: some fixes after review

* Chore: fix storybook build

* admin user: rename handlers

* admin user: remove LdapUserPage import from routes

* Chore: fix ConfirmButton tests

* Chore: fix user api endpoint tests

* Chore: update failed test snapshots

* admin user: redux actions WIP

* admin user: use new ConfirmModal component for user profile

* admin user: use new ConfirmModal component for sessions

* admin user: use lockMessage

* ConfirmButton: use primary button as default

* admin user: fix ActionButton color

* UI: use Icon component for Modal

* UI: refactor ConfirmModal after Modal changes

* UI: add link button variant

* UI: able to use custom ConfirmButton

* Chore: fix type errors after ConfirmButton refactor

* Chore: revert Graph component changes (works with TS 3.7)

* Chore: use Forms.Button instead of ActionButton

* admin user: align items

* admin user: align add to org modal

* UI: organization picker component

* admin user: use org picker for AddToOrgModal

* admin user: org actions

* admin user: connect sessions actions

* admin user: updateUserPermissions action

* admin user: enable delete user action

* admin user: sync ldap user

* Chore: refactor, remove unused code

* Chore: refactor, move api calls to actions

* admin user: set user password action

* Chore: refactor, remove unused components

* admin user: set input focus on edit

* admin user: pass user into debug LDAP mapping

* UserAdminPage: Ux changes

* UserAdminPage: align buttons to the left

* UserAdminPage: align delete user button

* UserAdminPage: swap add to org modal buttons

* UserAdminPage: set password field to empty when editing

* UserAdminPage: fix tests

* Updated button border

* Chore: fix ConfirmButton after changes introduced in #21092

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-01-13 17:10:19 +01:00
Diana Payton
108039af33
Docs: Update cli.md (#21470)
* Update cli.md

* update links

Co-authored-by: Robby Milo <robbymilo@gmail.com>
2020-01-13 07:38:52 -08:00
Peter Holmberg
891b84e986
Fix: Tab icons not showing (#21465)
* revert back to i element

* snap
2020-01-13 13:53:39 +01:00
Peter Holmberg
30eef76162
Chore: Add react-table typings to Table (#21418)
* add typings

* introduce tyings and refactor accordingly

* extract setting celltype

* update tests to reflect changes

* removing unused things

* renaming getCellType -> getCellDisplayType

* fix width type error

* remove caret

* move cell back to utils, fix story

* remove unused import

* rename type
2020-01-13 11:12:19 +01:00
Torkel Ödegaard
b6c75b10d1
Login: Refactoring how login background is rendered (#21446)
* Login: Refactoring how login background is rendered

* Tweak
2020-01-13 09:42:21 +01:00
Torkel Ödegaard
27a77f588c
StatPanel: Refactoring & fixes (#21437)
* refactoring BigValue layout to use polymorphism

* Renamed file

* StatPanel: Fixed min & max handling, white theme background

* Typescript and test fixes

* Fixed justify center logic

* Updated test dashboard

* Updated test dashboard

* Adjust time xMax to align with last data point if it's close

* Fixed color issue

* removed text shadow

* Removed unused stuff

* Fixed auto min max

* Fixed strict typescript issues

* Updated
2020-01-13 09:41:35 +01:00
Hugo Häggmark
4f0fa776be
Chore: Migrates reducers and actions to Redux Toolkit (#21287)
* Refactor: Adds Redux Toolkit package

* Refactor: Uses configureStore from Redux Toolkit

* Refactor: Migrates applicationReducer

* Refactor: Migrates appNotificationsReducer

* Refactor: Migrates locationReducer

* Refactor: Migrates navModelReducer

* Refactor: Migrates teamsReducer and teamReducer

* Refactor: Migrates cleanUpAction

* Refactor: Migrates alertRulesReducer

* Refactor: Cleans up recursiveCleanState

* Refactor: Switched to Angular compatible reducers

* Refactor: Migrates folderReducer

* Refactor: Migrates dashboardReducer

* Migrates panelEditorReducer

* Refactor: Migrates dataSourcesReducer

* Refactor: Migrates usersReducer

* Refactor: Migrates organizationReducer

* Refactor: Migrates pluginsReducer

* Refactor: Migrates ldapReducer and ldapUserReducer

* Refactor: Migrates apiKeysReducer

* Refactor: Migrates exploreReducer and itemReducer

* Refactor: Removes actionCreatorFactory and reducerFactory

* Refactor: Moves mocks to test section

* Docs: Removes sections about home grown framework

* Update contribute/style-guides/redux.md

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Refactor: Cleans up some code

* Refactor: Adds state typings

* Refactor: Cleans up typings

* Refactor: Adds comment about ImmerJs autoFreeze

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
2020-01-13 08:03:22 +01:00
Marcus Andersson
b0515f46cc DeleteButton: Button with icon only was not centered correctly. (#21432)
* Refactoring to get the correct spacing between the first icon and button border.

* Should not be smaller then 8px to the left.

* Removed unused dependency.

* Updated snapshot for LinkButton.
2020-01-12 19:55:10 +01:00
Torkel Ödegaard
35679d4689
Logos: Refactoring a bit how logos are rendered (#21421) 2020-01-10 22:15:16 +01:00
Diana Payton
cfba25630e
Docs: Update documentation-style-guide.md (#21322)
* Update documentation-style-guide.md

Added Commands and code section.

* Update documentation-style-guide.md

* Update documentation-style-guide.md

Added code block examples

* Update documentation-style-guide.md
2020-01-10 11:53:05 -08:00
Shavonn Brown
a7509d2ca0
More datasource funcs poc (#21047)
* remove anon funcs, removed options from state, removed update method, static selects as constants

* cancellable promise

* cancel promise on unmount

* use new datasource funcs for dryer component

* event handler funcs

* updated funcs and moved to utils, updating config editors

* S has no keys. never will never work

* remove report json

* update azure snapshot

* DataSourceSettings keyof

* rename reset funcs
2020-01-10 14:26:33 -05:00
Diana Payton
aada45a4cb
Docs: Update plugin installation and CLI (#21179)
* Update plugin docs

* Updated plugins installation documentation

Moved all Grafana CLI commands into cli.md, moved API script into user.md, rewrote installation.md as an actual task that refers the user to the plugins installation page

* Update cli.md

* Update cli.md

* Update docs/sources/administration/cli.md

Co-Authored-By: Dan Cech <dcech@grafana.com>

* Update docs/sources/administration/cli.md

Co-Authored-By: Dan Cech <dcech@grafana.com>

* Update docs/sources/http_api/user.md

Co-Authored-By: Dan Cech <dcech@grafana.com>

* Update docs/sources/http_api/user.md

Co-Authored-By: Dan Cech <dcech@grafana.com>

* Update cli.md

* Fixed links

* Update cli.md

* Update cli.md

* Update cli.md

* Update cli.md

Co-authored-by: Dan Cech <dan@aussiedan.com>
2020-01-10 09:41:39 -08:00
Diana Payton
77ec7afa2b
Docs: Update debian.md (#21339)
* Docs: Update debian.md

Simplified the APT install instructions by bundling the commands into one block, added steps in the .deb instructions to refer to new fields on the installation page.

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md

* Update debian.md
2020-01-10 09:38:54 -08:00
Marcus Efraimsson
0f0772b629
Alerting: Adds support for sending a single email to all recipients in notification channel (#21091)
When an alert is sent by e-mail, the process sends an e-mail to 
each recipient separately. This PR is a single delivery to all recipients.
For companies that use e-mail extensively, this is necessary in order 
not to overload the sending queue.

Replaces #18013
Fixes #12650

Co-authored-by: Henrique Oliveira <holiiveira@users.noreply.github.com>
2020-01-10 16:06:33 +01:00
Danilo Bargen
8a02fa7691 ThreemaNotifier: Use fully qualified status emoji (#21305) 2020-01-10 16:00:20 +01:00
Leonard Gram
673ccdc448
Settings: Env override support for dynamic settings (#21439)
* Settings: supports env overrrides for dynamic settings

* Settings: makes it possible to explicitly get env override support for dynamic settings

* Make linter happy
2020-01-10 15:33:54 +01:00
Jeffrey Descan
c5f906f472 Security: refactor 'redirect_to' cookie to use 'Secure' flag (#19787)
* Refactor redirect_to cookie with secure flag in middleware

* Refactor redirect_to cookie with secure flag in api/login

* Refactor redirect_to cookie with secure flag in api/login_oauth

* Removed the deletion of 'Set-Cookie' header to prevent logout

* Removed the deletion of 'Set-Cookie' at top of api/login.go

* Add HttpOnly flag on redirect_to cookies where missing

* Refactor duplicated code

* Add tests

* Refactor cookie options

* Replace local function for deleting cookie

* Delete redundant calls

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2020-01-10 15:55:30 +02:00
David
a3c99f4871
Logs: Fix parsing for logfmt fields that have parens (#21407)
* Logs: Fix parsing for logfmt fields that have parens

- added `()`, `[]`, and `{}` to be allowed in logfmt field names

* Fix matcher
2020-01-10 13:53:31 +01:00
Björn Rabenstein
e9bcee30fa Improve documentation for the Prometheus data source (#21415)
Besides minor language corrections, this tries in particular to
provide some clarity about the `step` setting in the Prometheus range
query and the `$__interval` variable:

- First of all: They are both always the same.

- What's really confusing (and arguably really un-helpful) is that the
  _Min time interval_ is multiplied by the resolution
  factor. Therefore, I just state the fact here now but don't add
  anything like "This should be the scrape interval" because it is not
  true (if resolution is `1/10`, a meaningful _Min time interval_ is
  generally a tenth of the scrape interval).

- More helpful is the _Min step_ parameter, because it is not
  multiplied by the resolution factor (which I have now stated
  explicitly). Of course, the _Min time interval_ has to be set to
  something small so that the _Min step_ parameter can kick in.

It would be good if we could also override the _Min time interval_
tool tip because that is where most people will look, and the current,
very Graphite-centric tool tip is very confusing for the Prometheus
query editor, in particular because it doesn't have any hint about the
resolution factor being applied. See #21413.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-01-10 13:51:32 +01:00
Ryan McKinley
7521d2bba0 Heatmap: fix formatting (#21433)
* add formatting

* remove logging
2020-01-10 12:50:30 +01:00
vikkyomkar
15fe58f193 Docs: Fixed broken links of Datasource doc at Grafana plugin page (#21363)
Fixes #21362
2020-01-10 12:38:16 +01:00
Pavlos Daoglou
53007e07e3 ApiUser: Fix response when enabling, disabling or deleting a nonexistent user (#21391)
* ApiUser: Fix response when enabling, disabling or deleting a nonexistent user
2020-01-10 11:43:44 +01:00
Peter Holmberg
bb649489c8
grafana/ui: Create Tabs component (#21328)
* create tabs component

* replace tabs in pageheader

* splitting two different types of tabitems

* fix index and conditionals in tabs

* redo tabs to not render anchor links

* rename to className and use cx to combine classes

* reverting back to a simpler use case

* moving type to types file

* fix import

* redoing Tabs to simpler composition components

* pr feedback

* update snapshot

* use icon component, added knob for storybook
2020-01-10 10:38:43 +01:00
Ryan McKinley
bf18704490
Inspector: support custom metadata display (#20854) 2020-01-09 22:59:23 -08:00
teodoryantcheff
0bf9e9bc28 Table: Added text align option to column styles (#21175)
* Added text align option to column styles, tests

* table panel migrations

* added tests

* default column style is now auto

* tests and fixtures...

* wrong comments need removing

* xss guard

* test

* Some test for invalid options, formatting.

* Remote branch tracking.
2020-01-09 16:01:12 +01:00
Martin Brenner
7784b519a0 PluginPage: Add appSubUrl string to config pages url (#21414) 2020-01-09 14:02:58 +01:00
Martin Lehmann
418cb9a8da Docs: Remove comment about upcoming alerting for singlestat and table panels (#21416)
This might help with the general tone of voice in https://github.com/grafana/grafana/issues/6983 😕
2020-01-09 14:02:08 +01:00
Torkel Ödegaard
91ea3b15fa
Footer: Single footer component for both react & angular pages (#21389)
* Footer: Single footer implementation for both react & angular pages

* Export type

* Updates

* Use footer links in help menu

* Updates & Fixes

* Updated snapshot

* updated snapshot
2020-01-09 11:25:52 +01:00
vikkyomkar
3866f609ce API: Added alert state validation before changing its state (#21375)
* added alert state validation before changing its state

* modified boolean condition

* converted most occurring string into const

* referred the const of alert models
2020-01-09 11:18:51 +01:00
Torkel Ödegaard
fe61f6b7a7
AddDataSource: Added missing phantom plugin (#21406)
* AddDataSource: Added missing phantom plugin

* Fixed test
2020-01-09 08:26:32 +01:00
Marcus Efraimsson
baba1634b8 Plugins: Use grafana-plugin-sdk-go v0.5.0 (#21116)
* fix dispense

* plugin loading refactor

Moves common functionality of registering, starting,
stopping and restarting backend plugins to
backendplugin package.

* simplify plugin descriptors

* target sdk v0.5.0

Co-authored-by: Kyle Brandt <kyle@kbrandt.com>
2020-01-08 11:43:28 -05:00
Ryan McKinley
5321e7536f
UnitPicker: show custom units on load (#21397) 2020-01-08 07:16:42 -08:00
Shavonn Brown
cd5d5bcbba
Cloud Watch: Standardize Config Editor Implementation (#20489)
* remove anon funcs, removed options from state, removed update method, static selects as constants

* cancellable promise

* cancel promise on unmount

* use new datasource funcs for dryer component
2020-01-08 08:57:52 -05:00
Erik Sundell
cf2dd51827
CloudWatch: dimension_values templating fix (#21401)
* Handle dimension value if passed as array

* Break out dimension value loading into its own func
2020-01-08 12:24:10 +01:00
Leonard Gram
d22e53bba8
Docs: explain how to setup the apt repo without helpers (#21194)
* Docs: explain how to setup the apt repo without helpers

* Docs: re-structured apt install docs

* Update docs/sources/installation/debian.md

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/installation/debian.md

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Docs: improvements based on feedback

* Docs: appending is safer if the user for some reason wants both beta and non beta

* Docs: repo -> repository

* Update docs/sources/installation/debian.md

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

* Update docs/sources/installation/debian.md

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-01-08 10:38:31 +01:00
Marcus Andersson
1ba5ccb159
Build: prevent changes to pkg/extentions/main.go from throwing error on merge 2020-01-08 07:08:59 +01:00
Ryan McKinley
f7053e19d2
TimeZones: fix utc test (#21393) 2020-01-07 14:01:06 -08:00
Leonard Gram
1c71637d11
Build: package all binaries for enterprise (#21381) 2020-01-07 16:00:58 +01:00
Lukas Siatka
34d9274c4c Datasource: fixes prometheus datasource tests - adds align range 2020-01-07 15:41:01 +01:00
Torkel Ödegaard
9492742812
CircleCI: Testing upgrade to CircleCI 2.1 (#21374) 2020-01-07 13:43:31 +01:00
Dominik Prokop
386035da4d Storybook: Remove reference to jquery.flot.pie file from storybook config (#21378) 2020-01-07 13:35:10 +01:00
Torkel Ödegaard
f774c4a076
Cloudwatch: Fixed crash when switching from cloudwatch data source (#21376) 2020-01-07 13:05:14 +01:00
Raghu Chinnannan
b4fa27b8a4 Docs: Added Squadcast notifications (#21372)
- Added Squadcast section 
- Added Squadcast to the **All supported notifiers** table.
2020-01-07 12:59:53 +01:00
Ryan McKinley
8233c407a2
Chore: upgrade d3 (#21368) 2020-01-07 02:59:11 -08:00
lzd
ee77e1a791 Datasource: fix a bug where deleting data source will trigger save and test events (#21300) 2020-01-07 09:48:46 +01:00
Dominik Prokop
630f75d3ef
Forms: revamped select (#21092) 2020-01-07 09:20:06 +01:00
Ryan McKinley
eac66813ca
Toolkit: add git log info to the plugin build report (#21344) 2020-01-06 17:10:15 -08:00
Emil Hessman
f0764ceda8 Docs: Use https scheme for Grafana playground links (#21360) 2020-01-06 08:25:13 -08:00
Robby Milo
90d20ec5af
fix docs links (#21359) 2020-01-06 17:16:14 +01:00
Torkel Ödegaard
e78074992b
AddDatasourcePage: Refactoring & more Phantom plugins (#21261)
* WIP: New types and state refactoring

* Added buildCategories & tests

* Added phantom plugins

* fixed tests

* Minor changes, force enterprise plugins to enterprise category

* Fixed tests
2020-01-06 16:56:34 +01:00