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
376765b3
Unverified
Commit
376765b3
authored
Apr 23, 2020
by
Andrej Ocenas
Committed by
GitHub
Apr 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tracing: Remove feature flag (#23834)
parent
de1e70a4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
55 deletions
+33
-55
packages/grafana-data/src/types/config.ts
+0
-1
packages/grafana-runtime/src/config.ts
+0
-1
pkg/plugins/plugins.go
+0
-8
public/app/features/datasources/state/buildCategories.test.ts
+7
-7
public/app/features/datasources/state/buildCategories.ts
+1
-2
public/app/plugins/datasource/loki/configuration/DerivedField.test.tsx
+0
-8
public/app/plugins/datasource/loki/configuration/DerivedField.tsx
+25
-28
No files found.
packages/grafana-data/src/types/config.ts
View file @
376765b3
...
@@ -39,7 +39,6 @@ export interface FeatureToggles {
...
@@ -39,7 +39,6 @@ export interface FeatureToggles {
*/
*/
meta
:
boolean
;
meta
:
boolean
;
newVariables
:
boolean
;
newVariables
:
boolean
;
tracingIntegration
:
boolean
;
}
}
/**
/**
...
...
packages/grafana-runtime/src/config.ts
View file @
376765b3
...
@@ -53,7 +53,6 @@ export class GrafanaBootConfig implements GrafanaConfig {
...
@@ -53,7 +53,6 @@ export class GrafanaBootConfig implements GrafanaConfig {
newEdit
:
false
,
newEdit
:
false
,
meta
:
false
,
meta
:
false
,
newVariables
:
true
,
newVariables
:
true
,
tracingIntegration
:
false
,
};
};
licenseInfo
:
LicenseInfo
=
{}
as
LicenseInfo
;
licenseInfo
:
LicenseInfo
=
{}
as
LicenseInfo
;
rendererAvailable
=
false
;
rendererAvailable
=
false
;
...
...
pkg/plugins/plugins.go
View file @
376765b3
...
@@ -222,14 +222,6 @@ func (scanner *PluginScanner) walker(currentPath string, f os.FileInfo, err erro
...
@@ -222,14 +222,6 @@ func (scanner *PluginScanner) walker(currentPath string, f os.FileInfo, err erro
return
nil
return
nil
}
}
if
!
scanner
.
cfg
.
FeatureToggles
[
"tracingIntegration"
]
{
// Do not load tracing datasources if
prefix
:=
path
.
Join
(
setting
.
StaticRootPath
,
"app/plugins/datasource"
)
if
strings
.
Contains
(
currentPath
,
path
.
Join
(
prefix
,
"jaeger"
))
||
strings
.
Contains
(
currentPath
,
path
.
Join
(
prefix
,
"zipkin"
))
{
return
nil
}
}
if
f
.
Name
()
==
"plugin.json"
{
if
f
.
Name
()
==
"plugin.json"
{
err
:=
scanner
.
loadPluginJson
(
currentPath
)
err
:=
scanner
.
loadPluginJson
(
currentPath
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
public/app/features/datasources/state/buildCategories.test.ts
View file @
376765b3
...
@@ -29,7 +29,7 @@ describe('buildCategories', () => {
...
@@ -29,7 +29,7 @@ describe('buildCategories', () => {
const
categories
=
buildCategories
(
plugins
);
const
categories
=
buildCategories
(
plugins
);
it
(
'should group plugins into categories'
,
()
=>
{
it
(
'should group plugins into categories'
,
()
=>
{
expect
(
categories
.
length
).
toBe
(
6
);
expect
(
categories
.
length
).
toBe
(
7
);
expect
(
categories
[
0
].
title
).
toBe
(
'Time series databases'
);
expect
(
categories
[
0
].
title
).
toBe
(
'Time series databases'
);
expect
(
categories
[
0
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
0
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
1
].
title
).
toBe
(
'Logging & document databases'
);
expect
(
categories
[
1
].
title
).
toBe
(
'Logging & document databases'
);
...
@@ -40,17 +40,17 @@ describe('buildCategories', () => {
...
@@ -40,17 +40,17 @@ describe('buildCategories', () => {
});
});
it
(
'should add phantom plugin for Grafana cloud'
,
()
=>
{
it
(
'should add phantom plugin for Grafana cloud'
,
()
=>
{
expect
(
categories
[
3
].
title
).
toBe
(
'Cloud'
);
expect
(
categories
[
4
].
title
).
toBe
(
'Cloud'
);
expect
(
categories
[
3
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
4
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
3
].
plugins
[
1
].
id
).
toBe
(
'gcloud'
);
expect
(
categories
[
4
].
plugins
[
1
].
id
).
toBe
(
'gcloud'
);
});
});
it
(
'should set module to phantom on phantom plugins'
,
()
=>
{
it
(
'should set module to phantom on phantom plugins'
,
()
=>
{
expect
(
categories
[
4
].
plugins
[
0
].
module
).
toBe
(
'phantom'
);
expect
(
categories
[
5
].
plugins
[
0
].
module
).
toBe
(
'phantom'
);
});
});
it
(
'should add enterprise phantom plugins'
,
()
=>
{
it
(
'should add enterprise phantom plugins'
,
()
=>
{
expect
(
categories
[
4
].
title
).
toBe
(
'Enterprise plugins'
);
expect
(
categories
[
5
].
title
).
toBe
(
'Enterprise plugins'
);
expect
(
categories
[
4
].
plugins
.
length
).
toBe
(
6
);
expect
(
categories
[
5
].
plugins
.
length
).
toBe
(
6
);
});
});
});
});
public/app/features/datasources/state/buildCategories.ts
View file @
376765b3
import
{
DataSourcePluginMeta
,
PluginType
}
from
'@grafana/data'
;
import
{
DataSourcePluginMeta
,
PluginType
}
from
'@grafana/data'
;
import
{
DataSourcePluginCategory
}
from
'app/types'
;
import
{
DataSourcePluginCategory
}
from
'app/types'
;
import
{
config
}
from
'@grafana/runtime'
;
export
function
buildCategories
(
plugins
:
DataSourcePluginMeta
[]):
DataSourcePluginCategory
[]
{
export
function
buildCategories
(
plugins
:
DataSourcePluginMeta
[]):
DataSourcePluginCategory
[]
{
const
categories
:
DataSourcePluginCategory
[]
=
[
const
categories
:
DataSourcePluginCategory
[]
=
[
{
id
:
'tsdb'
,
title
:
'Time series databases'
,
plugins
:
[]
},
{
id
:
'tsdb'
,
title
:
'Time series databases'
,
plugins
:
[]
},
{
id
:
'logging'
,
title
:
'Logging & document databases'
,
plugins
:
[]
},
{
id
:
'logging'
,
title
:
'Logging & document databases'
,
plugins
:
[]
},
config
.
featureToggles
.
tracingIntegration
?
{
id
:
'tracing'
,
title
:
'Distributed tracing'
,
plugins
:
[]
}
:
null
,
{
id
:
'tracing'
,
title
:
'Distributed tracing'
,
plugins
:
[]
}
,
{
id
:
'sql'
,
title
:
'SQL'
,
plugins
:
[]
},
{
id
:
'sql'
,
title
:
'SQL'
,
plugins
:
[]
},
{
id
:
'cloud'
,
title
:
'Cloud'
,
plugins
:
[]
},
{
id
:
'cloud'
,
title
:
'Cloud'
,
plugins
:
[]
},
{
id
:
'enterprise'
,
title
:
'Enterprise plugins'
,
plugins
:
[]
},
{
id
:
'enterprise'
,
title
:
'Enterprise plugins'
,
plugins
:
[]
},
...
...
public/app/plugins/datasource/loki/configuration/DerivedField.test.tsx
View file @
376765b3
...
@@ -3,14 +3,6 @@ import { shallow } from 'enzyme';
...
@@ -3,14 +3,6 @@ import { shallow } from 'enzyme';
import
{
DerivedField
}
from
'./DerivedField'
;
import
{
DerivedField
}
from
'./DerivedField'
;
import
DataSourcePicker
from
'../../../../core/components/Select/DataSourcePicker'
;
import
DataSourcePicker
from
'../../../../core/components/Select/DataSourcePicker'
;
jest
.
mock
(
'app/core/config'
,
()
=>
({
config
:
{
featureToggles
:
{
tracingIntegration
:
true
,
},
},
}));
jest
.
mock
(
'app/features/plugins/datasource_srv'
,
()
=>
({
jest
.
mock
(
'app/features/plugins/datasource_srv'
,
()
=>
({
getDatasourceSrv
()
{
getDatasourceSrv
()
{
return
{
return
{
...
...
public/app/plugins/datasource/loki/configuration/DerivedField.tsx
View file @
376765b3
...
@@ -8,7 +8,6 @@ import { DataSourceSelectItem } from '@grafana/data';
...
@@ -8,7 +8,6 @@ import { DataSourceSelectItem } from '@grafana/data';
import
{
DerivedFieldConfig
}
from
'../types'
;
import
{
DerivedFieldConfig
}
from
'../types'
;
import
DataSourcePicker
from
'app/core/components/Select/DataSourcePicker'
;
import
DataSourcePicker
from
'app/core/components/Select/DataSourcePicker'
;
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
{
config
}
from
'app/core/config'
;
import
{
usePrevious
}
from
'react-use'
;
import
{
usePrevious
}
from
'react-use'
;
const
getStyles
=
stylesFactory
(()
=>
({
const
getStyles
=
stylesFactory
(()
=>
({
...
@@ -113,35 +112,33 @@ export const DerivedField = (props: Props) => {
...
@@ -113,35 +112,33 @@ export const DerivedField = (props: Props) => {
`
}
`
}
/>
/>
{
config
.
featureToggles
.
tracingIntegration
&&
(
<
div
className=
{
styles
.
row
}
>
<
div
className=
{
styles
.
row
}
>
<
Switch
<
Switch
label=
"Internal link"
label=
"Internal link"
checked=
{
showInternalLink
}
checked=
{
showInternalLink
}
onChange=
{
()
=>
{
onChange=
{
()
=>
{
if
(
showInternalLink
)
{
if
(
showInternalLink
)
{
onChange
({
onChange
({
...
value
,
...
value
,
datasourceUid
:
undefined
,
datasourceUid
:
undefined
,
});
});
}
}
setShowInternalLink
(
!
showInternalLink
);
setShowInternalLink
(
!
showInternalLink
);
}
}
/>
{
showInternalLink
&&
(
<
DataSourceSection
onChange=
{
datasourceUid
=>
{
onChange
({
...
value
,
datasourceUid
,
});
}
}
}
}
datasourceUid=
{
value
.
datasourceUid
}
/>
/>
)
}
{
showInternalLink
&&
(
</
div
>
<
DataSourceSection
onChange=
{
datasourceUid
=>
{
onChange
({
...
value
,
datasourceUid
,
});
}
}
datasourceUid=
{
value
.
datasourceUid
}
/>
)
}
</
div
>
)
}
</
div
>
</
div
>
);
);
};
};
...
...
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