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
8e25bba2
Commit
8e25bba2
authored
Jun 30, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add AlertManagement Alert state pill
- Update helper, css - Add alias method
parent
3e2e2a8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
app/assets/stylesheets/framework/issue_box.scss
app/assets/stylesheets/framework/issue_box.scss
+1
-0
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+10
-1
app/models/alert_management/alert.rb
app/models/alert_management/alert.rb
+2
-0
No files found.
app/assets/stylesheets/framework/issue_box.scss
View file @
8e25bba2
...
...
@@ -30,6 +30,7 @@
}
&
.status-box-issue-closed
,
&
.status-box-alert-resolved
,
&
.status-box-mr-merged
{
background-color
:
$blue-500
;
}
...
...
app/helpers/todos_helper.rb
View file @
8e25bba2
...
...
@@ -97,6 +97,8 @@ module TodosHelper
'mr'
when
Issue
'issue'
when
AlertManagement
::
Alert
'alert'
end
content_tag
(
:span
,
nil
,
class:
'target-status'
)
do
...
...
@@ -214,7 +216,14 @@ module TodosHelper
end
def
show_todo_state?
(
todo
)
(
todo
.
target
.
is_a?
(
MergeRequest
)
||
todo
.
target
.
is_a?
(
Issue
))
&&
%w(closed merged)
.
include?
(
todo
.
target
.
state
)
case
todo
.
target
when
MergeRequest
,
Issue
%w(closed merged)
.
include?
(
todo
.
target
.
state
)
when
AlertManagement
::
Alert
%w(resolved)
.
include?
(
todo
.
target
.
state
)
else
false
end
end
def
todo_group_options
...
...
app/models/alert_management/alert.rb
View file @
8e25bba2
...
...
@@ -127,6 +127,8 @@ module AlertManagement
scope
:counts_by_status
,
->
{
group
(
:status
).
count
}
scope
:counts_by_project_id
,
->
{
group
(
:project_id
).
count
}
alias_method
:state
,
:human_status_name
def
self
.
sort_by_attribute
(
method
)
case
method
.
to_s
when
'started_at_asc'
then
order_start_time
(
:asc
)
...
...
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