forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'grafana/master' into move-threshold-and…
…-mapping-to-field * grafana/master: Elasticsearch: Visualize logs in Explore (grafana#17605) Grafana-CLI: Wrapper for `grafana-cli` within RPM/DEB packages and config/homepath are now global flags (grafana#17695) Add guidelines for SQL date comparisons (grafana#17732) Docs: clarified usage of go get and go mod (grafana#17637) Project: Issue triage doc improvement (grafana#17709) Improvement: Grafana release process minor improvements (grafana#17661) TimePicker: New time picker dropdown & custom range UI (grafana#16811) RemoteCache: redis connection string parsing test (grafana#17702) Fix link in pkg/README (grafana#17714) Dashboard: Use Explore's Prometheus editor in dashboard panel edit (grafana#15364) Settings: Fix typo in defaults.ini (grafana#17707) Project: Adds a security policy (grafana#17698) Project: Adds support resource docs (grafana#17699) Document issue triage process (grafana#17669) noImplicitAny: slate (grafana#17681) config: fix connstr for remote_cache (grafana#17675) Explore: Improves performance of Logs element by limiting re-rendering (grafana#17685) Docs: Flag serve_from_sub_path as available in 6.3 (grafana#17674) @grafana/runtime: expose config and loadPluginCss (grafana#17655) noImplicitAny: Fix basic errors (grafana#17668)
- Loading branch information
Showing
131 changed files
with
2,987 additions
and
3,447 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Reporting Security Issues | ||
------------------ | ||
|
||
If you think you have found a security vulnerability, please send a report to [security@grafana.com](mailto:security@grafana.com). This address can be used for all of Grafana Labs's open source and commercial products (including but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com). We can accept only vulnerability reports at this address. We would prefer that you encrypt your message to us; please use our PGP key. The key fingerprint is: | ||
|
||
F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA | ||
|
||
The key is available from [pgp.mit.edu](https://pgp.mit.edu/pks/lookup?op=get&search=0xF9887BEA027A049FAE8E5CAAD1258932BE24C5CA) by searching for [grafana](https://pgp.mit.edu/pks/lookup?search=grafana&op=index). | ||
|
||
Grafana Labs will send you a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. | ||
|
||
**Important:** We ask you to not disclose the vulnerability before it have been fixed and announced, unless you have got a response from the Grafana Labs security team that you can do that. | ||
|
||
### Security Announcements | ||
|
||
We maintain a category on the community site called [Security Announcements](https://community.grafana.com/c/security-announcements), | ||
where we will post a summary, remediation, and mitigation details for any patch containing security fixes. You can also subscribe to email updates to this category if you have a grafana.com account and sign on to the community site or track updates via an [RSS feed](https://community.grafana.com/c/security-announcements.rss). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Need help or support? | ||
------------------ | ||
|
||
**Please note:** | ||
- Only submit issues for bug reports, feature requests or enhancements. | ||
- Grafana project uses GitHub mainly for tracking bugs and feature requests. | ||
- Asking a question by opening an issue will directly result in issue being closed. | ||
|
||
If you require help or support then ask a question and/or find existing questions/answers in the [Grafana community site](https://community.grafana.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import extend from 'lodash/extend'; | ||
import { GrafanaTheme, getTheme, GrafanaThemeType, PanelPluginMeta, DataSourceInstanceSettings } from '@grafana/ui'; | ||
|
||
export interface BuildInfo { | ||
version: string; | ||
commit: string; | ||
isEnterprise: boolean; | ||
env: string; | ||
latestVersion: string; | ||
hasUpdate: boolean; | ||
} | ||
|
||
export class GrafanaBootConfig { | ||
datasources: { [str: string]: DataSourceInstanceSettings } = {}; | ||
panels: { [key: string]: PanelPluginMeta } = {}; | ||
appSubUrl = ''; | ||
windowTitlePrefix = ''; | ||
buildInfo: BuildInfo = {} as BuildInfo; | ||
newPanelTitle = ''; | ||
bootData: any; | ||
externalUserMngLinkUrl = ''; | ||
externalUserMngLinkName = ''; | ||
externalUserMngInfo = ''; | ||
allowOrgCreate = false; | ||
disableLoginForm = false; | ||
defaultDatasource = ''; | ||
alertingEnabled = false; | ||
alertingErrorOrTimeout = ''; | ||
alertingNoDataOrNullValues = ''; | ||
authProxyEnabled = false; | ||
exploreEnabled = false; | ||
ldapEnabled = false; | ||
oauth: any; | ||
disableUserSignUp = false; | ||
loginHint: any; | ||
passwordHint: any; | ||
loginError: any; | ||
viewersCanEdit = false; | ||
editorsCanAdmin = false; | ||
disableSanitizeHtml = false; | ||
theme: GrafanaTheme; | ||
pluginsToPreload: string[] = []; | ||
|
||
constructor(options: GrafanaBootConfig) { | ||
this.theme = options.bootData.user.lightTheme ? getTheme(GrafanaThemeType.Light) : getTheme(GrafanaThemeType.Dark); | ||
|
||
const defaults = { | ||
datasources: {}, | ||
windowTitlePrefix: 'Grafana - ', | ||
panels: {}, | ||
newPanelTitle: 'Panel Title', | ||
playlist_timespan: '1m', | ||
unsaved_changes_warning: true, | ||
appSubUrl: '', | ||
buildInfo: { | ||
version: 'v1.0', | ||
commit: '1', | ||
env: 'production', | ||
isEnterprise: false, | ||
}, | ||
viewersCanEdit: false, | ||
editorsCanAdmin: false, | ||
disableSanitizeHtml: false, | ||
}; | ||
|
||
extend(this, defaults, options); | ||
} | ||
} | ||
|
||
const bootData = (window as any).grafanaBootData || { | ||
settings: {}, | ||
user: {}, | ||
}; | ||
|
||
const options = bootData.settings; | ||
options.bootData = bootData; | ||
|
||
export const config = new GrafanaBootConfig(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './services'; | ||
export * from './config'; | ||
export { loadPluginCss } from './utils/plugin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { config } from '../config'; | ||
|
||
/* tslint:disable:import-blacklist */ | ||
import System from 'systemjs'; | ||
|
||
export interface PluginCssOptions { | ||
light: string; | ||
dark: string; | ||
} | ||
|
||
export function loadPluginCss(options: PluginCssOptions) { | ||
if (config.bootData.user.lightTheme) { | ||
System.import(options.light + '!css'); | ||
} else { | ||
System.import(options.dark + '!css'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.