* Variables: turns on newVariables as default
* Chore: adds default templating state
* Some small refactorings to get the template_srv tests to get green when toggle is enabled by default.
* Refactor: adds getVariables dependency to DashboardModel
* Tests: fixes StackDriver tests
* Tests: updates snapshots
* Tests: updates snapshot for DashboardGrid.test.tsx
* Tests: fixes DashboardModel.test.ts
* fixed initDashboard tests.
* renamed variable.
* changed so we use the templating.list when running the migration work.
* changed so we always returns the variables in sorted order.
* Tests: fixed cloudwatch tests
* added so we set the global template variable props.
* Fixed tests and added moved logic to complete templateSrv variables.
* removed unneccesary updateIndex.
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Refactor: moves all the newVariables part to features/variables directory
* Feature: adds datasource type
* Tests: adds reducer tests
* Tests: covers data source actions with tests
* Chore: reduces strict null errors
* boilerplate that will be replaced by real code.
* added old editor template.
* added initial version of ad hoc editor.
* added working (apart from add) version of the editor.
* Added placeholder for picker.
* Have a working UI. Need to connect it so we refresh the variables on changes.
* variable should be updated now.
* removed console.log
* made the url work.
* cleaned up the adapter.
* added possiblity to create filter directly from table.
* moved infotext from general reducer to extended value of adhoc.
* fixed strict null errors.
* fixed strict null errors.
* fixed issue where remove was displayed before being added.
* fixed issue with fragment key.
* changed so template_src is using the redux variables.
* minor refactorings.
* moved adhoc picker to adhoc variable.
* adding tests for reducer and fixed bug.
* added tests or urlparser.
* added tests for ad hoc actions.
* added more tests.
* added more tests.
* fixed strict null error.
* fixed copy n pase error.
* added utilit for getting new variable index.
* removed console.log
* added location to reducerTester type and created a module type for it.
* changed so we only have one builder pattern.
* fixed tests to use static expected values.
* fixed strict errors.
* fixed more strict errors.
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
* Feature: adds onTimeRangeUpdated to newVariables
* Refactor: removes VariableWithRefresh and unused func
* Refactor: adds console output when something throws as well
* Explore: Refactor active buttons css
* Explore: Add query history button
* WIP: Creating drawer
* WIP: Create custom drawer (for now)
* Revert changes to Drawer.tsx
* WIP: Layout finished
* Rich History: Set up boilerplate for Settings
* WIP: Query history cards
* Refactor, split components
* Add resizability, interactivity
* Save history to local storage
* Visualise queries from queryhistory local storage
* Set up query history settings
* Refactor
* Create link, un-refactored verison
* Copyable url
* WIP: Add slider
* Commenting feature
* Slider filtration
* Add headings
* Hide Rich history behind feature toggle
* Cleaning up, refactors
* Update tests
* Implement getQueryDisplayText
* Update lockfile for new dependencies
* Update heading based on sorting
* Fix typescript strinctNullCheck errors
* Fix Forms, new forms
* Fixes based on provided feedback
* Fixes, splitting component into two
* Add tooltips, add delete history button
* Clicking on card adds queries to query rows
* Delete history, width of drawers
* UI/UX changes, updates
* Add number of queries to headings, box shadows
* Fix slider, remove feature toggle
* Fix typo in the beta announcement
* Fix how the rich history state is rendered when initialization
* Move updateFilters when activeDatasourceFilter onlyto RichHistory, remove duplicated code
* Fix typescript strictnull errors, not used variables errors
* Refactor: Adds variables in state to TemplateSrv
* Refactor: Introduces some typings and structures
* Refactor: Introduces picker to adapter
* Refactor: Removes useState and introduces contains instead
* Refactor: Introduces Variable Editor
* Refactor: Adds uuid and simplifies state
* Refactor: Consolidates to VariableRenderer
* Refactor: Adds name change capability
* Refactor: Adds variableMiddleware
* Refactor: Adds ability to change Angular type to type in State
* Fix: Fixes so we check for duplicate names
* Refactor: Adds ability to change State type to type in Angular
* Refactor: Updates name in dashboard templating list
* Refactor: Adds label change to VariableEditor
* Refactor: Adds hide change to VariableEditor
* Refactor: Adds update ability
* Refactor: Adds tooltip
* Refactor: Adds SelectionOptionsEditor
* Refactor: Adds query editor and validation
* Refactor: Adds regex and sort to editor
* Refactor: Adds Selection options
* Refactor: Adds Varible Values Previewer
* Refactor: Changes from array in state to Record
* Refactor: Removes getVariableAtIndex from templateSrv
* Tests: Fixs broken tests
* Chore: Fixes duplicate merge import
* Refactor: Removes strict null errors
* Refactor: Adds duplicate variable
* Refactor: Adds remove variable
* Refactor: Adds change order of variables
* Refactor: Adds add new variable
* Chore: Fixes Prettier formatting
* Refactor: Adds VariablePicker
* Fixed so sub menu is displayed when we only have redux template variables.
* removed unused variable.
* tags will be visibile in the new react picker.
* added some nice colors to the tags.
* Added thunk for selecting a tag.
* Refactor: Cleans up templating state when dashboard unloads
* Refactor: Adds save capabilities for variables in state
* added possibility to select tag.
* Added so you can deselect a tag.
* Fixed issue with coloring on top.
* minor refactoring to make the code more slim.
* Refactor: Fixes dispatch return and copy of variable
* selecting options when tag i selected
* small refactoring.
* fixed so we use options.
* Refactor: Adds getValueForUrl capabilities
* first implementation of keyboard navigation on picker.
* removed comment.
* fixed so you can toggle all options.
* Refactor: Simplified state handling using Redux Toolkit and flat reducer structure
* Refactor: Adds sharedTemplatingReducer and queryVariableReducer
* Tests: Fixs broken tests
* Chore: Removes some strict null errors
* Tests: Fix broken tests
* Refactor: Splitted QueryVariablePicker into smaller components
* Refactor: Moves linktext and selected tags to component instead
* Fix: Fixes the ability to have multiple dropdowns opened at same time
* Fix: Fixes onKeyDown from prev refactor
* Refactor: Adds searchfilter searching
* Tests: Fixes after running e2e tests
* Refactor: Adds an attempt to solve dependencies at startup
* Refactor: Adds feature toggle
* Refactor: Resets all angular files to master
* Refactor: Move stuff to query folder
* Refactor: Initial commit for SubMenu component
* Refactor: Updated DashboardModel with new list
* Refactor: Adds feature toggle to dashboard model and friends
* Refactor: Adds picker to SubMenu
* Refactor: Fixes styling on SubMenu
* Refactor: Fixes processvariables
* Refactor: Initial EditorList skeleton
* Refactor: Refactors out VariableEditorList and VariableEditorContainer
* Refactor: Adds New variable functionality
* Refactor: Adds registred types
* Refactor: Adds edit existing variable functionality
* Refactor: Changes params to thunks
* Refactor: Small fix for cleaning up state when clicking update/add
* Refactor: Better typings for outer containers
* Refactor: Adds change order functionality
* Refactor: Removed notify angular args
* Change so the url is in sync with the redux template variables.
* Adding support for saving proper values and checking changes.
* Refactor: Adds duplicate variable functionality
* Feature: Adds remove variable functionality
* Refactor: Small refactor so e2e tests work as before
* Refactor: Returns null if no visible variables
* Refactor: Adds annotations to SubMenu
* Refactor: Fixes toggling of annotations in SubMenu
* added dashboard links to new submehu.
* Refactor: Small refactor breaking up into smaller components
* Fix: Fixes infinite recursive loop when changing varible name
* Templating: Do not mutate location query state
* Refactor: Fixes minor timing issue when adding new variable
* Refactor: removes initialization in variable_srv constructor
* Refactor: Suggestion on how to handle templating.list in DashboardExporter
* Refactor: Adds getVariables typings and changes ChangeTracker and ShareSnapshotCtrl
* Refactor: Adds getVariable on DashboardModel and changes DashboardMigrator
* Fix: Fixes repeated panels
* wip: starting to add custom variable type.
* Refactor: Merging two different toVariablePayload functions
* Tests: Fixes broken tests
* Fix: Reduces strict null errors
* Tests: Initial commit and fixes strange dependency order
* Tests: Covers sharedTemplatingReducer with tests
* Refactor: Rename state/index.ts => state/reducers.ts as every where else
* Refactor: Renames and moves adapters.ts
* Tests: Adds tests for templatingReducer
* Tests: Adds intitial tests for queryVariableReducer
* starting to ad custom variable.
* Tests: Adds more queryVariableReducer tests
* Added support for custom variable. Next up applying some DRY principles and refactoring.
* fixed compile issue.
* added todo.
* Tests: Fixes broken test
* Tests: Covers queryVariableReducer with tests and fixed a couple of bugs
* Fix: Fixes broken test
* Fix: Reduces strict null errors
* change so custom won't be depending on anything elese.
* fixed descriptions.
* removed unused dependency.
* Fixed issue when adding a new variable and editor is being unmount twice.
* fixed issue with select option loop.
* changed so we update query on typing in editor and removed it from component state.
* Moved runQuery up one level in the component tree.
* renamed action and moved it to custom actions.
* moved applyStateChanges to shared code.
* removed todo comment.
* first stab on moving picker to more general.
* Refactor: Changes so we always show variables type
* removed duplicate code regarding picker.
* Did some renamings.
* Feature: Adds text box variable type
* moved tests from query reducer to picker reducer.
* Removed picker from VariableState.
* removed reference to picker.
* Some more refactorings of the picker reducer + actions.
* Chore: Refactors away editor state to its own state slice (#22515)
* Refactor: Inital move, tests not working
* Tests: Adds editorReducer tests
* Refactor: Cleaning up
* Refactor: Moves logic to thunk instead
* Refactor: Initial commit
* Refactor: Combines reducers to one state
* Refactor: Adds combine reducers
* moved navigation logic flow to a thunk instead of in the component.
* fixed issue with rendering picker link.
* Refactor: Removes variable prop from templating.variables
* refactored and removed some more code.
* Feature: adds Constant variable type
* fixed so tags can be selected.
* Fix: fixes default hide for constant and enum order
* fixed so tags works again.
* Fix: fixes so we use Angular editor when newVariables is not defined
* Fix: fixes wrong hide default for Constant variable
* Fix: fixes bug when using duplicate button
* Fix: changes action id
* Tests: prepares for newVariables
* Chore: reduces strict null errors
* Refactor: removes uuidInEditorReducer for simplification
* Chore: changes after PR comments
* Chore: uses getConfig instead of config
* Tests: fixes so e2e tests check for feature toggle and fixed initLock bug
* Refactor: changes so sharedReducer uses createSlice instead
* Refactor: changes textBoxVariableReducer to use creactSlice instead
* Refactor: changes queryBoxVariableReducer to use creactSlice instead
* Refactor: changes customVariableReducer to use creactSlice instead
* Refactor: changes constantVariableReducer to use creactSlice instead
* Refactor: moves types to specific types.ts files instead
* changed so we use queryValue stored on the variable to populate options input when opening picker.
* Feature: adds the ability to test templating thunks using real store and middleware
* Chore: cleans up unused import
* excluded queryValue from the getSaveModel
* Refactor: adds whenAsyncActionIsDispatched to reduxTester
* Tests: adds initial tests for processVariables
* Added reducer tests for constant variable.
* added tests for custom reducer.
* added tets for texbox reducer.
* Tests: adds more tests for ProcessVariable
* Refactor: fixes processVariable flow so we do notrun updateOptions twice
* Tests: finishes tests for processVariables and removed skip test
* added actions tests for custom and constant.
* Tests: adds tests for setOptionFromUrl
* Tests: adds a naive variable mock builder
* Tests: adds tests for validateVariableSelectionState
* added tests for query variable actions.
* added last test for query actions.
* added more tests.
* some more tests.
* fixed typing errors.
* Fixed issues with variable tags.
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This feature would provide a way for administrators to limit the minimum
dashboard refresh interval globally.
Filters out the refresh intervals available in the time picker that are lower
than the set minimum refresh interval in the configuration .ini file
Adds the minimum refresh interval as available in the time picker.
If the user tries to enter a refresh interval that is lower than the minimum
in the URL, defaults to the minimum interval.
When trying to update the JSON via the API, rejects the update if the
dashboard's refresh interval is lower than the minimum.
When trying to update a dashboard via provisioning having a lower
refresh interval than the minimum, defaults to the minimum interval
and logs a warning.
Fixes#3356
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Start Angular migration
* Add SignupCtrl
* Change name signup
* Add backend call
* Put form in separate file
* Add form model
* Start using react-hook-forms
* Add FormModel to state
* Reduxify
* Connect nav with Redux
* Fix routing and navModel
* Fetch state options on mount
* Add default values and add button margin
* Add errror messages
* Fix title
* Remove files and cleanup
* Add Signup tests
* Add boot config assingnAutoOrg and verifyEmailEnabled
* Remove onmount call
* Remove ctrl and move everything to SignupForm
* Make routeParams optional for testing
* Remove name if it is empty
* Set username
* Make function component
* Fix subpath issues and add link button
* Move redux to SignupPage
* 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>
* 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
* 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>
Closes#19598
Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
* Chore/Tech debt: Remove (most) instances of $q angular service use
Removes instances where the angular $q service is used and replaces
it with native Promises.
* Feature: Adds connectWithCleanup HOC
* Refactor: Small typings
* Refactor: Makes UseEffect run on Mount and UnMount only
* Refactor: Adds tests and rootReducer
* Refactor: Fixes adding of reducers on startup
* Feature: Adds connectWithCleanup HOC
* Refactor: Small typings
* Refactor: Makes UseEffect run on Mount and UnMount only
* Refactor: Adds tests and rootReducer
* Loading states and partial rendering, set loading state in mixed data source, and do not render loading states for react panels
* Updated mixed data source tests
* I needed to learn some rxjs and understand this more, so just playing around
* Updated
* Removed all the complete calls
* Refactoring
* StreamHandler -> observable start
* progress
* simple singal works
* Handle update time range
* added error handling
* wrap old function
* minor changes
* handle data format in the subscribe function
* Use replay subject to return last value to subscribers
* Set loading state after no response in 50ms
* added missing file
* updated comment
* Added cancelation of network requests
* runRequest: Added unit test scenario framework
* Progress on tests
* minor refactor of unit tests
* updated test
* removed some old code
* Shared queries work again, and also became so much simplier
* unified query and observe methods
* implict any fix
* Fixed closed subject issue
* removed comment
* Use last returned data for loading state
* WIP: Explore to runRequest makover step1
* Minor progress
* Minor progress on explore and runRequest
* minor progress
* Things are starting to work in explore
* Updated prometheus to use new observable query response, greatly simplified code
* Revert refId change
* Found better solution for key/refId/requestId problem
* use observable with loki
* tests compile
* fix loki query prep
* Explore: correct first response handling
* Refactorings
* Refactoring
* Explore: Fixes LoadingState and GraphResults between runs (#18986)
* Refactor: Adds state to DataQueryResponse
* Fix: Fixes so we do not empty results before new data arrives
Fixes: #17409
* Transformations work
* observable test data
* remove single() from loki promise
* Fixed comment
* Explore: Fixes failing Loki and Prometheus unit tests (#18995)
* Tests: Makes datasource tests work again
* Fix: Fixes loki datasource so highligthing works
* Chore: Runs Prettier
* Fixed query runner tests
* Delay loading state indication to 200ms
* Fixed test
* fixed unit tests
* Clear cached calcs
* Fixed bug getProcesedDataFrames
* Fix the correct test is a better idea
* Fix: Fixes so queries in Explore are only run if Graph/Table is shown (#19000)
* Fix: Fixes so queries in Explore are only run if Graph/Table is shown
Fixes: #18618
* Refactor: Removes unnecessary condition
* PanelData: provide legacy data only when needed (#19018)
* no legacy
* invert logic... now compiles
* merge getQueryResponseData and getDataRaw
* update comment about query editor
* use single getData() function
* only send legacy when it is used in explore
* pre process rather than post process
* pre process rather than post process
* Minor refactoring
* Add missing tags to test datasource response
* MixedDatasource: Adds query observable pattern to MixedDatasource (#19037)
* start mixed datasource
* Refactor: Refactors into observable parttern
* Tests: Fixes tests
* Tests: Removes console.log
* Refactor: Adds unique requestId
* 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
* WIP: inital POC
* Wip: Moving forward
* Wip
* Refactor: Makes loading indicator work for Prometheus
* Refactor: Reverts prom observable queries because they did not work for multiple targets
* Refactor: Transforms all epics into thunks
* Fix: Fixes scanning
* Fix: Fixes so that Instant and TimeSeries Prom query loads in parallel
* Fix: Fixes negation logic error
* Propagate errors in stream events, and close streams