BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5c888c42
Commit
5c888c42
authored
Oct 05, 2017
by
Jarka Kadlecova
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
parents
806baa41
8500ec82
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
145 additions
and
78 deletions
+145
-78
empty_state.vue
app/assets/javascripts/monitoring/components/empty_state.vue
+15
-27
monitoring_bundle.js
app/assets/javascripts/monitoring/monitoring_bundle.js
+1
-4
repo_sidebar.vue
app/assets/javascripts/repo/components/repo_sidebar.vue
+2
-2
mr_widget_ready_to_merge.js
...uest_widget/components/states/mr_widget_ready_to_merge.js
+24
-8
environments.scss
app/assets/stylesheets/pages/environments.scss
+6
-3
application_controller.rb
app/controllers/application_controller.rb
+12
-3
git_http_client_controller.rb
app/controllers/projects/git_http_client_controller.rb
+1
-0
_old_tree_content.html.haml
app/views/projects/tree/_old_tree_content.html.haml
+1
-1
37229-mr-widget-status-icon.yml
changelogs/unreleased/37229-mr-widget-status-icon.yml
+5
-0
sh-fix-username-logging.yml
changelogs/unreleased/sh-fix-username-logging.yml
+5
-0
job_artifacts.md
doc/administration/job_artifacts.md
+3
-3
gitlab.pot
locale/gitlab.pot
+8
-14
repo_sidebar_spec.js
spec/javascripts/repo/components/repo_sidebar_spec.js
+2
-2
mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+60
-11
No files found.
app/assets/javascripts/monitoring/components/empty_state.vue
View file @
5c888c42
...
...
@@ -73,34 +73,22 @@
<
template
>
<div
class=
"prometheus-state"
>
<div
class=
"row"
>
<div
class=
"col-md-4 col-md-offset-4 state-svg svg-content"
>
<img
:src=
"currentState.svgUrl"
/>
</div>
<div
class=
"state-svg svg-content"
>
<img
:src=
"currentState.svgUrl"
/>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-3"
>
<h4
class=
"text-center state-title"
>
{{
currentState
.
title
}}
</h4>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-3"
>
<div
class=
"description-text text-center state-description"
>
{{
currentState
.
description
}}
<a
v-if=
"showButtonDescription"
:href=
"settingsPath"
>
Prometheus server
</a>
</div>
</div>
</div>
<div
class=
"row state-button-section"
>
<div
class=
"col-md-4 col-md-offset-4 text-center state-button"
>
<a
class=
"btn btn-success"
:href=
"buttonPath"
>
{{
currentState
.
buttonText
}}
</a>
</div>
<h4
class=
"state-title"
>
{{
currentState
.
title
}}
</h4>
<p
class=
"state-description"
>
{{
currentState
.
description
}}
<a
v-if=
"showButtonDescription"
:href=
"settingsPath"
>
Prometheus server
</a>
</p>
<div
class=
"state-button"
>
<a
class=
"btn btn-success"
:href=
"buttonPath"
>
{{
currentState
.
buttonText
}}
</a>
</div>
</div>
</
template
>
app/assets/javascripts/monitoring/monitoring_bundle.js
View file @
5c888c42
...
...
@@ -3,8 +3,5 @@ import Dashboard from './components/dashboard.vue';
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
new
Vue
({
el
:
'#prometheus-graphs'
,
components
:
{
Dashboard
,
},
render
:
createElement
=>
createElement
(
'dashboard'
),
render
:
createElement
=>
createElement
(
Dashboard
),
}));
app/assets/javascripts/repo/components/repo_sidebar.vue
View file @
5c888c42
...
...
@@ -74,8 +74,8 @@ export default {
<thead
v-if=
"!isMini"
>
<tr>
<th
class=
"name"
>
Name
</th>
<th
class=
"hidden-sm hidden-xs last-commit"
>
Last
C
ommit
</th>
<th
class=
"hidden-xs last-update text-right"
>
Last
U
pdate
</th>
<th
class=
"hidden-sm hidden-xs last-commit"
>
Last
c
ommit
</th>
<th
class=
"hidden-xs last-update text-right"
>
Last
u
pdate
</th>
</tr>
</thead>
<tbody>
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js
View file @
5c888c42
...
...
@@ -38,24 +38,40 @@ export default {
return
this
.
useCommitMessageWithDescription
?
withoutDesc
:
withDesc
;
},
mergeButtonClass
()
{
const
defaultClass
=
'btn btn-sm btn-success accept-merge-request'
;
const
failedClass
=
`
${
defaultClass
}
btn-danger`
;
const
inActionClass
=
`
${
defaultClass
}
btn-info`
;
status
()
{
const
{
pipeline
,
isPipelineActive
,
isPipelineFailed
,
hasCI
,
ciStatus
}
=
this
.
mr
;
if
(
hasCI
&&
!
ciStatus
)
{
return
failedClass
;
return
'failed'
;
}
else
if
(
!
pipeline
)
{
return
defaultClass
;
return
'success'
;
}
else
if
(
isPipelineActive
)
{
return
inActionClass
;
return
'pending'
;
}
else
if
(
isPipelineFailed
)
{
return
'failed'
;
}
return
'success'
;
},
mergeButtonClass
()
{
const
defaultClass
=
'btn btn-sm btn-success accept-merge-request'
;
const
failedClass
=
`
${
defaultClass
}
btn-danger`
;
const
inActionClass
=
`
${
defaultClass
}
btn-info`
;
if
(
this
.
status
===
'failed'
)
{
return
failedClass
;
}
else
if
(
this
.
status
===
'pending'
)
{
return
inActionClass
;
}
return
defaultClass
;
},
iconClass
()
{
if
(
this
.
status
===
'failed'
||
!
this
.
commitMessage
.
length
||
!
this
.
isMergeAllowed
()
||
this
.
mr
.
preventMerge
)
{
return
'failed'
;
}
return
'success'
;
},
mergeButtonText
()
{
if
(
this
.
isMergingImmediately
)
{
return
'Merge in progress'
;
...
...
@@ -209,7 +225,7 @@ export default {
},
template
:
`
<div class="mr-widget-body media">
<status-icon
status="succe
ss" />
<status-icon
:status="iconCla
ss" />
<div class="media-body">
<div class="mr-widget-body-controls media space-children">
<span class="btn-group append-bottom-5">
...
...
app/assets/stylesheets/pages/environments.scss
View file @
5c888c42
...
...
@@ -207,10 +207,13 @@
}
.prometheus-state
{
margin-top
:
10px
;
max-width
:
430px
;
margin
:
10px
auto
;
text-align
:
center
;
.state-button-section
{
margin-top
:
10px
;
.state-svg
{
max-width
:
80vw
;
margin
:
0
auto
;
}
}
...
...
app/controllers/application_controller.rb
View file @
5c888c42
...
...
@@ -85,12 +85,21 @@ class ApplicationController < ActionController::Base
super
payload
[
:remote_ip
]
=
request
.
remote_ip
if
current_user
.
present?
payload
[
:user_id
]
=
current_user
.
id
payload
[
:username
]
=
current_user
.
username
logged_user
=
auth_user
if
logged_user
.
present?
payload
[
:user_id
]
=
logged_user
.
try
(
:id
)
payload
[
:username
]
=
logged_user
.
try
(
:username
)
end
end
# Controllers such as GitHttpController may use alternative methods
# (e.g. tokens) to authenticate the user, whereas Devise sets current_user
def
auth_user
return
current_user
if
current_user
.
present?
return
try
(
:authenticated_user
)
end
# This filter handles both private tokens and personal access tokens
def
authenticate_user_from_private_token!
token
=
params
[
:private_token
].
presence
||
request
.
headers
[
'PRIVATE-TOKEN'
].
presence
...
...
app/controllers/projects/git_http_client_controller.rb
View file @
5c888c42
...
...
@@ -9,6 +9,7 @@ class Projects::GitHttpClientController < Projects::ApplicationController
delegate
:actor
,
:authentication_abilities
,
to: :authentication_result
,
allow_nil:
true
alias_method
:user
,
:actor
alias_method
:authenticated_user
,
:actor
# Git clients will not know what authenticity token to send along
skip_before_action
:verify_authenticity_token
...
...
app/views/projects/tree/_old_tree_content.html.haml
View file @
5c888c42
...
...
@@ -6,7 +6,7 @@
%th
=
s_
(
'ProjectFileTree|Name'
)
%th
.hidden-xs
.pull-left
=
_
(
'Last commit'
)
%th
.text-right
=
_
(
'Last
U
pdate'
)
%th
.text-right
=
_
(
'Last
u
pdate'
)
-
if
@path
.
present?
%tr
.tree-item
%td
.tree-item-file-name
...
...
changelogs/unreleased/37229-mr-widget-status-icon.yml
0 → 100644
View file @
5c888c42
---
title
:
fix merge request widget status icon for failed CI
merge_request
:
author
:
type
:
fixed
changelogs/unreleased/sh-fix-username-logging.yml
0 → 100644
View file @
5c888c42
---
title
:
Fix username and ID not logging in production_json.log for Git activity
merge_request
:
author
:
type
:
fixed
doc/administration/job_artifacts.md
View file @
5c888c42
...
...
@@ -142,9 +142,9 @@ and [projects APIs](../api/projects.md).
## Implementation details
When GitLab receives an artifacts archive, an archive metadata file is also
generated
. This metadata file describes all the entries that are located in the
artifacts archive itself. The metadata file is in a binary format, with
additional GZIP compression.
generated
by
[
GitLab Workhorse
]
. This metadata file describes all the entries
that are located in the artifacts archive itself.
The metadata file is in a binary format, with
additional GZIP compression.
GitLab does not extract the artifacts archive in order to save space, memory
and disk I/O. It instead inspects the metadata file which contains all the
...
...
locale/gitlab.pot
View file @
5c888c42
...
...
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-
09-28 13:28
-0400\n"
"PO-Revision-Date: 2017-
09-28 13:28
-0400\n"
"POT-Creation-Date: 2017-
10-03 16:06
-0400\n"
"PO-Revision-Date: 2017-
10-03 16:06
-0400\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
...
...
@@ -420,9 +420,6 @@ msgstr ""
msgid "Create New Directory"
msgstr ""
msgid "Create a new branch"
msgstr ""
msgid "Create a personal access token on your account to pull or push via %{protocol}."
msgstr ""
...
...
@@ -729,9 +726,6 @@ msgstr[1] ""
msgid "Last Pipeline"
msgstr ""
msgid "Last Update"
msgstr ""
msgid "Last commit"
msgstr ""
...
...
@@ -741,6 +735,9 @@ msgstr ""
msgid "Last edited by %{name}"
msgstr ""
msgid "Last update"
msgstr ""
msgid "Last updated"
msgstr ""
...
...
@@ -1189,9 +1186,6 @@ msgstr ""
msgid "Select a timezone"
msgstr ""
msgid "Select existing branch"
msgstr ""
msgid "Select target branch"
msgstr ""
...
...
@@ -1493,9 +1487,6 @@ msgstr ""
msgid "Timeago|a week ago"
msgstr ""
msgid "Timeago|a while"
msgstr ""
msgid "Timeago|a year ago"
msgstr ""
...
...
@@ -1547,6 +1538,9 @@ msgstr ""
msgid "Timeago|in 1 year"
msgstr ""
msgid "Timeago|in a while"
msgstr ""
msgid "Timeago|less than a minute ago"
msgstr ""
...
...
spec/javascripts/repo/components/repo_sidebar_spec.js
View file @
5c888c42
...
...
@@ -23,8 +23,8 @@ describe('RepoSidebar', () => {
expect
(
vm
.
$el
.
id
).
toEqual
(
'sidebar'
);
expect
(
vm
.
$el
.
classList
.
contains
(
'sidebar-mini'
)).
toBeFalsy
();
expect
(
thead
.
querySelector
(
'.name'
).
textContent
).
toEqual
(
'Name'
);
expect
(
thead
.
querySelector
(
'.last-commit'
).
textContent
).
toEqual
(
'Last
C
ommit'
);
expect
(
thead
.
querySelector
(
'.last-update'
).
textContent
).
toEqual
(
'Last
U
pdate'
);
expect
(
thead
.
querySelector
(
'.last-commit'
).
textContent
).
toEqual
(
'Last
c
ommit'
);
expect
(
thead
.
querySelector
(
'.last-update'
).
textContent
).
toEqual
(
'Last
u
pdate'
);
expect
(
tbody
.
querySelector
(
'.repo-file-options'
)).
toBeFalsy
();
expect
(
tbody
.
querySelector
(
'.prev-directory'
)).
toBeFalsy
();
expect
(
tbody
.
querySelector
(
'.loading-file'
)).
toBeFalsy
();
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
5c888c42
...
...
@@ -95,35 +95,84 @@ describe('MRWidgetReadyToMerge', () => {
});
});
describe
(
'status'
,
()
=>
{
it
(
'defaults to success'
,
()
=>
{
vm
.
mr
.
pipeline
=
true
;
expect
(
vm
.
status
).
toEqual
(
'success'
);
});
it
(
'returns failed when MR has CI but also has an unknown status'
,
()
=>
{
vm
.
mr
.
hasCI
=
true
;
expect
(
vm
.
status
).
toEqual
(
'failed'
);
});
it
(
'returns default when MR has no pipeline'
,
()
=>
{
expect
(
vm
.
status
).
toEqual
(
'success'
);
});
it
(
'returns pending when pipeline is active'
,
()
=>
{
vm
.
mr
.
pipeline
=
{};
vm
.
mr
.
isPipelineActive
=
true
;
expect
(
vm
.
status
).
toEqual
(
'pending'
);
});
it
(
'returns failed when pipeline is failed'
,
()
=>
{
vm
.
mr
.
pipeline
=
{};
vm
.
mr
.
isPipelineFailed
=
true
;
expect
(
vm
.
status
).
toEqual
(
'failed'
);
});
});
describe
(
'mergeButtonClass'
,
()
=>
{
const
defaultClass
=
'btn btn-sm btn-success accept-merge-request'
;
const
failedClass
=
`
${
defaultClass
}
btn-danger`
;
const
inActionClass
=
`
${
defaultClass
}
btn-info`
;
it
(
'should return default class'
,
()
=>
{
it
(
'defaults to success class'
,
()
=>
{
expect
(
vm
.
mergeButtonClass
).
toEqual
(
defaultClass
);
});
it
(
'returns success class for success status'
,
()
=>
{
vm
.
mr
.
pipeline
=
true
;
expect
(
vm
.
mergeButtonClass
).
toEqual
(
defaultClass
);
});
it
(
'should return failed class when MR has CI but also has an unknown status'
,
()
=>
{
it
(
'returns info class for pending status'
,
()
=>
{
vm
.
mr
.
pipeline
=
{};
vm
.
mr
.
isPipelineActive
=
true
;
expect
(
vm
.
mergeButtonClass
).
toEqual
(
inActionClass
);
});
it
(
'returns failed class for failed status'
,
()
=>
{
vm
.
mr
.
hasCI
=
true
;
expect
(
vm
.
mergeButtonClass
).
toEqual
(
failedClass
);
});
});
it
(
'should return default class when MR has no pipeline'
,
()
=>
{
expect
(
vm
.
mergeButtonClass
).
toEqual
(
defaultClass
);
describe
(
'status icon'
,
()
=>
{
it
(
'defaults to tick icon'
,
()
=>
{
expect
(
vm
.
iconClass
).
toEqual
(
'success'
);
});
it
(
'should return in action class when pipeline is active'
,
()
=>
{
it
(
'shows tick for success status'
,
()
=>
{
vm
.
mr
.
pipeline
=
true
;
expect
(
vm
.
iconClass
).
toEqual
(
'success'
);
});
it
(
'shows tick for pending status'
,
()
=>
{
vm
.
mr
.
pipeline
=
{};
vm
.
mr
.
isPipelineActive
=
true
;
expect
(
vm
.
mergeButtonClass
).
toEqual
(
inActionClass
);
expect
(
vm
.
iconClass
).
toEqual
(
'success'
);
});
it
(
'should return failed class when pipeline is failed'
,
()
=>
{
vm
.
mr
.
pipeline
=
{};
vm
.
mr
.
isPipelineFailed
=
true
;
expect
(
vm
.
mergeButtonClass
).
toEqual
(
failedClass
);
it
(
'shows x for failed status'
,
()
=>
{
vm
.
mr
.
hasCI
=
true
;
expect
(
vm
.
iconClass
).
toEqual
(
'failed'
);
});
it
(
'shows x for merge not allowed'
,
()
=>
{
vm
.
mr
.
hasCI
=
true
;
expect
(
vm
.
iconClass
).
toEqual
(
'failed'
);
});
});
...
...
@@ -177,7 +226,7 @@ describe('MRWidgetReadyToMerge', () => {
expect
(
vm
.
isMergeButtonDisabled
).
toBeTruthy
();
});
it
(
'should return true when the
re
vm instance is making request'
,
()
=>
{
it
(
'should return true when the vm instance is making request'
,
()
=>
{
vm
.
isMakingRequest
=
true
;
expect
(
vm
.
isMergeButtonDisabled
).
toBeTruthy
();
});
...
...
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