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
36f3edc4
Unverified
Commit
36f3edc4
authored
Oct 08, 2020
by
Peter Holmberg
Committed by
GitHub
Oct 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Ensure Notification types loaded before loading notification channel (#28115)
parent
15cb07de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
public/app/features/alerting/EditNotificationChannelPage.tsx
+1
-9
public/app/features/alerting/state/actions.ts
+1
-0
No files found.
public/app/features/alerting/EditNotificationChannelPage.tsx
View file @
36f3edc4
...
...
@@ -6,12 +6,7 @@ import { Form, Spinner } from '@grafana/ui';
import
Page
from
'app/core/components/Page/Page'
;
import
{
connectWithCleanUp
}
from
'app/core/components/connectWithCleanUp'
;
import
{
NotificationChannelForm
}
from
'./components/NotificationChannelForm'
;
import
{
loadNotificationChannel
,
loadNotificationTypes
,
testNotificationChannel
,
updateNotificationChannel
,
}
from
'./state/actions'
;
import
{
loadNotificationChannel
,
testNotificationChannel
,
updateNotificationChannel
}
from
'./state/actions'
;
import
{
getNavModel
}
from
'app/core/selectors/navModel'
;
import
{
getRouteParamsId
}
from
'app/core/selectors/location'
;
import
{
mapChannelsToSelectableValue
,
transformSubmitData
,
transformTestData
}
from
'./utils/notificationChannels'
;
...
...
@@ -28,7 +23,6 @@ interface ConnectedProps {
}
interface
DispatchProps
{
loadNotificationTypes
:
typeof
loadNotificationTypes
;
loadNotificationChannel
:
typeof
loadNotificationChannel
;
testNotificationChannel
:
typeof
testNotificationChannel
;
updateNotificationChannel
:
typeof
updateNotificationChannel
;
...
...
@@ -41,7 +35,6 @@ export class EditNotificationChannelPage extends PureComponent<Props> {
componentDidMount
()
{
const
{
channelId
}
=
this
.
props
;
this
.
props
.
loadNotificationTypes
();
this
.
props
.
loadNotificationChannel
(
channelId
);
}
...
...
@@ -136,7 +129,6 @@ const mapStateToProps: MapStateToProps<ConnectedProps, OwnProps, StoreState> = s
};
const
mapDispatchToProps
:
MapDispatchToProps
<
DispatchProps
,
OwnProps
>
=
{
loadNotificationTypes
,
loadNotificationChannel
,
testNotificationChannel
,
updateNotificationChannel
,
...
...
public/app/features/alerting/state/actions.ts
View file @
36f3edc4
...
...
@@ -69,6 +69,7 @@ export function loadNotificationTypes(): ThunkResult<void> {
export
function
loadNotificationChannel
(
id
:
number
):
ThunkResult
<
void
>
{
return
async
dispatch
=>
{
await
dispatch
(
loadNotificationTypes
());
const
notificationChannel
=
await
getBackendSrv
().
get
(
`/api/alert-notifications/
${
id
}
`
);
dispatch
(
notificationChannelLoaded
(
notificationChannel
));
};
...
...
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