Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
03a52173
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
03a52173
编写于
9月 02, 2020
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
e28b754d
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
174 addition
and
44 deletion
+174
-44
app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js
...ts/vue_shared/components/filtered_search_bar/constants.js
+0
-2
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/author_token.vue
...ed/components/filtered_search_bar/tokens/author_token.vue
+9
-5
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue
...red/components/filtered_search_bar/tokens/label_token.vue
+1
-1
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
...components/filtered_search_bar/tokens/milestone_token.vue
+1
-1
app/models/iteration.rb
app/models/iteration.rb
+2
-2
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+1
-1
changelogs/unreleased/update-lodash-4-17-15-to-4-17-20.yml
changelogs/unreleased/update-lodash-4-17-15-to-4-17-20.yml
+5
-0
doc/administration/pages/index.md
doc/administration/pages/index.md
+18
-0
package.json
package.json
+1
-1
spec/frontend/vue_shared/components/filtered_search_bar/tokens/author_token_spec.js
...omponents/filtered_search_bar/tokens/author_token_spec.js
+82
-13
spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js
...components/filtered_search_bar/tokens/label_token_spec.js
+25
-7
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
...onents/filtered_search_bar/tokens/milestone_token_spec.js
+25
-7
yarn.lock
yarn.lock
+4
-4
未找到文件。
app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js
浏览文件 @
03a52173
/* eslint-disable @gitlab/require-i18n-strings */
import
{
__
}
from
'
~/locale
'
;
export
const
ANY_AUTHOR
=
'
Any
'
;
const
DEFAULT_LABEL_NO_LABEL
=
{
value
:
'
No label
'
,
text
:
__
(
'
No label
'
)
};
export
const
DEFAULT_LABEL_NONE
=
{
value
:
'
None
'
,
text
:
__
(
'
None
'
)
};
export
const
DEFAULT_LABEL_ANY
=
{
value
:
'
Any
'
,
text
:
__
(
'
Any
'
)
};
...
...
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/author_token.vue
浏览文件 @
03a52173
...
...
@@ -11,10 +11,9 @@ import { debounce } from 'lodash';
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
ANY_AUTHOR
,
DEBOUNCE_DELAY
}
from
'
../constants
'
;
import
{
DEFAULT_LABEL_ANY
,
DEBOUNCE_DELAY
}
from
'
../constants
'
;
export
default
{
anyAuthor
:
ANY_AUTHOR
,
components
:
{
GlFilteredSearchToken
,
GlAvatar
,
...
...
@@ -35,6 +34,7 @@ export default {
data
()
{
return
{
authors
:
this
.
config
.
initialAuthors
||
[],
defaultAuthors
:
this
.
config
.
defaultAuthors
||
[
DEFAULT_LABEL_ANY
],
loading
:
true
,
};
},
...
...
@@ -99,10 +99,14 @@ export default {
<span>
{{
activeAuthor
?
activeAuthor
.
name
:
inputValue
}}
</span>
</
template
>
<
template
#suggestions
>
<gl-filtered-search-suggestion
:value=
"$options.anyAuthor"
>
{{
__
(
'
Any
'
)
}}
<gl-filtered-search-suggestion
v-for=
"author in defaultAuthors"
:key=
"author.value"
:value=
"author.value"
>
{{
author
.
text
}}
</gl-filtered-search-suggestion>
<gl-deprecated-dropdown-divider
/>
<gl-deprecated-dropdown-divider
v-if=
"defaultAuthors.length"
/>
<gl-loading-icon
v-if=
"loading"
/>
<template
v-else
>
<gl-filtered-search-suggestion
...
...
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue
浏览文件 @
03a52173
...
...
@@ -112,7 +112,7 @@ export default {
>
{{
label
.
text
}}
</gl-filtered-search-suggestion>
<gl-dropdown-divider
/>
<gl-dropdown-divider
v-if=
"defaultLabels.length"
/>
<gl-loading-icon
v-if=
"loading"
/>
<template
v-else
>
<gl-filtered-search-suggestion
v-for=
"label in labels"
:key=
"label.id"
:value=
"label.title"
>
...
...
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
浏览文件 @
03a52173
...
...
@@ -95,7 +95,7 @@ export default {
>
{{
milestone
.
text
}}
</gl-filtered-search-suggestion>
<gl-dropdown-divider
/>
<gl-dropdown-divider
v-if=
"defaultMilestones.length"
/>
<gl-loading-icon
v-if=
"loading"
/>
<template
v-else
>
<gl-filtered-search-suggestion
...
...
app/models/iteration.rb
浏览文件 @
03a52173
...
...
@@ -36,8 +36,8 @@ class Iteration < ApplicationRecord
.
where
(
'due_date is NULL or due_date >= ?'
,
start_date
)
end
scope
:start_date_passed
,
->
{
where
(
'start_date <= ?'
,
Date
.
current
).
where
(
'due_date > ?'
,
Date
.
current
)
}
scope
:due_date_passed
,
->
{
where
(
'due_date <
=
?'
,
Date
.
current
)
}
scope
:start_date_passed
,
->
{
where
(
'start_date <= ?'
,
Date
.
current
).
where
(
'due_date >
=
?'
,
Date
.
current
)
}
scope
:due_date_passed
,
->
{
where
(
'due_date < ?'
,
Date
.
current
)
}
state_machine
:state_enum
,
initial: :upcoming
do
event
:start
do
...
...
app/views/layouts/_head.html.haml
浏览文件 @
03a52173
-
page_description
brand_title
unless
page_description
-# Needs a redirect on the client side since it's using an anchor to dist
uing
ish
-# Needs a redirect on the client side since it's using an anchor to dist
ingu
ish
-# between sign in and registration. We need to inline the JS to not render
-# anything from this page beforehand.
-# Part of an experiment to build a new sign up flow. Will be removed again with
...
...
changelogs/unreleased/update-lodash-4-17-15-to-4-17-20.yml
0 → 100644
浏览文件 @
03a52173
---
title
:
Update lodash to 4.17.20
merge_request
:
41036
author
:
Takuya Noguchi
type
:
security
doc/administration/pages/index.md
浏览文件 @
03a52173
...
...
@@ -720,6 +720,24 @@ sudo cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/s
sudo cp
/opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl/ca-bundle.pem
```
### 502 error when connecting to GitLab Pages proxy when server does not listen over IPv6
In some cases, NGINX might default to using IPv6 to connect to the GitLab Pages
service even when the server does not listen over IPv6. You can identify when
this is happening if you see something similar to the log entry below in the
`gitlab_pages_error.log`
:
```
plaintext
2020/02/24 16:32:05 [error] 112654#0: *4982804 connect() failed (111: Connection refused) while connecting to upstream, client: 123.123.123.123, server: ~^(?<group>.*)\.pages\.example\.com$, request: "GET /-/group/project/-/jobs/1234/artifacts/artifact.txt HTTP/1.1", upstream: "http://[::1]:8090//-/group/project/-/jobs/1234/artifacts/artifact.txt", host: "group.example.com"
```
To resolve this, set an explicit IP and port for the GitLab Pages
`listen_proxy`
setting
to define the explicit address that the GitLab Pages daemon should listen on:
```
ruby
gitlab_pages
[
'listen_proxy'
]
=
'127.0.0.1:8090'
```
### 404 error after transferring project to a different group or user
If you encounter a
`404 Not Found`
error a Pages site after transferring a project to
...
...
package.json
浏览文件 @
03a52173
...
...
@@ -106,7 +106,7 @@
"
jszip
"
:
"
^3.1.3
"
,
"
jszip-utils
"
:
"
^0.0.2
"
,
"
katex
"
:
"
^0.10.0
"
,
"
lodash
"
:
"
^4.17.
15
"
,
"
lodash
"
:
"
^4.17.
20
"
,
"
marked
"
:
"
^0.3.12
"
,
"
mermaid
"
:
"
^8.5.2
"
,
"
mersenne-twister
"
:
"
1.1.0
"
,
...
...
spec/frontend/vue_shared/components/filtered_search_bar/tokens/author_token_spec.js
浏览文件 @
03a52173
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
GlFilteredSearchToken
,
GlFilteredSearchTokenSegment
}
from
'
@gitlab/ui
'
;
import
{
GlFilteredSearchToken
,
GlFilteredSearchTokenSegment
,
GlFilteredSearchSuggestion
,
GlNewDropdownDivider
as
GlDropdownDivider
,
}
from
'
@gitlab/ui
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
{
DEFAULT_LABEL_NONE
,
DEFAULT_LABEL_ANY
,
}
from
'
~/vue_shared/components/filtered_search_bar/constants
'
;
import
AuthorToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/author_token.vue
'
;
import
{
mockAuthorToken
,
mockAuthors
}
from
'
../mock_data
'
;
jest
.
mock
(
'
~/flash
'
);
const
createComponent
=
({
config
=
mockAuthorToken
,
value
=
{
data
:
''
},
active
=
false
}
=
{})
=>
mount
(
AuthorToken
,
{
const
defaultStubs
=
{
Portal
:
true
,
GlFilteredSearchSuggestionList
:
{
template
:
'
<div></div>
'
,
methods
:
{
getValue
:
()
=>
'
=
'
,
},
},
};
function
createComponent
(
options
=
{})
{
const
{
config
=
mockAuthorToken
,
value
=
{
data
:
''
},
active
=
false
,
stubs
=
defaultStubs
,
}
=
options
;
return
mount
(
AuthorToken
,
{
propsData
:
{
config
,
value
,
...
...
@@ -22,16 +46,9 @@ const createComponent = ({ config = mockAuthorToken, value = { data: '' }, activ
portalName
:
'
fake target
'
,
alignSuggestions
:
function
fakeAlignSuggestions
()
{},
},
stubs
:
{
Portal
:
true
,
GlFilteredSearchSuggestionList
:
{
template
:
'
<div></div>
'
,
methods
:
{
getValue
:
()
=>
'
=
'
,
},
},
},
stubs
,
});
}
describe
(
'
AuthorToken
'
,
()
=>
{
let
mock
;
...
...
@@ -139,5 +156,57 @@ describe('AuthorToken', () => {
expect
(
tokenSegments
.
at
(
2
).
text
()).
toBe
(
mockAuthors
[
0
].
name
);
// "Administrator"
});
});
it
(
'
renders provided defaultAuthors as suggestions
'
,
async
()
=>
{
const
defaultAuthors
=
[
DEFAULT_LABEL_NONE
,
DEFAULT_LABEL_ANY
];
wrapper
=
createComponent
({
active
:
true
,
config
:
{
...
mockAuthorToken
,
defaultAuthors
},
stubs
:
{
Portal
:
true
},
});
const
tokenSegments
=
wrapper
.
findAll
(
GlFilteredSearchTokenSegment
);
const
suggestionsSegment
=
tokenSegments
.
at
(
2
);
suggestionsSegment
.
vm
.
$emit
(
'
activate
'
);
await
wrapper
.
vm
.
$nextTick
();
const
suggestions
=
wrapper
.
findAll
(
GlFilteredSearchSuggestion
);
expect
(
suggestions
).
toHaveLength
(
defaultAuthors
.
length
);
defaultAuthors
.
forEach
((
label
,
index
)
=>
{
expect
(
suggestions
.
at
(
index
).
text
()).
toBe
(
label
.
text
);
});
});
it
(
'
does not render divider when no defaultAuthors
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
config
:
{
...
mockAuthorToken
,
defaultAuthors
:
[]
},
stubs
:
{
Portal
:
true
},
});
const
tokenSegments
=
wrapper
.
findAll
(
GlFilteredSearchTokenSegment
);
const
suggestionsSegment
=
tokenSegments
.
at
(
2
);
suggestionsSegment
.
vm
.
$emit
(
'
activate
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
contains
(
GlFilteredSearchSuggestion
)).
toBe
(
false
);
expect
(
wrapper
.
contains
(
GlDropdownDivider
)).
toBe
(
false
);
});
it
(
'
renders `DEFAULT_LABEL_ANY` as default suggestions
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
config
:
{
...
mockAuthorToken
},
stubs
:
{
Portal
:
true
},
});
const
tokenSegments
=
wrapper
.
findAll
(
GlFilteredSearchTokenSegment
);
const
suggestionsSegment
=
tokenSegments
.
at
(
2
);
suggestionsSegment
.
vm
.
$emit
(
'
activate
'
);
await
wrapper
.
vm
.
$nextTick
();
const
suggestions
=
wrapper
.
findAll
(
GlFilteredSearchSuggestion
);
expect
(
suggestions
).
toHaveLength
(
1
);
expect
(
suggestions
.
at
(
0
).
text
()).
toBe
(
DEFAULT_LABEL_ANY
.
text
);
});
});
});
spec/frontend/vue_shared/components/filtered_search_bar/tokens/label_token_spec.js
浏览文件 @
03a52173
...
...
@@ -3,6 +3,7 @@ import {
GlFilteredSearchToken
,
GlFilteredSearchSuggestion
,
GlFilteredSearchTokenSegment
,
GlNewDropdownDivider
as
GlDropdownDivider
,
}
from
'
@gitlab/ui
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
...
...
@@ -33,13 +34,14 @@ const defaultStubs = {
},
};
const
createComponent
=
({
config
=
mockLabelToken
,
value
=
{
data
:
''
},
active
=
false
,
stubs
=
defaultStubs
,
}
=
{})
=>
mount
(
LabelToken
,
{
function
createComponent
(
options
=
{})
{
const
{
config
=
mockLabelToken
,
value
=
{
data
:
''
},
active
=
false
,
stubs
=
defaultStubs
,
}
=
options
;
return
mount
(
LabelToken
,
{
propsData
:
{
config
,
value
,
...
...
@@ -51,6 +53,7 @@ const createComponent = ({
},
stubs
,
});
}
describe
(
'
LabelToken
'
,
()
=>
{
let
mock
;
...
...
@@ -204,6 +207,21 @@ describe('LabelToken', () => {
});
});
it
(
'
does not render divider when no defaultLabels
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
config
:
{
...
mockLabelToken
,
defaultLabels
:
[]
},
stubs
:
{
Portal
:
true
},
});
const
tokenSegments
=
wrapper
.
findAll
(
GlFilteredSearchTokenSegment
);
const
suggestionsSegment
=
tokenSegments
.
at
(
2
);
suggestionsSegment
.
vm
.
$emit
(
'
activate
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
contains
(
GlFilteredSearchSuggestion
)).
toBe
(
false
);
expect
(
wrapper
.
contains
(
GlDropdownDivider
)).
toBe
(
false
);
});
it
(
'
renders `DEFAULT_LABELS` as default suggestions
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
...
...
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
浏览文件 @
03a52173
...
...
@@ -3,6 +3,7 @@ import {
GlFilteredSearchToken
,
GlFilteredSearchSuggestion
,
GlFilteredSearchTokenSegment
,
GlNewDropdownDivider
as
GlDropdownDivider
,
}
from
'
@gitlab/ui
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
...
...
@@ -31,13 +32,14 @@ const defaultStubs = {
},
};
const
createComponent
=
({
config
=
mockMilestoneToken
,
value
=
{
data
:
''
},
active
=
false
,
stubs
=
defaultStubs
,
}
=
{})
=>
mount
(
MilestoneToken
,
{
function
createComponent
(
options
=
{})
{
const
{
config
=
mockMilestoneToken
,
value
=
{
data
:
''
},
active
=
false
,
stubs
=
defaultStubs
,
}
=
options
;
return
mount
(
MilestoneToken
,
{
propsData
:
{
config
,
value
,
...
...
@@ -49,6 +51,7 @@ const createComponent = ({
},
stubs
,
});
}
describe
(
'
MilestoneToken
'
,
()
=>
{
let
mock
;
...
...
@@ -176,6 +179,21 @@ describe('MilestoneToken', () => {
});
});
it
(
'
does not render divider when no defaultMilestones
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
config
:
{
...
mockMilestoneToken
,
defaultMilestones
:
[]
},
stubs
:
{
Portal
:
true
},
});
const
tokenSegments
=
wrapper
.
findAll
(
GlFilteredSearchTokenSegment
);
const
suggestionsSegment
=
tokenSegments
.
at
(
2
);
suggestionsSegment
.
vm
.
$emit
(
'
activate
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
contains
(
GlFilteredSearchSuggestion
)).
toBe
(
false
);
expect
(
wrapper
.
contains
(
GlDropdownDivider
)).
toBe
(
false
);
});
it
(
'
renders `DEFAULT_MILESTONES` as default suggestions
'
,
async
()
=>
{
wrapper
=
createComponent
({
active
:
true
,
...
...
yarn.lock
浏览文件 @
03a52173
...
...
@@ -7744,10 +7744,10 @@ lodash.values@^4.3.0:
resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347"
integrity sha1-o6bCsOvsxcLLocF+bmIP6BtT00c=
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@~4.17.10:
version "4.17.
15
"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.
15.tgz#b447f6670a0455bbfeedd11392eff330ea097548
"
integrity sha512-
8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1
A==
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@
^4.17.20, lodash@
~4.17.10:
version "4.17.
20
"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.
20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52
"
integrity sha512-
PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGm
A==
log-symbols@^2.1.0, log-symbols@^2.2.0:
version "2.2.0"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录