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
3ca7523a
Commit
3ca7523a
authored
Jan 16, 2019
by
Johannes Schill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Use Page component on "Api Keys" and "Preferences" under Configuration
parent
feeb3ea5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
33 deletions
+32
-33
public/app/features/api-keys/ApiKeysPage.tsx
+14
-15
public/app/features/org/OrgDetailsPage.tsx
+18
-18
No files found.
public/app/features/api-keys/ApiKeysPage.tsx
View file @
3ca7523a
...
...
@@ -3,11 +3,10 @@ import ReactDOMServer from 'react-dom/server';
import
{
connect
}
from
'react-redux'
;
import
{
hot
}
from
'react-hot-loader'
;
import
{
NavModel
,
ApiKey
,
NewApiKey
,
OrgRole
}
from
'app/types'
;
import
{
getNavModel
}
from
'app/core/selectors/navModel'
;
import
{
getNavModel
,
getTitleFromNavModel
}
from
'app/core/selectors/navModel'
;
import
{
getApiKeys
,
getApiKeysCount
}
from
'./state/selectors'
;
import
{
loadApiKeys
,
deleteApiKey
,
setSearchQuery
,
addApiKey
}
from
'./state/actions'
;
import
PageHeader
from
'app/core/components/PageHeader/PageHeader'
;
import
PageLoader
from
'app/core/components/PageLoader/PageLoader'
;
import
Page
from
'app/core/components/Page/Page'
;
import
SlideDown
from
'app/core/components/Animations/SlideDown'
;
import
ApiKeysAddedModal
from
'./ApiKeysAddedModal'
;
import
config
from
'app/core/config'
;
...
...
@@ -240,18 +239,18 @@ export class ApiKeysPage extends PureComponent<Props, any> {
const
{
hasFetched
,
navModel
,
apiKeysCount
}
=
this
.
props
;
return
(
<
div
>
<
PageHeader
model=
{
navModel
}
/>
{
hasFetched
?
(
apiKeysCount
>
0
?
(
this
.
renderApiKeyList
()
)
:
(
this
.
renderEmptyList
()
)
)
:
(
<
PageLoader
pageName=
"Api keys"
/>
)
}
</
div
>
<
Page
title=
{
getTitleFromNavModel
(
navModel
)
}
>
<
Page
.
Header
model=
{
navModel
}
/>
<
Page
.
Contents
isLoading=
{
!
hasFetched
}
>
{
hasFetched
&&
(
apiKeysCount
>
0
?
(
this
.
renderApiKeyList
()
)
:
(
this
.
renderEmptyList
(
)
)
)
}
</
Page
.
Contents
>
</
Page
>
);
}
}
...
...
public/app/features/org/OrgDetailsPage.tsx
View file @
3ca7523a
import
React
,
{
PureComponent
}
from
'react'
;
import
{
hot
}
from
'react-hot-loader'
;
import
{
connect
}
from
'react-redux'
;
import
PageHeader
from
'../../core/components/PageHeader/PageHeader'
;
import
PageLoader
from
'../../core/components/PageLoader/PageLoader'
;
import
Page
from
'app/core/components/Page/Page'
;
import
OrgProfile
from
'./OrgProfile'
;
import
SharedPreferences
from
'app/core/components/SharedPreferences/SharedPreferences'
;
import
{
loadOrganization
,
setOrganizationName
,
updateOrganization
}
from
'./state/actions'
;
import
{
NavModel
,
Organization
,
StoreState
}
from
'app/types'
;
import
{
getNavModel
}
from
'../..
/core/selectors/navModel'
;
import
{
getNavModel
,
getTitleFromNavModel
}
from
'app
/core/selectors/navModel'
;
export
interface
Props
{
navModel
:
NavModel
;
...
...
@@ -35,22 +34,23 @@ export class OrgDetailsPage extends PureComponent<Props> {
const
isLoading
=
Object
.
keys
(
organization
).
length
===
0
;
return
(
<
div
>
<
PageHeader
model=
{
navModel
}
/>
<
div
className=
"page-container page-body"
>
{
isLoading
&&
<
PageLoader
pageName=
"Organization"
/>
}
{
!
isLoading
&&
(
<
div
>
<
OrgProfile
onOrgNameChange=
{
name
=>
this
.
onOrgNameChange
(
name
)
}
onSubmit=
{
this
.
onUpdateOrganization
}
orgName=
{
organization
.
name
}
/>
<
SharedPreferences
resourceUri=
"org"
/>
<
Page
title=
{
getTitleFromNavModel
(
navModel
)
}
>
<
Page
.
Header
model=
{
navModel
}
/>
<
Page
.
Contents
isLoading=
{
isLoading
}
>
<
div
className=
"page-container page-body"
>
{
!
isLoading
&&
(
<
div
>
<
OrgProfile
onOrgNameChange=
{
name
=>
this
.
onOrgNameChange
(
name
)
}
onSubmit=
{
this
.
onUpdateOrganization
}
orgName=
{
organization
.
name
}
/>
<
SharedPreferences
resourceUri=
"org"
/>
</
div
>
)
}
</
div
>
)
}
</
div
>
</
div
>
</
Page
.
Contents
>
</
Page
>
);
}
}
...
...
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