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
4d89e6a2
Commit
4d89e6a2
authored
Jan 14, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
3658a9b8
01eafdbc
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
164 additions
and
25 deletions
+164
-25
app/assets/javascripts/jira_connect/components/app.vue
app/assets/javascripts/jira_connect/components/app.vue
+10
-0
app/assets/javascripts/jira_connect/index.js
app/assets/javascripts/jira_connect/index.js
+1
-3
app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue
...pipeline_editor/components/lint/ci_lint_results_value.vue
+14
-6
app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
...mponents/filtered_search_bar/filtered_search_bar_root.vue
+1
-1
app/assets/stylesheets/page_bundles/jira_connect.scss
app/assets/stylesheets/page_bundles/jira_connect.scss
+6
-3
app/views/jira_connect/subscriptions/index.html.haml
app/views/jira_connect/subscriptions/index.html.haml
+2
-3
changelogs/unreleased/13019-improve-error-messages-when-adding-namespaces-in-jira-connect-app.yml
...r-messages-when-adding-namespaces-in-jira-connect-app.yml
+5
-0
doc/user/group/roadmap/img/roadmap_filters_v13_7.png
doc/user/group/roadmap/img/roadmap_filters_v13_7.png
+0
-0
doc/user/group/roadmap/img/roadmap_filters_v13_8.png
doc/user/group/roadmap/img/roadmap_filters_v13_8.png
+0
-0
doc/user/group/roadmap/index.md
doc/user/group/roadmap/index.md
+2
-1
ee/app/assets/javascripts/roadmap/components/roadmap_filters.vue
...assets/javascripts/roadmap/components/roadmap_filters.vue
+33
-2
ee/app/assets/javascripts/roadmap/queries/epic.fragment.graphql
.../assets/javascripts/roadmap/queries/epic.fragment.graphql
+1
-0
ee/app/assets/javascripts/roadmap/queries/epicChildEpics.query.graphql
.../javascripts/roadmap/queries/epicChildEpics.query.graphql
+2
-0
ee/app/assets/javascripts/roadmap/queries/groupEpics.query.graphql
...sets/javascripts/roadmap/queries/groupEpics.query.graphql
+2
-0
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
+9
-3
ee/changelogs/unreleased/218624-filter-roadmap-by-confidentiality.yml
...s/unreleased/218624-filter-roadmap-by-confidentiality.yml
+5
-0
ee/spec/frontend/roadmap/components/roadmap_filters_spec.js
ee/spec/frontend/roadmap/components/roadmap_filters_spec.js
+27
-2
spec/frontend/jira_connect/components/app_spec.js
spec/frontend/jira_connect/components/app_spec.js
+33
-0
spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
...ents/filtered_search_bar/filtered_search_bar_root_spec.js
+3
-1
spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js
...nd/vue_shared/components/filtered_search_bar/mock_data.js
+8
-0
No files found.
app/assets/javascripts/jira_connect/components/app.vue
View file @
4d89e6a2
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
name
:
'
JiraConnectApp
'
,
components
:
{
GlAlert
,
},
mixins
:
[
glFeatureFlagsMixin
()],
computed
:
{
...
mapState
([
'
errorMessage
'
]),
...
...
@@ -16,6 +20,12 @@ export default {
<
template
>
<div>
<gl-alert
v-if=
"errorMessage"
class=
"gl-mb-6"
variant=
"danger"
:dismissible=
"false"
>
{{
errorMessage
}}
</gl-alert>
<h1>
GitLab for Jira Configuration
</h1>
<div
v-if=
"showNewUi"
>
<h3
data-testid=
"new-jira-connect-ui-heading"
>
{{
s__
(
'
Integrations|Linked namespaces
'
)
}}
</h3>
</div>
...
...
app/assets/javascripts/jira_connect/index.js
View file @
4d89e6a2
...
...
@@ -23,11 +23,9 @@ const initJiraFormHandlers = () => {
};
const
reqFailed
=
(
res
,
fallbackErrorMessage
)
=>
{
const
{
responseJSON
:
{
error
=
fallbackErrorMessage
}
=
{}
}
=
res
||
{};
const
{
error
=
fallbackErrorMessage
}
=
res
||
{};
store
.
commit
(
SET_ERROR_MESSAGE
,
error
);
// eslint-disable-next-line no-alert
alert
(
error
);
};
if
(
typeof
AP
.
getLocation
===
'
function
'
)
{
...
...
app/assets/javascripts/pipeline_editor/components/lint/ci_lint_results_value.vue
View file @
4d89e6a2
...
...
@@ -44,13 +44,21 @@ export default {
<
template
>
<div
data-testid=
"ci-lint-value"
>
<pre
v-if=
"scripts.beforeScript.show"
data-testid=
"ci-lint-before-script"
>
{{
scripts
.
beforeScript
.
content
}}
</pre>
<pre
v-if=
"scripts.script.show"
data-testid=
"ci-lint-script"
>
{{
scripts
.
script
.
content
}}
</pre>
<pre
v-if=
"scripts.afterScript.show"
data-testid=
"ci-lint-after-script"
>
{{
scripts
.
afterScript
.
content
<pre
v-if=
"scripts.beforeScript.show"
class=
"gl-white-space-pre-wrap"
data-testid=
"ci-lint-before-script"
>
{{
scripts
.
beforeScript
.
content
}}
</pre
>
<pre
v-if=
"scripts.script.show"
class=
"gl-white-space-pre-wrap"
data-testid=
"ci-lint-script"
>
{{
scripts
.
script
.
content
}}
</pre>
<pre
v-if=
"scripts.afterScript.show"
class=
"gl-white-space-pre-wrap"
data-testid=
"ci-lint-after-script"
>
{{
scripts
.
afterScript
.
content
}}
</pre
>
<ul
class=
"gl-list-style-none gl-pl-0 gl-mb-0"
>
<li
v-if=
"tagList"
>
...
...
app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue
View file @
4d89e6a2
...
...
@@ -256,7 +256,7 @@ export default {
return
{
...
filter
,
value
:
{
data
:
stripQuotes
(
valueString
)
,
data
:
typeof
valueString
===
'
string
'
?
stripQuotes
(
valueString
)
:
valueString
,
operator
:
filter
.
value
.
operator
,
},
};
...
...
app/assets/stylesheets/page_bundles/jira_connect.scss
View file @
4d89e6a2
@import
'mixins_and_variables_and_functions'
;
// We should only import styles that we actually use.
// @import '@gitlab/ui/src/scss/gitlab_ui';
/**
NOTE: We should only import styles that we actually use.
Ex:
@import '@gitlab/ui/src/scss/gitlab_ui';
*/
@import
'@gitlab/ui/src/scss/bootstrap'
;
@import
'bootstrap-vue/src/index'
;
@import
'@gitlab/ui/src/scss/utilities'
;
@import
'@gitlab/ui/src/components/base/alert/alert'
;
$atlaskit-border-color
:
#dfe1e6
;
...
...
app/views/jira_connect/subscriptions/index.html.haml
View file @
4d89e6a2
...
...
@@ -9,10 +9,9 @@
=
link_to
_
(
'Sign in to GitLab'
),
jira_connect_users_path
,
target:
'_blank'
,
rel:
'noopener noreferrer'
,
class:
'js-jira-connect-sign-in'
.jira-connect-app
%h1
GitLab for Jira Configuration
-
if
current_user
.
blank?
&&
@subscriptions
.
empty?
%h1
GitLab for Jira Configuration
%h2
.heading-with-border
Sign in to GitLab.com to get started.
.gl-mt-5
...
...
changelogs/unreleased/13019-improve-error-messages-when-adding-namespaces-in-jira-connect-app.yml
0 → 100644
View file @
4d89e6a2
---
title
:
Improve error messages when adding namespaces in Jira Connect App
merge_request
:
48651
author
:
type
:
changed
doc/user/group/roadmap/img/roadmap_filters_v13_7.png
deleted
100644 → 0
View file @
3658a9b8
21.1 KB
doc/user/group/roadmap/img/roadmap_filters_v13_8.png
0 → 100644
View file @
4d89e6a2
20.3 KB
doc/user/group/roadmap/index.md
View file @
4d89e6a2
...
...
@@ -67,8 +67,9 @@ You can also filter epics in the Roadmap view by:
-
Author
-
Label
-
Milestone
-
Confidentiality of epics
![
roadmap date range in weeks
](
img/roadmap_filters_v13_
7
.png
)
![
roadmap date range in weeks
](
img/roadmap_filters_v13_
8
.png
)
Roadmaps can also be
[
visualized inside an epic
](
../epics/index.md#roadmap-in-epics
)
.
...
...
ee/app/assets/javascripts/roadmap/components/roadmap_filters.vue
View file @
4d89e6a2
...
...
@@ -6,6 +6,7 @@ import {
GlDropdown
,
GlDropdownItem
,
GlDropdownDivider
,
GlFilteredSearchToken
,
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
@@ -132,10 +133,23 @@ export default {
});
},
},
{
type
:
'
confidential
'
,
icon
:
'
eye-slash
'
,
title
:
__
(
'
Confidential
'
),
unique
:
true
,
token
:
GlFilteredSearchToken
,
operators
:
[{
value
:
'
=
'
,
description
:
__
(
'
is
'
),
default
:
'
true
'
}],
options
:
[
{
icon
:
'
eye-slash
'
,
value
:
true
,
title
:
__
(
'
Yes
'
)
},
{
icon
:
'
eye
'
,
value
:
false
,
title
:
__
(
'
No
'
)
},
],
},
];
},
getFilteredSearchValue
()
{
const
{
authorUsername
,
labelName
,
milestoneTitle
,
search
}
=
this
.
filterParams
||
{};
const
{
authorUsername
,
labelName
,
milestoneTitle
,
confidential
,
search
}
=
this
.
filterParams
||
{};
const
filteredSearchValue
=
[];
if
(
authorUsername
)
{
...
...
@@ -161,6 +175,13 @@ export default {
);
}
if
(
confidential
!==
undefined
)
{
filteredSearchValue
.
push
({
type
:
'
confidential
'
,
value
:
{
data
:
confidential
},
});
}
if
(
search
)
{
filteredSearchValue
.
push
(
search
);
}
...
...
@@ -169,7 +190,8 @@ export default {
},
updateUrl
()
{
const
queryParams
=
urlParamsToObject
(
window
.
location
.
search
);
const
{
authorUsername
,
labelName
,
milestoneTitle
,
search
}
=
this
.
filterParams
||
{};
const
{
authorUsername
,
labelName
,
milestoneTitle
,
confidential
,
search
}
=
this
.
filterParams
||
{};
queryParams
.
state
=
this
.
epicsState
;
queryParams
.
sort
=
this
.
sortedBy
;
...
...
@@ -191,6 +213,12 @@ export default {
queryParams
[
'
label_name[]
'
]
=
labelName
;
}
if
(
confidential
!==
undefined
)
{
queryParams
.
confidential
=
confidential
;
}
else
{
delete
queryParams
.
confidential
;
}
if
(
search
)
{
queryParams
.
search
=
search
;
}
else
{
...
...
@@ -229,6 +257,9 @@ export default {
case
'
label_name
'
:
labels
.
push
(
filter
.
value
.
data
);
break
;
case
'
confidential
'
:
filterParams
.
confidential
=
filter
.
value
.
data
;
break
;
default
:
break
;
}
...
...
ee/app/assets/javascripts/roadmap/queries/epic.fragment.graphql
View file @
4d89e6a2
...
...
@@ -9,6 +9,7 @@ fragment BaseEpic on Epic {
dueDate
hasChildren
hasParent
confidential
descendantWeightSum
{
closedIssues
openedIssues
...
...
ee/app/assets/javascripts/roadmap/queries/epicChildEpics.query.graphql
View file @
4d89e6a2
...
...
@@ -9,6 +9,7 @@ query epicChildEpics(
$dueDate
:
Time
$labelName
:
[
String
!]
=
[]
$authorUsername
:
String
=
""
$confidential
:
Boolean
$search
:
String
=
""
)
{
group
(
fullPath
:
$fullPath
)
{
...
...
@@ -25,6 +26,7 @@ query epicChildEpics(
endDate
:
$dueDate
labelName
:
$labelName
authorUsername
:
$authorUsername
confidential
:
$confidential
search
:
$search
)
{
edges
{
...
...
ee/app/assets/javascripts/roadmap/queries/groupEpics.query.graphql
View file @
4d89e6a2
...
...
@@ -9,6 +9,7 @@ query groupEpics(
$labelName
:
[
String
!]
=
[]
$authorUsername
:
String
=
""
$milestoneTitle
:
String
=
""
$confidential
:
Boolean
$search
:
String
=
""
)
{
group
(
fullPath
:
$fullPath
)
{
...
...
@@ -22,6 +23,7 @@ query groupEpics(
labelName
:
$labelName
authorUsername
:
$authorUsername
milestoneTitle
:
$milestoneTitle
confidential
:
$confidential
search
:
$search
)
{
edges
{
...
...
ee/app/assets/javascripts/roadmap/roadmap_bundle.js
View file @
4d89e6a2
...
...
@@ -57,11 +57,17 @@ export default () => {
supportedPresetTypes
.
indexOf
(
dataset
.
presetType
)
>
-
1
?
dataset
.
presetType
:
PRESET_TYPES
.
MONTHS
;
const
filterParams
=
Object
.
assign
(
convertObjectPropsToCamelCase
(
urlParamsToObject
(
window
.
location
.
search
.
substring
(
1
)),
{
const
rawFilterParams
=
urlParamsToObject
(
window
.
location
.
search
.
substring
(
1
));
const
filterParams
=
{
...
convertObjectPropsToCamelCase
(
rawFilterParams
,
{
dropKeys
:
[
'
scope
'
,
'
utf8
'
,
'
state
'
,
'
sort
'
,
'
layout
'
],
// These keys are unsupported/unnecessary
}),
);
// We shall put parsed value of `confidential` only
// when it is defined.
...(
rawFilterParams
.
confidential
&&
{
confidential
:
parseBoolean
(
rawFilterParams
.
confidential
),
}),
};
const
timeframe
=
getTimeframeForPreset
(
presetType
,
window
.
innerWidth
-
el
.
offsetLeft
-
EPIC_DETAILS_CELL_WIDTH
,
...
...
ee/changelogs/unreleased/218624-filter-roadmap-by-confidentiality.yml
0 → 100644
View file @
4d89e6a2
---
title
:
Add confidential filter token in Roadmap
merge_request
:
51196
author
:
type
:
added
ee/spec/frontend/roadmap/components/roadmap_filters_spec.js
View file @
4d89e6a2
import
{
GlSegmentedControl
,
GlDropdown
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlSegmentedControl
,
GlDropdown
,
GlDropdownItem
,
GlFilteredSearchToken
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
...
...
@@ -89,6 +89,7 @@ describe('RoadmapFilters', () => {
authorUsername
:
'
root
'
,
labelName
:
[
'
Bug
'
],
milestoneTitle
:
'
4.0
'
,
confidential
:
true
,
});
wrapper
.
vm
.
$store
.
dispatch
(
'
setSortedBy
'
,
'
end_date_asc
'
);
...
...
@@ -97,7 +98,7 @@ describe('RoadmapFilters', () => {
wrapper
.
vm
.
updateUrl
();
expect
(
global
.
window
.
location
.
href
).
toBe
(
`
${
TEST_HOST
}
/?state=
${
EPICS_STATES
.
CLOSED
}
&sort=end_date_asc&author_username=root&milestone_title=4.0&label_name%5B%5D=Bug`
,
`
${
TEST_HOST
}
/?state=
${
EPICS_STATES
.
CLOSED
}
&sort=end_date_asc&author_username=root&milestone_title=4.0&label_name%5B%5D=Bug
&confidential=true
`
,
);
});
});
...
...
@@ -143,10 +144,18 @@ describe('RoadmapFilters', () => {
type
:
'
author_username
'
,
value
:
{
data
:
'
root
'
},
},
{
type
:
'
milestone_title
'
,
value
:
{
data
:
'
4.0
'
},
},
{
type
:
'
label_name
'
,
value
:
{
data
:
'
Bug
'
},
},
{
type
:
'
confidential
'
,
value
:
{
data
:
true
},
},
];
let
filteredSearchBar
;
...
...
@@ -192,6 +201,18 @@ describe('RoadmapFilters', () => {
operators
:
[{
value
:
'
=
'
,
description
:
'
is
'
,
default
:
'
true
'
}],
fetchMilestones
:
expect
.
any
(
Function
),
},
{
type
:
'
confidential
'
,
icon
:
'
eye-slash
'
,
title
:
'
Confidential
'
,
unique
:
true
,
token
:
GlFilteredSearchToken
,
operators
:
[{
value
:
'
=
'
,
description
:
'
is
'
,
default
:
'
true
'
}],
options
:
[
{
icon
:
'
eye-slash
'
,
value
:
true
,
title
:
'
Yes
'
},
{
icon
:
'
eye
'
,
value
:
false
,
title
:
'
No
'
},
],
},
]);
});
...
...
@@ -220,6 +241,8 @@ describe('RoadmapFilters', () => {
wrapper
.
vm
.
$store
.
dispatch
(
'
setFilterParams
'
,
{
authorUsername
:
'
root
'
,
labelName
:
[
'
Bug
'
],
milestoneTitle
:
'
4.0
'
,
confidential
:
true
,
});
await
wrapper
.
vm
.
$nextTick
();
...
...
@@ -241,6 +264,8 @@ describe('RoadmapFilters', () => {
expect
(
wrapper
.
vm
.
setFilterParams
).
toHaveBeenCalledWith
({
authorUsername
:
'
root
'
,
labelName
:
[
'
Bug
'
],
milestoneTitle
:
'
4.0
'
,
confidential
:
true
,
});
expect
(
wrapper
.
vm
.
fetchEpics
).
toHaveBeenCalled
();
expect
(
wrapper
.
vm
.
updateUrl
).
toHaveBeenCalled
();
...
...
spec/frontend/jira_connect/components/app_spec.js
View file @
4d89e6a2
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
GlAlert
}
from
'
@gitlab/ui
'
;
import
JiraConnectApp
from
'
~/jira_connect/components/app.vue
'
;
import
createStore
from
'
~/jira_connect/store
'
;
import
{
SET_ERROR_MESSAGE
}
from
'
~/jira_connect/store/mutation_types
'
;
Vue
.
use
(
Vuex
);
describe
(
'
JiraConnectApp
'
,
()
=>
{
let
wrapper
;
let
store
;
const
findAlert
=
()
=>
wrapper
.
findComponent
(
GlAlert
);
const
findHeader
=
()
=>
wrapper
.
findByTestId
(
'
new-jira-connect-ui-heading
'
);
const
findHeaderText
=
()
=>
findHeader
().
text
();
const
createComponent
=
(
options
=
{})
=>
{
store
=
createStore
();
wrapper
=
extendedWrapper
(
shallowMount
(
JiraConnectApp
,
{
store
,
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
true
},
},
...
...
@@ -43,5 +55,26 @@ describe('JiraConnectApp', () => {
expect
(
findHeader
().
exists
()).
toBe
(
false
);
});
});
it
.
each
`
errorMessage | errorShouldRender
${
'
Test error
'
}
|
${
true
}
${
''
}
|
${
false
}
${
undefined
}
|
${
false
}
`
(
'
renders correct alert when errorMessage is `$errorMessage`
'
,
async
({
errorMessage
,
errorShouldRender
})
=>
{
createComponent
();
store
.
commit
(
SET_ERROR_MESSAGE
,
errorMessage
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
findAlert
().
exists
()).
toBe
(
errorShouldRender
);
if
(
errorShouldRender
)
{
expect
(
findAlert
().
isVisible
()).
toBe
(
errorShouldRender
);
expect
(
findAlert
().
html
()).
toContain
(
errorMessage
);
}
},
);
});
});
spec/frontend/vue_shared/components/filtered_search_bar/filtered_search_bar_root_spec.js
View file @
4d89e6a2
...
...
@@ -25,6 +25,7 @@ import {
tokenValueLabel
,
tokenValueMilestone
,
tokenValueMembership
,
tokenValueConfidential
,
}
from
'
./mock_data
'
;
jest
.
mock
(
'
~/vue_shared/components/filtered_search_bar/filtered_search_utils
'
,
()
=>
({
...
...
@@ -227,12 +228,13 @@ describe('FilteredSearchBarRoot', () => {
});
describe
(
'
removeQuotesEnclosure
'
,
()
=>
{
const
mockFilters
=
[
tokenValueAuthor
,
tokenValueLabel
,
'
foo
'
];
const
mockFilters
=
[
tokenValueAuthor
,
tokenValueLabel
,
tokenValueConfidential
,
'
foo
'
];
it
(
'
returns filter array with unescaped strings for values which have spaces
'
,
()
=>
{
expect
(
wrapper
.
vm
.
removeQuotesEnclosure
(
mockFilters
)).
toEqual
([
tokenValueAuthor
,
tokenValueLabel
,
tokenValueConfidential
,
'
foo
'
,
]);
});
...
...
spec/frontend/vue_shared/components/filtered_search_bar/mock_data.js
View file @
4d89e6a2
...
...
@@ -155,6 +155,14 @@ export const tokenValueMembership = {
},
};
export
const
tokenValueConfidential
=
{
type
:
'
confidential
'
,
value
:
{
operator
:
'
=
'
,
data
:
true
,
},
};
export
const
tokenValuePlain
=
{
type
:
'
filtered-search-term
'
,
value
:
{
data
:
'
foo
'
},
...
...
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