Открыть боковую панель
nt_test132
nt_project_7gohtg18g8li
Коммиты
a4e320a4
Коммит
a4e320a4
создал
Июн 12, 2019
по автору
Reuben Pereira
Зафиксировано автором
Mike Greiling
Июн 12, 2019
Просмотр файлов
Remove the grafana_dashboard_link feature flag
владелец
b98633ad
Изменения
5
Скрыть пробелы
Построчно
Рядом
app/assets/javascripts/operation_settings/index.js
Просмотр файла @
a4e320a4
...
...
@@ -3,14 +3,6 @@ import store from './store';
import
ExternalDashboardForm
from
'
./components/external_dashboard.vue
'
;
export
default
()
=>
{
/**
* This check can be removed when we remove
* the :grafana_dashboard_link feature flag
*/
if
(
!
gon
.
features
.
grafanaDashboardLink
)
{
return
null
;
}
const
el
=
document
.
querySelector
(
'
.js-operation-settings
'
);
return
new
Vue
({
...
...
app/controllers/projects/environments_controller.rb
Просмотр файла @
a4e320a4
...
...
@@ -13,7 +13,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action
only:
[
:metrics
,
:additional_metrics
,
:metrics_dashboard
]
do
push_frontend_feature_flag
(
:environment_metrics_use_prometheus_endpoint
)
push_frontend_feature_flag
(
:environment_metrics_show_multiple_dashboards
)
push_frontend_feature_flag
(
:grafana_dashboard_link
)
push_frontend_feature_flag
(
:prometheus_computed_alerts
)
end
...
...
app/controllers/projects/settings/operations_controller.rb
Просмотр файла @
a4e320a4
...
...
@@ -5,10 +5,6 @@ module Settings
class
OperationsController
<
Projects
::
ApplicationController
before_action
:authorize_update_environment!
before_action
do
push_frontend_feature_flag
(
:grafana_dashboard_link
)
end
helper_method
:error_tracking_setting
def
show
...
...
changelogs/unreleased/remove-grafana-dashboard-link-feature-flag.yml
0 → 100644
Просмотр файла @
a4e320a4
---
title
:
Link to an external dashboard from metrics dashboard
merge_request
:
29369
author
:
type
:
added
spec/javascripts/monitoring/dashboard_spec.js
Просмотр файла @
a4e320a4
...
...
@@ -49,9 +49,6 @@ describe('Dashboard', () => {
window
.
gon
=
{
...
window
.
gon
,
ee
:
false
,
features
:
{
grafanaDashboardLink
:
true
,
},
};
store
=
createStore
();
...
...
@@ -382,52 +379,26 @@ describe('Dashboard', () => {
describe
(
'
external dashboard link
'
,
()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
});
describe
(
'
with feature flag enabled
'
,
()
=>
{
beforeEach
(()
=>
{
component
=
new
DashboardComponent
({
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
false
,
externalDashboardUrl
:
'
/mockUrl
'
,
},
store
,
});
});
it
(
'
shows the link
'
,
done
=>
{
setTimeout
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-external-dashboard-link
'
).
innerText
).
toContain
(
'
View full dashboard
'
,
);
done
();
});
component
=
new
DashboardComponent
({
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
false
,
showTimeWindowDropdown
:
false
,
externalDashboardUrl
:
'
/mockUrl
'
,
},
store
,
});
});
describe
(
'
without feature flage enabled
'
,
()
=>
{
beforeEach
(()
=>
{
window
.
gon
.
features
.
grafanaDashboardLink
=
false
;
component
=
new
DashboardComponent
({
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
false
,
externalDashboardUrl
:
''
,
},
store
,
});
});
it
(
'
does not show the link
'
,
done
=>
{
setTimeout
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-external-dashboard-link
'
)).
toBe
(
null
);
done
();
});
it
(
'
shows the link
'
,
done
=>
{
setTimeout
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-external-dashboard-link
'
).
innerText
).
toContain
(
'
View full dashboard
'
,
);
done
();
});
});
});
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать