Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
61a5180e3d05
Commit
b7b55e83
authored
Mar 12, 2020
by
GitLab Bot
Browse files
Add latest changes from gitlab-org/gitlab@master
parent
0882c565889a
Changes
106
Hide whitespace changes
Inline
Side-by-side
.gitlab/ci/rules.gitlab-ci.yml
View file @
61a5180e
...
...
@@ -80,6 +80,9 @@
-
"
{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
-
"
doc/api/graphql/reference/*"
# Files in this folder are auto-generated
.frontend-dependency-patterns
:
&frontend-dependency-patterns
-
"
{package.json,yarn.lock}"
.qa-patterns
:
&qa-patterns
-
"
.dockerignore"
-
"
qa/**/*"
...
...
@@ -270,6 +273,9 @@
rules
:
-
<<
:
*if-master-refs
when
:
on_success
-
<<
:
*if-merge-request
changes
:
*frontend-dependency-patterns
when
:
on_success
################
# Memory rules #
...
...
app/assets/javascripts/boards/components/board_list.vue
View file @
61a5180e
<
script
>
import
{
Sortable
,
MultiDrag
}
from
'
sortablejs
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
_
from
'
underscore
'
;
import
boardNewIssue
from
'
./board_new_issue.vue
'
;
import
boardCard
from
'
./board_card.vue
'
;
import
eventHub
from
'
../eventhub
'
;
...
...
@@ -266,11 +265,12 @@ export default {
* same list or the other list. Don't remove items if it's same list.
*/
const
isSameList
=
toList
&&
toList
.
id
===
this
.
list
.
id
;
if
(
toList
&&
!
isSameList
&&
boardsStore
.
shouldRemoveIssue
(
this
.
list
,
toList
))
{
const
issues
=
items
.
map
(
item
=>
this
.
list
.
findIssue
(
Number
(
item
.
dataset
.
issueId
)));
if
(
_
.
compact
(
issues
).
length
&&
!
boardsStore
.
issuesAreContiguous
(
this
.
list
,
issues
))
{
if
(
issues
.
filter
(
Boolean
).
length
&&
!
boardsStore
.
issuesAreContiguous
(
this
.
list
,
issues
)
)
{
const
indexes
=
[];
const
ids
=
this
.
list
.
issues
.
map
(
i
=>
i
.
id
);
issues
.
forEach
(
issue
=>
{
...
...
app/assets/javascripts/boards/components/boards_selector.vue
View file @
61a5180e
<
script
>
import
{
throttle
}
from
'
underscore
'
;
import
{
throttle
}
from
'
lodash
'
;
import
{
GlLoadingIcon
,
GlSearchBoxByType
,
...
...
app/assets/javascripts/boards/components/issue_card_inner.vue
View file @
61a5180e
<
script
>
import
_
from
'
underscore
'
;
import
{
sortBy
}
from
'
lodash
'
;
import
{
mapState
}
from
'
vuex
'
;
import
{
GlLabel
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
issueCardInner
from
'
ee_else_ce/boards/mixins/issue_card_inner
'
;
...
...
@@ -100,10 +100,7 @@ export default {
return
!
groupId
?
referencePath
.
split
(
'
#
'
)[
0
]
:
null
;
},
orderedLabels
()
{
return
_
.
chain
(
this
.
issue
.
labels
)
.
filter
(
this
.
isNonListLabel
)
.
sortBy
(
'
title
'
)
.
value
();
return
sortBy
(
this
.
issue
.
labels
.
filter
(
this
.
isNonListLabel
),
'
title
'
);
},
helpLink
()
{
return
boardsStore
.
scopedLabels
.
helpLink
;
...
...
app/assets/javascripts/boards/components/project_select.vue
View file @
61a5180e
<
script
>
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
@@ -83,7 +83,7 @@ export default {
}
" data-project-name="
${
project
.
name
}
" data-project-name-with-namespace="
${
project
.
name_with_namespace
}
">
${
_
.
escape
(
project
.
name_with_namespace
)}
${
escape
(
project
.
name_with_namespace
)}
</a>
</li>
`
;
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
61a5180e
...
...
@@ -2,7 +2,7 @@
/* global List */
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
{
sortBy
}
from
'
lodash
'
;
import
Vue
from
'
vue
'
;
import
Cookies
from
'
js-cookie
'
;
import
BoardsStoreEE
from
'
ee_else_ce/boards/stores/boards_store_ee
'
;
...
...
@@ -76,8 +76,7 @@ const boardsStore = {
},
addList
(
listObj
)
{
const
list
=
new
List
(
listObj
);
this
.
state
.
lists
=
_
.
sortBy
([...
this
.
state
.
lists
,
list
],
'
position
'
);
this
.
state
.
lists
=
sortBy
([...
this
.
state
.
lists
,
list
],
'
position
'
);
return
list
;
},
new
(
listObj
)
{
...
...
@@ -90,7 +89,7 @@ const boardsStore = {
// Remove any new issues from the backlog
// as they will be visible in the new list
list
.
issues
.
forEach
(
backlogList
.
removeIssue
.
bind
(
backlogList
));
this
.
state
.
lists
=
_
.
sortBy
(
this
.
state
.
lists
,
'
position
'
);
this
.
state
.
lists
=
sortBy
(
this
.
state
.
lists
,
'
position
'
);
})
.
catch
(()
=>
{
// https://gitlab.com/gitlab-org/gitlab-foss/issues/30821
...
...
@@ -194,10 +193,9 @@ const boardsStore = {
moveMultipleIssuesToList
({
listFrom
,
listTo
,
issues
,
newIndex
})
{
const
issueTo
=
issues
.
map
(
issue
=>
listTo
.
findIssue
(
issue
.
id
));
const
issueLists
=
_
.
flatten
(
issues
.
map
(
issue
=>
issue
.
getLists
()));
const
issueLists
=
issues
.
map
(
issue
=>
issue
.
getLists
())
.
flat
(
);
const
listLabels
=
issueLists
.
map
(
list
=>
list
.
label
);
const
hasMoveableIssues
=
_
.
compact
(
issueTo
).
length
>
0
;
const
hasMoveableIssues
=
issueTo
.
filter
(
Boolean
).
length
>
0
;
if
(
!
hasMoveableIssues
)
{
// Check if target list assignee is already present in this issue
...
...
app/assets/javascripts/clusters/clusters_bundle.js
View file @
61a5180e
...
...
@@ -315,10 +315,13 @@ export default class Clusters {
this
.
checkForNewInstalls
(
prevApplicationMap
,
this
.
store
.
state
.
applications
);
this
.
updateContainer
(
prevStatus
,
this
.
store
.
state
.
status
,
this
.
store
.
state
.
statusReason
);
this
.
toggleIngressDomainHelpText
(
prevApplicationMap
[
INGRESS
],
this
.
store
.
state
.
applications
[
INGRESS
],
);
if
(
this
.
ingressDomainHelpText
)
{
this
.
toggleIngressDomainHelpText
(
prevApplicationMap
[
INGRESS
],
this
.
store
.
state
.
applications
[
INGRESS
],
);
}
}
showToken
()
{
...
...
app/assets/javascripts/clusters/components/applications.vue
View file @
61a5180e
...
...
@@ -263,7 +263,6 @@ Crossplane runs inside your Kubernetes cluster and supports secure connectivity
<
template
>
<section
id=
"cluster-applications"
>
<h4>
{{
s__
(
'
ClusterIntegration|Applications
'
)
}}
</h4>
<p
class=
"append-bottom-0"
>
{{
s__
(
`ClusterIntegration|Choose which applications to install on your Kubernetes cluster.
...
...
app/assets/javascripts/ide/lib/themes/white.js
View file @
61a5180e
const
BOLD
=
'
bold
'
;
const
ITALIC
=
'
italic
'
;
const
BOLD_ITALIC
=
'
bold italic
'
;
const
UNDERLINE
=
'
underline
'
;
export
default
{
base
:
'
vs
'
,
inherit
:
true
,
rules
:
[],
inherit
:
false
,
rules
:
[
// Standard theme defaults and overrides based on VS theme
// https://github.com/Microsoft/vscode/blob/master/src/vs/editor/standalone/common/themes.ts
// License: MIT (https://github.com/microsoft/vscode/blob/master/LICENSE.txt)
{
token
:
''
,
foreground
:
'
2e2e2e
'
,
background
:
'
ffffff
'
},
{
token
:
'
keyword.css
'
,
fontStyle
:
BOLD
,
foreground
:
'
999999
'
},
{
token
:
'
keyword.less
'
,
fontStyle
:
BOLD
,
foreground
:
'
999999
'
},
{
token
:
'
keyword.scss
'
,
fontStyle
:
BOLD
,
foreground
:
'
999999
'
},
{
token
:
'
keyword.md
'
,
fontStyle
:
BOLD
,
foreground
:
'
800080
'
},
{
token
:
'
variable
'
,
foreground
:
'
008080
'
},
{
token
:
'
variable.md
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
variable.predefined
'
,
foreground
:
'
008080
'
},
{
token
:
'
number
'
,
foreground
:
'
009999
'
},
{
token
:
'
number.hex
'
,
foreground
:
'
3030c0
'
},
{
token
:
'
type.identifier.ts
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
type.identifier.swift
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
type.identifier.kt
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
type.identifier.perl
'
,
foreground
:
'
2e2e2e
'
,
fontStyle
:
BOLD
},
{
token
:
'
tag
'
,
foreground
:
'
000080
'
},
{
token
:
'
tag.class
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
tag.css
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
tag.less
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
tag.scss
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
tag.id.jade
'
,
foreground
:
'
445588
'
},
{
token
:
'
tag.class.jade
'
,
foreground
:
'
445588
'
},
{
token
:
'
meta.scss
'
,
foreground
:
'
800000
'
},
{
token
:
'
metatag
'
,
foreground
:
'
e00000
'
},
{
token
:
'
metatag.content.html
'
,
foreground
:
'
e00000
'
},
{
token
:
'
metatag.html
'
,
foreground
:
'
808080
'
},
{
token
:
'
metatag.xml
'
,
foreground
:
'
808080
'
},
{
token
:
'
metatag.php
'
,
fontStyle
:
BOLD
},
{
token
:
'
key
'
,
foreground
:
'
863b00
'
},
{
token
:
'
key.ini
'
,
foreground
:
'
008080
'
},
{
token
:
'
string.key.json
'
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
string.value.json
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
string.link.md
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
attribute.name
'
,
foreground
:
'
008080
'
},
{
token
:
'
attribute.name.css
'
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
attribute.name.json
'
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
attribute.name.scss
'
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
attribute.name.less
'
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
attribute.value
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
attribute.value.css
'
,
foreground
:
'
0086b3
'
},
{
token
:
'
attribute.value.hex
'
,
foreground
:
'
0086b3
'
},
{
token
:
'
attribute.value.number
'
,
foreground
:
'
009999
'
},
{
token
:
'
attribute.value.unit
'
,
foreground
:
'
009999
'
},
{
token
:
'
attribute.value.xml
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
attribute.value.html
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
attribute.value.md
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
string
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
string.target
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
string.sql
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
keyword.flow
'
,
foreground
:
'
2e2e2e
'
,
fontStyle
:
BOLD
},
{
token
:
'
keyword.st
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
variable.st
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
type.st
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
operator.scss
'
,
foreground
:
'
666666
'
},
{
token
:
'
operator.sql
'
,
foreground
:
'
2e2e2e
'
,
fontStyle
:
BOLD
},
{
token
:
'
operator.swift
'
,
foreground
:
'
666666
'
},
{
token
:
'
predefined.sql
'
,
foreground
:
'
2e2e2e
'
,
fontStyle
:
BOLD
},
// GitHub theme based on https://github.com/brijeshb42/monaco-themes/blob/master/themes/GitHub.json
// Customized for Web IDE
// License: MIT (https://github.com/brijeshb42/monaco-themes/blob/master/LICENSE)
{
token
:
'
comment
'
,
foreground
:
'
999988
'
,
fontStyle
:
ITALIC
},
{
token
:
'
comment.block.preprocessor
'
,
foreground
:
'
999999
'
,
fontStyle
:
BOLD
},
{
token
:
'
comment.documentation
'
,
foreground
:
'
999999
'
,
fontStyle
:
BOLD_ITALIC
},
{
token
:
'
comment.block.documentation
'
,
foreground
:
'
999999
'
,
fontStyle
:
BOLD_ITALIC
},
{
token
:
'
invalid.illegal
'
,
foreground
:
'
aa0000
'
,
background
:
'
e3d2d2
'
},
{
token
:
'
keyword
'
,
fontStyle
:
BOLD
,
foreground
:
'
2e2e2e
'
},
{
token
:
'
storage
'
,
fontStyle
:
BOLD
},
{
token
:
'
keyword.operator
'
,
fontStyle
:
BOLD
},
{
token
:
'
constant.language
'
,
fontStyle
:
BOLD
},
{
token
:
'
support.constant
'
,
fontStyle
:
BOLD
},
{
token
:
'
storage.type
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
support.type
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
entity.other.attribute-name
'
,
foreground
:
'
008080
'
},
{
token
:
'
variable.other
'
,
foreground
:
'
0086b3
'
},
{
token
:
'
variable.language
'
,
foreground
:
'
999999
'
},
{
token
:
'
entity.name.type
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
entity.other.inherited-class
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
support.class
'
,
foreground
:
'
445588
'
,
fontStyle
:
BOLD
},
{
token
:
'
variable.other.constant
'
,
foreground
:
'
008080
'
},
{
token
:
'
constant.character.entity
'
,
foreground
:
'
800080
'
},
{
token
:
'
entity.name.exception
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
entity.name.function
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
support.function
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
keyword.other.name-of-parameter
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
entity.name.section
'
,
foreground
:
'
666666
'
},
{
token
:
'
entity.name.tag
'
,
foreground
:
'
000080
'
},
{
token
:
'
variable.parameter
'
,
foreground
:
'
008080
'
},
{
token
:
'
support.variable
'
,
foreground
:
'
008080
'
},
{
token
:
'
constant.numeric
'
,
foreground
:
'
009999
'
},
{
token
:
'
constant.other
'
,
foreground
:
'
009999
'
},
{
token
:
'
constant.character
'
,
foreground
:
'
dd1144
'
},
{
token
:
'
string.regexp
'
,
foreground
:
'
009926
'
},
{
token
:
'
constant.other.symbol
'
,
foreground
:
'
990073
'
},
{
token
:
'
punctuation
'
,
fontStyle
:
BOLD
},
{
token
:
'
markup.deleted
'
,
foreground
:
'
000000
'
,
background
:
'
ffdddd
'
},
{
token
:
'
markup.italic
'
,
fontStyle
:
ITALIC
},
{
token
:
'
markup.error
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
markup.heading.1
'
,
foreground
:
'
999999
'
},
{
token
:
'
markup.inserted
'
,
foreground
:
'
000000
'
,
background
:
'
ddffdd
'
},
{
token
:
'
markup.output
'
,
foreground
:
'
808080
'
},
{
token
:
'
markup.raw
'
,
foreground
:
'
808080
'
},
{
token
:
'
markup.prompt
'
,
foreground
:
'
666666
'
},
{
token
:
'
markup.bold
'
,
fontStyle
:
BOLD
},
{
token
:
'
markup.heading
'
,
foreground
:
'
999999
'
},
{
token
:
'
markup.traceback
'
,
foreground
:
'
aa0000
'
},
{
token
:
'
markup.underline
'
,
fontStyle
:
UNDERLINE
},
{
token
:
'
meta.diff.range
'
,
foreground
:
'
999999
'
,
background
:
'
eaf2f5
'
},
{
token
:
'
meta.diff.index
'
,
foreground
:
'
999999
'
,
background
:
'
eaf2f5
'
},
{
token
:
'
meta.separator
'
,
foreground
:
'
999999
'
,
background
:
'
eaf2f5
'
},
{
token
:
'
meta.diff.header.from-file
'
,
foreground
:
'
999999
'
,
background
:
'
ffdddd
'
},
{
token
:
'
meta.diff.header.to-file
'
,
foreground
:
'
999999
'
,
background
:
'
ddffdd
'
},
{
token
:
'
meta.link
'
,
foreground
:
'
4183c4
'
},
],
colors
:
{
'
editorLineNumber.foreground
'
:
'
#CCCCCC
'
,
'
diffEditor.insertedTextBackground
'
:
'
#A0F5B420
'
,
'
diffEditor.removedTextBackground
'
:
'
#f9d7dc20
'
,
'
editor.foreground
'
:
'
#2e2e2e
'
,
'
editor.selectionBackground
'
:
'
#aad6f8
'
,
'
editor.lineHighlightBackground
'
:
'
#fffeeb
'
,
'
editorCursor.foreground
'
:
'
#666666
'
,
'
editorWhitespace.foreground
'
:
'
#bbbbbb
'
,
'
editorLineNumber.foreground
'
:
'
#cccccc
'
,
'
diffEditor.insertedTextBackground
'
:
'
#a0f5b420
'
,
'
diffEditor.removedTextBackground
'
:
'
#f9d7dc20
'
,
'
editorIndentGuide.activeBackground
'
:
'
#cccccc
'
,
},
};
app/assets/javascripts/releases/components/evidence_block.vue
View file @
61a5180e
...
...
@@ -67,7 +67,7 @@ export default {
</
template
>
</expand-button>
<clipboard-button
:title=
"__('Copy
commit
SHA')"
:title=
"__('Copy
evidence
SHA')"
:text=
"sha"
css-class=
"btn-default btn-transparent btn-clipboard"
/>
...
...
app/assets/javascripts/releases/components/release_block.vue
View file @
61a5180e
...
...
@@ -93,7 +93,10 @@ export default {
<release-block-header
:release=
"release"
/>
<div
class=
"card-body"
>
<div
v-if=
"shouldRenderMilestoneInfo"
>
<release-block-milestone-info
:milestones=
"milestones"
/>
<release-block-milestone-info
:milestones=
"milestones"
:open-issues-path=
"release._links.issuesUrl"
/>
<hr
class=
"mb-3 mt-0"
/>
</div>
...
...
app/assets/javascripts/releases/components/release_block_assets.vue
View file @
61a5180e
...
...
@@ -34,7 +34,7 @@ export default {
<ul
v-if=
"assets.links.length"
class=
"pl-0 mb-0 prepend-top-8 list-unstyled js-assets-list"
>
<li
v-for=
"link in assets.links"
:key=
"link.name"
class=
"append-bottom-8"
>
<gl-link
v-gl-tooltip.bottom
:title=
"__('Download asset')"
:href=
"link.
u
rl"
>
<gl-link
v-gl-tooltip.bottom
:title=
"__('Download asset')"
:href=
"link.
directAssetU
rl"
>
<icon
name=
"package"
class=
"align-middle append-right-4 align-text-bottom"
/>
{{
link
.
name
}}
<span
v-if=
"link.external"
>
{{
__
(
'
(external source)
'
)
}}
</span>
...
...
app/assets/javascripts/releases/components/release_block_milestone_info.vue
View file @
61a5180e
<
script
>
import
{
GlProgressBar
,
GlLink
,
GlBadge
,
GlButton
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlProgressBar
,
GlLink
,
GlBadge
,
GlButton
,
GlTooltipDirective
,
GlSprintf
,
}
from
'
@gitlab/ui
'
;
import
{
__
,
n__
,
sprintf
}
from
'
~/locale
'
;
import
{
MAX_MILESTONES_TO_DISPLAY
}
from
'
../constants
'
;
/** Sums the values of an array. For use with Array.reduce. */
const
sumReducer
=
(
acc
,
curr
)
=>
acc
+
curr
;
import
{
sum
}
from
'
lodash
'
;
export
default
{
name
:
'
ReleaseBlockMilestoneInfo
'
,
...
...
@@ -13,6 +18,7 @@ export default {
GlLink
,
GlBadge
,
GlButton
,
GlSprintf
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
...
...
@@ -22,6 +28,16 @@ export default {
type
:
Array
,
required
:
true
,
},
openIssuesPath
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
closedIssuesPath
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
data
()
{
return
{
...
...
@@ -42,14 +58,14 @@ export default {
allIssueStats
()
{
return
this
.
milestones
.
map
(
m
=>
m
.
issueStats
||
{});
},
open
IssuesCount
()
{
return
this
.
allIssueStats
.
map
(
stats
=>
stats
.
opened
||
0
).
reduce
(
sumReducer
);
total
IssuesCount
()
{
return
sum
(
this
.
allIssueStats
.
map
(
stats
=>
stats
.
total
||
0
)
);
},
closedIssuesCount
()
{
return
this
.
allIssueStats
.
map
(
stats
=>
stats
.
closed
||
0
)
.
reduce
(
sumReducer
);
return
sum
(
this
.
allIssueStats
.
map
(
stats
=>
stats
.
closed
||
0
));
},
total
IssuesCount
()
{
return
this
.
open
IssuesCount
+
this
.
closedIssuesCount
;
open
IssuesCount
()
{
return
this
.
total
IssuesCount
-
this
.
closedIssuesCount
;
},
milestoneLabelText
()
{
return
n__
(
'
Milestone
'
,
'
Milestones
'
,
this
.
milestones
.
length
);
...
...
@@ -130,7 +146,27 @@ export default {
{{ __('Issues') }}
<gl-badge
pill
variant=
"light"
class=
"font-weight-bold"
>
{{ totalIssuesCount }}
</gl-badge>
</span>
{{ issueCountsText }}
<div
class=
"d-flex"
>
<gl-link
v-if=
"openIssuesPath"
ref=
"openIssuesLink"
:href=
"openIssuesPath"
>
<gl-sprintf
:message=
"__('Open: %{openIssuesCount}')"
>
<
template
#openIssuesCount
>
{{
openIssuesCount
}}
</
template
>
</gl-sprintf>
</gl-link>
<span
v-else
ref=
"openIssuesText"
>
{{ sprintf(__('Open: %{openIssuesCount}'), { openIssuesCount }) }}
</span>
<span
class=
"mx-1"
>
•
</span>
<gl-link
v-if=
"closedIssuesPath"
ref=
"closedIssuesLink"
:href=
"closedIssuesPath"
>
<gl-sprintf
:message=
"__('Closed: %{closedIssuesCount}')"
>
<
template
#closedIssuesCount
>
{{
closedIssuesCount
}}
</
template
>
</gl-sprintf>
</gl-link>
<span
v-else
ref=
"closedIssuesText"
>
{{ sprintf(__('Closed: %{closedIssuesCount}'), { closedIssuesCount }) }}
</span>
</div>
</div>
</div>
</template>
app/controllers/application_controller.rb
View file @
61a5180e
...
...
@@ -307,7 +307,7 @@ def ldap_security_check
if
current_user
&&
current_user
.
requires_ldap_check?
return
unless
current_user
.
try_obtain_ldap_lease
unless
Gitlab
::
Auth
::
L
DAP
::
Access
.
allowed?
(
current_user
)
unless
Gitlab
::
Auth
::
L
dap
::
Access
.
allowed?
(
current_user
)
sign_out
current_user
flash
[
:alert
]
=
_
(
"Access denied for your LDAP account."
)
redirect_to
new_user_session_path
...
...
app/controllers/concerns/snippets_actions.rb
View file @
61a5180e
...
...
@@ -30,9 +30,9 @@ def convert_line_endings(content)
end
def
check_repository_error
repository_error
=
snippet
.
errors
.
delete
(
:repository
)
repository_error
s
=
Array
(
snippet
.
errors
.
delete
(
:repository
)
)
flash
.
now
[
:alert
]
=
repository_error
if
repository_error
recaptcha_check_with_fallback
(
repository_error
.
nil
?
)
{
render
:edit
}
flash
.
now
[
:alert
]
=
repository_error
s
.
first
if
repository_error
s
.
present?
recaptcha_check_with_fallback
(
repository_error
s
.
empty
?
)
{
render
:edit
}
end
end
app/controllers/ldap/omniauth_callbacks_controller.rb
View file @
61a5180e
...
...
@@ -4,9 +4,9 @@ class Ldap::OmniauthCallbacksController < OmniauthCallbacksController
extend
::
Gitlab
::
Utils
::
Override
def
self
.
define_providers!
return
unless
Gitlab
::
Auth
::
L
DAP
::
Config
.
sign_in_enabled?
return
unless
Gitlab
::
Auth
::
L
dap
::
Config
.
sign_in_enabled?
Gitlab
::
Auth
::
L
DAP
::
Config
.
available_servers
.
each
do
|
server
|
Gitlab
::
Auth
::
L
dap
::
Config
.
available_servers
.
each
do
|
server
|
alias_method
server
[
'provider_name'
],
:ldap
end
end
...
...
@@ -14,9 +14,9 @@ def self.define_providers!
# We only find ourselves here
# if the authentication to LDAP was successful.
def
ldap
return
unless
Gitlab
::
Auth
::
L
DAP
::
Config
.
sign_in_enabled?
return
unless
Gitlab
::
Auth
::
L
dap
::
Config
.
sign_in_enabled?
sign_in_user_flow
(
Gitlab
::
Auth
::
L
DAP
::
User
)
sign_in_user_flow
(
Gitlab
::
Auth
::
L
dap
::
User
)
end
define_providers!
...
...
app/controllers/projects/releases_controller.rb
View file @
61a5180e
...
...
@@ -6,7 +6,7 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action
:release
,
only:
%i[edit show update downloads]
before_action
:authorize_read_release!
before_action
do
push_frontend_feature_flag
(
:release_issue_summary
,
project
)
push_frontend_feature_flag
(
:release_issue_summary
,
project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:release_evidence_collection
,
project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:release_show_page
,
project
,
default_enabled:
true
)
end
...
...
app/controllers/sessions_controller.rb
View file @
61a5180e
...
...
@@ -273,8 +273,8 @@ def load_recaptcha
def
ldap_servers
@ldap_servers
||=
begin
if
Gitlab
::
Auth
::
L
DAP
::
Config
.
sign_in_enabled?
Gitlab
::
Auth
::
L
DAP
::
Config
.
available_servers
if
Gitlab
::
Auth
::
L
dap
::
Config
.
sign_in_enabled?
Gitlab
::
Auth
::
L
dap
::
Config
.
available_servers
else
[]
end
...
...
app/helpers/auth_helper.rb
View file @
61a5180e
...
...
@@ -5,11 +5,11 @@ module AuthHelper
LDAP_PROVIDER
=
/\Aldap/
.
freeze
def
ldap_enabled?
Gitlab
::
Auth
::
L
DAP
::
Config
.
enabled?
Gitlab
::
Auth
::
L
dap
::
Config
.
enabled?
end
def
ldap_sign_in_enabled?
Gitlab
::
Auth
::
L
DAP
::
Config
.
sign_in_enabled?
Gitlab
::
Auth
::
L
dap
::
Config
.
sign_in_enabled?
end
def
omniauth_enabled?
...
...
app/helpers/clusters_helper.rb
View file @
61a5180e
...
...
@@ -26,11 +26,38 @@ def render_gcp_signup_offer
end
end
def
render_cluster_info_tab_content
(
tab
,
expanded
)
case
tab
when
'environments'
render_if_exists
'clusters/clusters/environments'
when
'health'
render_if_exists
'clusters/clusters/health'
when
'apps'
render
'applications'
when
'settings'
render
'advanced_settings_container'
else
render
(
'details'
,
expanded:
expanded
)
end
end
def
has_rbac_enabled?
(
cluster
)
return
cluster
.
platform_kubernetes_rbac?
if
cluster
.
platform_kubernetes
cluster
.
provider
.
has_rbac_enabled?
end
def
project_cluster?
(
cluster
)
cluster
.
cluster_type
.
in?
(
'project_type'
)
end
def
cluster_created?
(
cluster
)
!
cluster
.
status_name
.
in?
(
%i/scheduled creating/
)
end
def
can_admin_cluster?
(
user
,
cluster
)
can?
(
user
,
:admin_cluster
,
cluster
)
end
end
ClustersHelper
.
prepend_if_ee
(
'EE::ClustersHelper'
)
Prev
1
2
3
4
5
6
Next
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