Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ca15ef1c
Commit
ca15ef1c
authored
Apr 02, 2019
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds feature flag for env dashboard
Adds specs Adds dashboard title
parent
6309b1c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
ee/app/controllers/operations_controller.rb
ee/app/controllers/operations_controller.rb
+6
-0
ee/app/views/dashboard/operations/_nav_link.html.haml
ee/app/views/dashboard/operations/_nav_link.html.haml
+9
-7
ee/spec/features/operations_nav_link_spec.rb
ee/spec/features/operations_nav_link_spec.rb
+24
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/controllers/operations_controller.rb
View file @
ca15ef1c
...
...
@@ -3,6 +3,8 @@
class
OperationsController
<
ApplicationController
before_action
:authorize_read_operations_dashboard!
before_action
:dashboard_feature_flag
,
only:
[
:environments
]
respond_to
:json
,
only:
[
:list
]
POLLING_INTERVAL
=
120_000
...
...
@@ -14,6 +16,10 @@ class OperationsController < ApplicationController
render
:index
end
def
dashboard_feature_flag
push_frontend_feature_flag
(
:environments_dashboard
)
end
def
list
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
POLLING_INTERVAL
)
projects
=
load_projects
(
current_user
)
...
...
ee/app/views/dashboard/operations/_nav_link.html.haml
View file @
ca15ef1c
-
if
can?
(
current_user
,
:read_operations_dashboard
)
%li
.dropdown
%button
.btn-link
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
%button
#js-dashboards-menu
.btn-link
{
type:
'button'
,
data:
{
toggle:
'dropdown'
},
'aria-label'
:
_
(
'Operations Dashboard'
),
'aria-haspopup'
:
true
,
'aria-expanded'
:
false
}
=
sprite_icon
(
'dashboard'
,
size:
18
)
.dropdown-menu
=
link_to
operations_path
,
class:
'dropdown-item'
,
title:
_
(
'Environments'
),
aria:
{
label:
_
(
'Environments'
)
}
do
=
_
(
'Environments'
)
-
if
can?
(
current_user
,
:read_operations_dashboard
)
=
link_to
operations_path
,
class:
'dropdown-item'
,
title:
_
(
'Operations'
),
aria:
{
label:
_
(
'Operations'
)
}
do
=
_
(
'Operations'
)
.dropdown-menu
{
'aria-labelledby'
:
"js-dashboards-menu"
}
.dropdown-bold-header
=
_
(
'Dashboards'
)
-
if
Feature
.
enabled?
(
'environments_dashboard'
)
=
link_to
operations_environments_path
,
class:
'dropdown-item'
,
title:
_
(
'Environments'
),
aria:
{
label:
_
(
'Environments'
)
}
do
=
_
(
'Environments'
)
=
link_to
operations_path
,
class:
'dropdown-item'
,
title:
_
(
'Operations'
),
aria:
{
label:
_
(
'Operations'
)
}
do
=
_
(
'Operations'
)
ee/spec/features/operations_nav_link_spec.rb
0 → 100644
View file @
ca15ef1c
require
'spec_helper'
describe
'Operations dropdown navbar EE'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
project
.
add_maintainer
(
user
)
sign_in
(
user
)
stub_licensed_features
(
operations_dashboard:
true
)
stub_feature_flags
(
environments_dashboard:
true
)
visit
project_issues_path
(
project
)
end
it
'should have a `Operations` link'
do
expect
(
page
).
to
have_link
(
'Operations'
,
href:
operations_path
)
end
it
'should have a `Environments` link'
do
expect
(
page
).
to
have_link
(
'Environments'
,
href:
operations_environments_path
)
end
end
locale/gitlab.pot
View file @
ca15ef1c
...
...
@@ -3275,6 +3275,9 @@ msgstr ""
msgid "DashboardProjects|Personal"
msgstr ""
msgid "Dashboards"
msgstr ""
msgid "Data is still calculating..."
msgstr ""
...
...
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