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
2e4a1f31
Commit
2e4a1f31
authored
Oct 06, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux: final fixes to new datasource page
parent
8e285962
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
public/app/features/datasources/state/actions.ts
+11
-10
public/sass/_variables.dark.scss
+1
-1
public/sass/components/_add_data_source.scss
+2
-1
public/sass/components/_cards.scss
+1
-1
No files found.
public/app/features/datasources/state/actions.ts
View file @
2e4a1f31
...
@@ -82,21 +82,22 @@ export function loadDataSources(): ThunkResult<void> {
...
@@ -82,21 +82,22 @@ export function loadDataSources(): ThunkResult<void> {
export
function
addDataSource
(
plugin
:
Plugin
):
ThunkResult
<
void
>
{
export
function
addDataSource
(
plugin
:
Plugin
):
ThunkResult
<
void
>
{
return
async
(
dispatch
,
getStore
)
=>
{
return
async
(
dispatch
,
getStore
)
=>
{
let
dataSources
=
getStore
().
dataSources
.
dataSources
;
await
dispatch
(
loadDataSources
())
;
if
(
dataSources
.
length
===
0
)
{
const
dataSources
=
getStore
().
dataSources
.
dataSources
;
dispatch
(
loadDataSources
());
dataSources
=
getStore
().
dataSources
.
dataSources
;
const
newInstance
=
{
}
name
:
plugin
.
name
,
type
:
plugin
.
id
,
let
name
=
plugin
.
name
;
access
:
'proxy'
,
isDefault
:
dataSources
.
length
===
0
,
};
if
(
nameExits
(
dataSources
,
name
))
{
if
(
nameExits
(
dataSources
,
n
ewInstance
.
n
ame
))
{
n
ame
=
findNewName
(
dataSources
,
name
);
n
ewInstance
.
name
=
findNewName
(
dataSources
,
newInstance
.
name
);
}
}
const
result
=
await
getBackendSrv
().
post
(
'/api/datasources'
,
{
name
:
name
,
type
:
plugin
.
id
,
access
:
'proxy'
}
);
const
result
=
await
getBackendSrv
().
post
(
'/api/datasources'
,
newInstance
);
dispatch
(
updateLocation
({
path
:
`/datasources/edit/
${
result
.
id
}
`
}));
dispatch
(
updateLocation
({
path
:
`/datasources/edit/
${
result
.
id
}
`
}));
};
};
}
}
...
...
public/sass/_variables.dark.scss
View file @
2e4a1f31
...
@@ -120,7 +120,7 @@ $code-tag-border: lighten($code-tag-bg, 2%);
...
@@ -120,7 +120,7 @@ $code-tag-border: lighten($code-tag-bg, 2%);
// cards
// cards
$card-background
:
linear-gradient
(
135deg
,
#2f2f32
,
#262628
);
$card-background
:
linear-gradient
(
135deg
,
#2f2f32
,
#262628
);
$card-background-hover
:
linear-gradient
(
135deg
,
$dark-3
,
$dark-2
);
$card-background-hover
:
linear-gradient
(
135deg
,
#343436
,
#262628
);
$card-shadow
:
-1px
-1px
0
0
hsla
(
0
,
0%
,
100%
,
0
.1
)
,
1px
1px
0
0
rgba
(
0
,
0
,
0
,
0
.3
);
$card-shadow
:
-1px
-1px
0
0
hsla
(
0
,
0%
,
100%
,
0
.1
)
,
1px
1px
0
0
rgba
(
0
,
0
,
0
,
0
.3
);
// Lists
// Lists
...
...
public/sass/components/_add_data_source.scss
View file @
2e4a1f31
...
@@ -28,10 +28,11 @@
...
@@ -28,10 +28,11 @@
cursor
:
pointer
;
cursor
:
pointer
;
background
:
$card-background
;
background
:
$card-background
;
box-shadow
:
$card-shadow
;
box-shadow
:
$card-shadow
;
color
:
$
headings
-color
;
color
:
$
text
-color
;
&
:hover
{
&
:hover
{
background
:
$card-background-hover
;
background
:
$card-background-hover
;
color
:
$text-color-strong
;
}
}
}
}
...
...
public/sass/components/_cards.scss
View file @
2e4a1f31
...
@@ -191,6 +191,7 @@
...
@@ -191,6 +191,7 @@
.card-item-wrapper
{
.card-item-wrapper
{
padding
:
0
;
padding
:
0
;
width
:
100%
;
width
:
100%
;
margin-bottom
:
3px
;
}
}
.card-item-wrapper--clickable
{
.card-item-wrapper--clickable
{
...
@@ -198,7 +199,6 @@
...
@@ -198,7 +199,6 @@
}
}
.card-item
{
.card-item
{
border-bottom
:
3px
solid
$page-bg
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
...
...
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