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 {
*/
meta
:
boolean
;
newVariables
:
boolean
;
tracingIntegration
:
boolean
;
}
/**
...
...
packages/grafana-runtime/src/config.ts
View file @
376765b3
...
...
@@ -53,7 +53,6 @@ export class GrafanaBootConfig implements GrafanaConfig {
newEdit
:
false
,
meta
:
false
,
newVariables
:
true
,
tracingIntegration
:
false
,
};
licenseInfo
:
LicenseInfo
=
{}
as
LicenseInfo
;
rendererAvailable
=
false
;
...
...
pkg/plugins/plugins.go
View file @
376765b3
...
...
@@ -222,14 +222,6 @@ func (scanner *PluginScanner) walker(currentPath string, f os.FileInfo, err erro
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"
{
err
:=
scanner
.
loadPluginJson
(
currentPath
)
if
err
!=
nil
{
...
...
public/app/features/datasources/state/buildCategories.test.ts
View file @
376765b3
...
...
@@ -29,7 +29,7 @@ describe('buildCategories', () => {
const
categories
=
buildCategories
(
plugins
);
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
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
1
].
title
).
toBe
(
'Logging & document databases'
);
...
...
@@ -40,17 +40,17 @@ describe('buildCategories', () => {
});
it
(
'should add phantom plugin for Grafana cloud'
,
()
=>
{
expect
(
categories
[
3
].
title
).
toBe
(
'Cloud'
);
expect
(
categories
[
3
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
3
].
plugins
[
1
].
id
).
toBe
(
'gcloud'
);
expect
(
categories
[
4
].
title
).
toBe
(
'Cloud'
);
expect
(
categories
[
4
].
plugins
.
length
).
toBe
(
2
);
expect
(
categories
[
4
].
plugins
[
1
].
id
).
toBe
(
'gcloud'
);
});
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'
,
()
=>
{
expect
(
categories
[
4
].
title
).
toBe
(
'Enterprise plugins'
);
expect
(
categories
[
4
].
plugins
.
length
).
toBe
(
6
);
expect
(
categories
[
5
].
title
).
toBe
(
'Enterprise plugins'
);
expect
(
categories
[
5
].
plugins
.
length
).
toBe
(
6
);
});
});
public/app/features/datasources/state/buildCategories.ts
View file @
376765b3
import
{
DataSourcePluginMeta
,
PluginType
}
from
'@grafana/data'
;
import
{
DataSourcePluginCategory
}
from
'app/types'
;
import
{
config
}
from
'@grafana/runtime'
;
export
function
buildCategories
(
plugins
:
DataSourcePluginMeta
[]):
DataSourcePluginCategory
[]
{
const
categories
:
DataSourcePluginCategory
[]
=
[
{
id
:
'tsdb'
,
title
:
'Time series 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
:
'cloud'
,
title
:
'Cloud'
,
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';
import
{
DerivedField
}
from
'./DerivedField'
;
import
DataSourcePicker
from
'../../../../core/components/Select/DataSourcePicker'
;
jest
.
mock
(
'app/core/config'
,
()
=>
({
config
:
{
featureToggles
:
{
tracingIntegration
:
true
,
},
},
}));
jest
.
mock
(
'app/features/plugins/datasource_srv'
,
()
=>
({
getDatasourceSrv
()
{
return
{
...
...
public/app/plugins/datasource/loki/configuration/DerivedField.tsx
View file @
376765b3
...
...
@@ -8,7 +8,6 @@ import { DataSourceSelectItem } from '@grafana/data';
import
{
DerivedFieldConfig
}
from
'../types'
;
import
DataSourcePicker
from
'app/core/components/Select/DataSourcePicker'
;
import
{
getDatasourceSrv
}
from
'app/features/plugins/datasource_srv'
;
import
{
config
}
from
'app/core/config'
;
import
{
usePrevious
}
from
'react-use'
;
const
getStyles
=
stylesFactory
(()
=>
({
...
...
@@ -113,35 +112,33 @@ export const DerivedField = (props: Props) => {
`
}
/>
{
config
.
featureToggles
.
tracingIntegration
&&
(
<
div
className=
{
styles
.
row
}
>
<
Switch
label=
"Internal link"
checked=
{
showInternalLink
}
onChange=
{
()
=>
{
if
(
showInternalLink
)
{
onChange
({
...
value
,
datasourceUid
:
undefined
,
});
}
setShowInternalLink
(
!
showInternalLink
);
<
div
className=
{
styles
.
row
}
>
<
Switch
label=
"Internal link"
checked=
{
showInternalLink
}
onChange=
{
()
=>
{
if
(
showInternalLink
)
{
onChange
({
...
value
,
datasourceUid
:
undefined
,
});
}
setShowInternalLink
(
!
showInternalLink
);
}
}
/>
{
showInternalLink
&&
(
<
DataSourceSection
onChange=
{
datasourceUid
=>
{
onChange
({
...
value
,
datasourceUid
,
});
}
}
datasourceUid=
{
value
.
datasourceUid
}
/>
{
showInternalLink
&&
(
<
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