Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
0fa20cb2
Unverified
Commit
0fa20cb2
authored
Jan 28, 2020
by
Shavonn Brown
Committed by
GitHub
Jan 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Azure Monitor: Fix Application Insights API key field to allow input (#21738)
* Fix update api key input * update snapshot
parent
85dad73e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx
+6
-1
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx
+1
-0
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx
+4
-3
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap
+1
-0
No files found.
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/ConfigEditor.tsx
View file @
0fa20cb2
...
...
@@ -296,7 +296,12 @@ export class ConfigEditor extends PureComponent<Props, State> {
onLoadWorkspaces=
{
this
.
getWorkspaces
}
/>
<
InsightsConfig
options=
{
options
}
onUpdateOption=
{
this
.
updateOption
}
onResetOptionKey=
{
this
.
resetKey
}
/>
<
InsightsConfig
options=
{
options
}
onUpdateOption=
{
this
.
updateOption
}
onUpdateSecureOption=
{
this
.
updateSecureOption
}
onResetOptionKey=
{
this
.
resetKey
}
/>
</>
);
}
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.test.tsx
View file @
0fa20cb2
...
...
@@ -35,6 +35,7 @@ const setup = (propOverrides?: object) => {
readOnly
:
false
,
},
onUpdateOption
:
jest
.
fn
(),
onUpdateSecureOption
:
jest
.
fn
(),
onResetOptionKey
:
jest
.
fn
(),
};
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/InsightsConfig.tsx
View file @
0fa20cb2
...
...
@@ -4,16 +4,17 @@ import { AzureDataSourceSettings } from '../types';
export
interface
Props
{
options
:
AzureDataSourceSettings
;
onUpdateOption
:
(
key
:
string
,
val
:
any
,
secure
:
boolean
)
=>
void
;
onUpdateOption
:
(
key
:
string
,
val
:
any
)
=>
void
;
onUpdateSecureOption
:
(
key
:
string
,
val
:
any
)
=>
void
;
onResetOptionKey
:
(
key
:
string
)
=>
void
;
}
export
class
InsightsConfig
extends
PureComponent
<
Props
>
{
onAppInsightsAppIdChange
=
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
this
.
props
.
onUpdateOption
(
'appInsightsAppId'
,
event
.
target
.
value
,
false
);
this
.
props
.
onUpdateOption
(
'appInsightsAppId'
,
event
.
target
.
value
);
};
onAppInsightsApiKeyChange
=
(
event
:
ChangeEvent
<
HTMLInputElement
>
)
=>
{
this
.
props
.
onUpdate
Option
(
'appInsightsApiKey'
,
event
.
target
.
value
,
tr
ue
);
this
.
props
.
onUpdate
SecureOption
(
'appInsightsApiKey'
,
event
.
target
.
val
ue
);
};
onAppInsightsResetApiKey
=
()
=>
{
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/components/__snapshots__/ConfigEditor.test.tsx.snap
View file @
0fa20cb2
...
...
@@ -80,6 +80,7 @@ exports[`Render should render component 1`] = `
<InsightsConfig
onResetOptionKey={[Function]}
onUpdateOption={[Function]}
onUpdateSecureOption={[Function]}
options={
Object {
"access": "proxy",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment