Skip to content

Commit 89ea47e

Browse files
committed
Merge branch 'master' into folder-to-redux
2 parents 61112d9 + 9f73f13 commit 89ea47e

38 files changed

+930
-876
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Minor
44

55
* **OAuth**: Allow oauth email attribute name to be configurable [#12986](https://github.com/grafana/grafana/issues/12986), thx [@bobmshannon](https://github.com/bobmshannon)
6+
* **Tags**: Default sort order for GetDashboardTags [#11681](https://github.com/grafana/grafana/pull/11681), thx [@Jonnymcc](https://github.com/Jonnymcc)
67

78
# 5.3.0 (unreleased)
89

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,3 @@ test: test-go test-js
4343

4444
run:
4545
./bin/grafana-server
46-
47-
protoc:
48-
protoc -I pkg/tsdb/models pkg/tsdb/models/*.proto --go_out=plugins=grpc:pkg/tsdb/models/.

docs/sources/auth/generic-oauth.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,36 @@ allowed_organizations =
174174
allowed_organizations =
175175
```
176176

177+
## Set up OAuth2 with Centrify
178+
179+
1. Create a new Custom OpenID Connect application configuration in the Centrify dashboard.
180+
181+
2. Create a memorable unique Application ID, e.g. "grafana", "grafana_aws", etc.
182+
183+
3. Put in other basic configuration (name, description, logo, category)
184+
185+
4. On the Trust tab, generate a long password and put it into the OpenID Connect Client Secret field.
186+
187+
5. Put the URL to the front page of your Grafana instance into the "Resource Application URL" field.
188+
189+
6. Add an authorized Redirect URI like https://your-grafana-server/login/generic_oauth
190+
191+
7. Set up permissions, policies, etc. just like any other Centrify app
192+
193+
8. Configure Grafana as follows:
194+
195+
```bash
196+
[auth.generic_oauth]
197+
name = Centrify
198+
enabled = true
199+
allow_sign_up = true
200+
client_id = <OpenID Connect Client ID from Centrify>
201+
client_secret = <your generated OpenID Connect Client Sercret"
202+
scopes = openid email name
203+
auth_url = https://<your domain>.my.centrify.com/OAuth2/Authorize/<Application ID>
204+
token_url = https://<your domain>.my.centrify.com/OAuth2/Token/<Application ID>
205+
```
206+
177207
<hr>
178208
179209

jest.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11

22
module.exports = {
33
verbose: false,
4-
"globals": {
5-
"ts-jest": {
6-
"tsConfigFile": "tsconfig.json"
7-
}
8-
},
94
"transform": {
10-
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
5+
"^.+\\.(ts|tsx)$": "ts-jest"
116
},
127
"moduleDirectories": ["node_modules", "public"],
138
"roots": [

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"expect.js": "~0.2.0",
3535
"expose-loader": "^0.7.3",
3636
"file-loader": "^1.1.11",
37-
"fork-ts-checker-webpack-plugin": "^0.4.2",
37+
"fork-ts-checker-webpack-plugin": "^0.4.9",
3838
"gaze": "^1.1.2",
3939
"glob": "~7.0.0",
4040
"grunt": "1.0.1",
@@ -56,7 +56,7 @@
5656
"html-webpack-harddisk-plugin": "^0.2.0",
5757
"html-webpack-plugin": "^3.2.0",
5858
"husky": "^0.14.3",
59-
"jest": "^22.0.4",
59+
"jest": "^23.6.0",
6060
"lint-staged": "^6.0.0",
6161
"load-grunt-tasks": "3.5.2",
6262
"mini-css-extract-plugin": "^0.4.0",
@@ -80,12 +80,12 @@
8080
"style-loader": "^0.21.0",
8181
"systemjs": "0.20.19",
8282
"systemjs-plugin-css": "^0.1.36",
83-
"ts-jest": "^22.4.6",
84-
"ts-loader": "^4.3.0",
83+
"ts-jest": "^23.1.4",
84+
"ts-loader": "^5.1.0",
8585
"tslib": "^1.9.3",
8686
"tslint": "^5.8.0",
8787
"tslint-loader": "^3.5.3",
88-
"typescript": "^2.6.2",
88+
"typescript": "^3.0.3",
8989
"uglifyjs-webpack-plugin": "^1.2.7",
9090
"webpack": "^4.8.0",
9191
"webpack-bundle-analyzer": "^2.9.0",
@@ -133,6 +133,7 @@
133133
"angular-native-dragdrop": "1.2.2",
134134
"angular-route": "1.6.6",
135135
"angular-sanitize": "1.6.6",
136+
"babel-jest": "^23.6.0",
136137
"babel-polyfill": "^6.26.0",
137138
"baron": "^3.0.3",
138139
"brace": "^0.10.0",

pkg/services/sqlstore/dashboard.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ func GetDashboardTags(query *m.GetDashboardTagsQuery) error {
295295
FROM dashboard
296296
INNER JOIN dashboard_tag on dashboard_tag.dashboard_id = dashboard.id
297297
WHERE dashboard.org_id=?
298-
GROUP BY term`
298+
GROUP BY term
299+
ORDER BY term`
299300

300301
query.Result = make([]*m.DashboardTagCloudItem, 0)
301302
sess := x.Sql(sql, query.OrgId)

pkg/tsdb/cloudwatch/metric_find_query.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ func (e *CloudWatchExecutor) handleGetEc2InstanceAttribute(ctx context.Context,
466466
return nil, errors.New("invalid attribute path")
467467
}
468468
v = v.FieldByName(key)
469+
if !v.IsValid() {
470+
return nil, errors.New("invalid attribute path")
471+
}
469472
}
470473
if attr, ok := v.Interface().(*string); ok {
471474
data = *attr

public/app/core/actions/navModel.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ export enum ActionTypes {
66

77
export type Action = UpdateNavIndexAction;
88

9-
// this action is not used yet
10-
// kind of just a placeholder, will be need for dynamic pages
11-
// like datasource edit, teams edit page
12-
139
export interface UpdateNavIndexAction {
1410
type: ActionTypes.UpdateNavIndex;
1511
payload: NavModelItem;

public/app/core/components/Picker/__snapshots__/TeamPicker.test.tsx.snap

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ exports[`TeamPicker renders correctly 1`] = `
66
>
77
<div
88
className="Select gf-form-input gf-form-input--form-dropdown is-clearable is-loading is-searchable Select--single"
9-
style={undefined}
109
>
1110
<div
1211
className="Select-control"
@@ -15,7 +14,6 @@ exports[`TeamPicker renders correctly 1`] = `
1514
onTouchEnd={[Function]}
1615
onTouchMove={[Function]}
1716
onTouchStart={[Function]}
18-
style={undefined}
1917
>
2018
<span
2119
className="Select-multi-value-wrapper"
@@ -36,14 +34,9 @@ exports[`TeamPicker renders correctly 1`] = `
3634
>
3735
<input
3836
aria-activedescendant="react-select-2--value"
39-
aria-describedby={undefined}
4037
aria-expanded="false"
4138
aria-haspopup="false"
42-
aria-label={undefined}
43-
aria-labelledby={undefined}
4439
aria-owns=""
45-
className={undefined}
46-
id={undefined}
4740
onBlur={[Function]}
4841
onChange={[Function]}
4942
onFocus={[Function]}
@@ -55,7 +48,6 @@ exports[`TeamPicker renders correctly 1`] = `
5548
"width": "5px",
5649
}
5750
}
58-
tabIndex={undefined}
5951
value=""
6052
/>
6153
<div

public/app/core/components/Picker/__snapshots__/UserPicker.test.tsx.snap

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ exports[`UserPicker renders correctly 1`] = `
66
>
77
<div
88
className="Select gf-form-input gf-form-input--form-dropdown is-clearable is-loading is-searchable Select--single"
9-
style={undefined}
109
>
1110
<div
1211
className="Select-control"
@@ -15,7 +14,6 @@ exports[`UserPicker renders correctly 1`] = `
1514
onTouchEnd={[Function]}
1615
onTouchMove={[Function]}
1716
onTouchStart={[Function]}
18-
style={undefined}
1917
>
2018
<span
2119
className="Select-multi-value-wrapper"
@@ -36,14 +34,9 @@ exports[`UserPicker renders correctly 1`] = `
3634
>
3735
<input
3836
aria-activedescendant="react-select-2--value"
39-
aria-describedby={undefined}
4037
aria-expanded="false"
4138
aria-haspopup="false"
42-
aria-label={undefined}
43-
aria-labelledby={undefined}
4439
aria-owns=""
45-
className={undefined}
46-
id={undefined}
4740
onBlur={[Function]}
4841
onChange={[Function]}
4942
onFocus={[Function]}
@@ -55,7 +48,6 @@ exports[`UserPicker renders correctly 1`] = `
5548
"width": "5px",
5649
}
5750
}
58-
tabIndex={undefined}
5951
value=""
6052
/>
6153
<div

0 commit comments

Comments
 (0)