Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
47c5ecbd5dc7
Commit
47c5ecbd
authored
Sep 18, 2019
by
GitLab Bot
Browse files
Add latest changes from gitlab-org/gitlab@master
parent
48512fb3bf29
Changes
887
Hide whitespace changes
Inline
Side-by-side
.gitlab/ci/frontend.gitlab-ci.yml
View file @
47c5ecbd
...
...
@@ -230,6 +230,7 @@
-
.default-tags
-
.default-retry
-
.default-cache
-
.default-only
-
.only-code-changes
dependencies
:
[
"
setup-test-env"
,
"
compile-assets"
,
"
compile-assets
pull-cache"
]
variables
:
...
...
.gitlab/ci/pages.gitlab-ci.yml
View file @
47c5ecbd
...
...
@@ -4,6 +4,7 @@
-
.default-retry
-
.default-cache
-
.default-only
-
.only-code-qa-changes
only
:
refs
:
-
master
...
...
.gitlab/ci/qa.gitlab-ci.yml
View file @
47c5ecbd
...
...
@@ -25,7 +25,9 @@
needs
:
[
"
build-qa-image"
,
"
gitlab:assets:compile
pull-cache"
]
package-and-qa-manual:master:
extends
:
.package-and-qa-base
extends
:
-
.package-and-qa-base
-
.only-code-qa-changes
only
:
refs
:
-
master@gitlab-org/gitlab-foss
...
...
.gitlab/ci/setup.gitlab-ci.yml
View file @
47c5ecbd
...
...
@@ -6,6 +6,7 @@
-
.default-retry
-
.default-cache
-
.default-before_script
-
.only-code-qa-changes
stage
:
test
dependencies
:
[
"
setup-test-env"
]
needs
:
[
"
setup-test-env"
]
...
...
.gitlab/ci/test-metadata.gitlab-ci.yml
View file @
47c5ecbd
.tests-metadata-state
:
extends
:
.default-only
extends
:
-
.default-only
variables
:
TESTS_METADATA_S3_BUCKET
:
"
gitlab-ce-cache"
before_script
:
...
...
@@ -31,7 +32,9 @@
-
'
[[
!
-d
"ee/"
]]
||
[[
-f
$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
]]
||
echo
"{}"
>
${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
update-tests-metadata
:
extends
:
.tests-metadata-state
extends
:
-
.tests-metadata-state
-
.only-code-changes
stage
:
post-test
cache
:
key
:
tests_metadata
...
...
GITALY_SERVER_VERSION
View file @
47c5ecbd
1.6
2
.0
1.6
4
.0
app/assets/javascripts/behaviors/markdown/render_metrics.js
View file @
47c5ecbd
...
...
@@ -2,7 +2,7 @@
import
Metrics
from
'
~/monitoring/components/embed.vue
'
;
import
{
createStore
}
from
'
~/monitoring/stores
'
;
// TODO: Handle copy-pasting - https://gitlab.com/gitlab-org/gitlab-
ce
/issues/64369.
// TODO: Handle copy-pasting - https://gitlab.com/gitlab-org/gitlab-
foss
/issues/64369.
export
default
function
renderMetrics
(
elements
)
{
if
(
!
elements
.
length
)
{
return
;
...
...
app/assets/javascripts/behaviors/preview_markdown.js
View file @
47c5ecbd
/* eslint-disable func-names, no-var,
object-shorthand,
prefer-arrow-callback */
/* eslint-disable func-names, no-var, prefer-arrow-callback */
import
$
from
'
jquery
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -82,7 +82,7 @@
})
.
then
(({
data
})
=>
{
this
.
ajaxCache
=
{
text
:
text
,
text
,
response
:
data
,
};
success
(
data
);
...
...
app/assets/javascripts/blob/blob_file_dropzone.js
View file @
47c5ecbd
/* eslint-disable func-names,
object-shorthand,
prefer-arrow-callback */
/* eslint-disable func-names, prefer-arrow-callback */
import
$
from
'
jquery
'
;
import
Dropzone
from
'
dropzone
'
;
...
...
@@ -32,7 +32,7 @@
url
:
form
.
attr
(
'
action
'
),
// Rails uses a hidden input field for PUT
// http://stackoverflow.com/questions/21056482/how-to-set-method-put-in-form-tag-in-rails
method
:
method
,
method
,
clickable
:
true
,
uploadMultiple
:
false
,
paramName
:
'
file
'
,
...
...
@@ -42,7 +42,7 @@
addRemoveLinks
:
true
,
previewsContainer
:
'
.dropzone-previews
'
,
headers
:
csrf
.
headers
,
init
:
function
()
{
init
()
{
this
.
on
(
'
addedfile
'
,
function
()
{
toggleLoading
(
submitButton
,
submitButtonLoadingIcon
,
false
);
dropzoneMessage
.
addClass
(
HIDDEN_CLASS
);
...
...
@@ -69,7 +69,7 @@
});
},
// Override behavior of adding error underneath preview
error
:
function
(
file
,
errorMessage
)
{
error
(
file
,
errorMessage
)
{
const
stripped
=
$
(
'
<div/>
'
)
.
html
(
errorMessage
)
.
text
();
...
...
app/assets/javascripts/boards/components/board.js
View file @
47c5ecbd
...
...
@@ -50,6 +50,9 @@
};
},
computed
:
{
isLoggedIn
()
{
return
Boolean
(
gon
.
current_user_id
);
},
counterTooltip
()
{
const
{
issuesSize
}
=
this
.
list
;
return
`
${
n__
(
'
%d issue
'
,
'
%d issues
'
,
issuesSize
)}
`
;
...
...
@@ -106,7 +109,11 @@
Sortable
.
create
(
this
.
$el
.
parentNode
,
sortableOptions
);
},
created
()
{
if
(
this
.
list
.
isExpandable
&&
AccessorUtilities
.
isLocalStorageAccessSafe
())
{
if
(
this
.
list
.
isExpandable
&&
AccessorUtilities
.
isLocalStorageAccessSafe
()
&&
!
this
.
isLoggedIn
)
{
const
isCollapsed
=
localStorage
.
getItem
(
`
${
this
.
uniqueKey
}
.expanded`
)
===
'
false
'
;
this
.
list
.
isExpanded
=
!
isCollapsed
;
...
...
@@ -120,7 +127,7 @@
if
(
this
.
list
.
isExpandable
)
{
this
.
list
.
isExpanded
=
!
this
.
list
.
isExpanded
;
if
(
AccessorUtilities
.
isLocalStorageAccessSafe
())
{
if
(
AccessorUtilities
.
isLocalStorageAccessSafe
()
&&
!
this
.
isLoggedIn
)
{
localStorage
.
setItem
(
`
${
this
.
uniqueKey
}
.expanded`
,
this
.
list
.
isExpanded
);
}
...
...
@@ -124,6 +131,10 @@
localStorage
.
setItem
(
`
${
this
.
uniqueKey
}
.expanded`
,
this
.
list
.
isExpanded
);
}
if
(
this
.
isLoggedIn
)
{
this
.
list
.
update
();
}
// When expanding/collapsing, the tooltip on the caret button sometimes stays open.
// Close all tooltips manually to prevent dangling tooltips.
$
(
'
.tooltip
'
).
tooltip
(
'
hide
'
);
...
...
app/assets/javascripts/boards/components/new_list_dropdown.js
View file @
47c5ecbd
/* eslint-disable func-names, no-new
, promise/catch-or-return
*/
/* eslint-disable func-names, no-new */
import
$
from
'
jquery
'
;
...
...
@@ -2,3 +2,4 @@
import
$
from
'
jquery
'
;
import
{
__
}
from
'
~/locale
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
...
...
@@ -4,4 +5,5 @@
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
flash
from
'
~/flash
'
;
import
CreateLabelDropdown
from
'
../../create_label
'
;
import
boardsStore
from
'
../stores/boards_store
'
;
...
...
@@ -26,5 +28,6 @@
export
default
function
initNewListDropdown
()
{
$
(
'
.js-new-board-list
'
).
each
(
function
()
{
const
$this
=
$
(
this
);
const
$dropdownToggle
=
$
(
this
);
const
$dropdown
=
$dropdownToggle
.
closest
(
'
.dropdown
'
);
new
CreateLabelDropdown
(
...
...
@@ -30,6 +33,6 @@
new
CreateLabelDropdown
(
$
this
.
closest
(
'
.
dropdown
'
)
.
find
(
'
.dropdown-new-label
'
),
$
this
.
data
(
'
namespacePath
'
),
$
this
.
data
(
'
projectPath
'
),
$dropdown
.
find
(
'
.dropdown-new-label
'
),
$
dropdownToggle
.
data
(
'
namespacePath
'
),
$
dropdownToggle
.
data
(
'
projectPath
'
),
);
...
...
@@ -34,4 +37,4 @@
);
$
this
.
glDropdown
({
$
dropdownToggle
.
glDropdown
({
data
(
term
,
callback
)
{
...
...
@@ -37,7 +40,11 @@
data
(
term
,
callback
)
{
axios
.
get
(
$this
.
attr
(
'
data-list-labels-path
'
)).
then
(({
data
})
=>
{
callback
(
data
);
});
axios
.
get
(
$dropdownToggle
.
attr
(
'
data-list-labels-path
'
))
.
then
(({
data
})
=>
callback
(
data
))
.
catch
(()
=>
{
$dropdownToggle
.
data
(
'
bs.dropdown
'
).
hide
();
flash
(
__
(
'
Error fetching labels.
'
));
});
},
renderRow
(
label
)
{
const
active
=
boardsStore
.
findListByLabelId
(
label
.
id
);
...
...
app/assets/javascripts/boards/models/issue.js
View file @
47c5ecbd
...
...
@@ -11,11 +11,6 @@
class
ListIssue
{
constructor
(
obj
,
defaultAvatar
)
{
this
.
id
=
obj
.
id
;
this
.
iid
=
obj
.
iid
;
this
.
title
=
obj
.
title
;
this
.
confidential
=
obj
.
confidential
;
this
.
dueDate
=
obj
.
due_date
;
this
.
subscribed
=
obj
.
subscribed
;
this
.
labels
=
[];
this
.
assignees
=
[];
...
...
@@ -25,6 +20,16 @@
subscriptions
:
true
,
};
this
.
isLoading
=
{};
this
.
refreshData
(
obj
,
defaultAvatar
);
}
refreshData
(
obj
,
defaultAvatar
)
{
this
.
id
=
obj
.
id
;
this
.
iid
=
obj
.
iid
;
this
.
title
=
obj
.
title
;
this
.
confidential
=
obj
.
confidential
;
this
.
dueDate
=
obj
.
due_date
;
this
.
sidebarInfoEndpoint
=
obj
.
issue_sidebar_endpoint
;
this
.
referencePath
=
obj
.
reference_path
;
this
.
path
=
obj
.
real_path
;
...
...
@@ -42,7 +47,7 @@
this
.
milestone_id
=
obj
.
milestone
.
id
;
}
obj
.
labels
.
forEach
(
label
=>
{
this
.
labels
.
push
(
new
ListLabel
(
label
));
}
);
if
(
obj
.
labels
)
{
this
.
labels
=
obj
.
labels
.
map
(
label
=>
new
ListLabel
(
label
));
}
...
...
@@ -48,5 +53,7 @@
this
.
assignees
=
obj
.
assignees
.
map
(
a
=>
new
ListAssignee
(
a
,
defaultAvatar
));
if
(
obj
.
assignees
)
{
this
.
assignees
=
obj
.
assignees
.
map
(
a
=>
new
ListAssignee
(
a
,
defaultAvatar
));
}
}
addLabel
(
label
)
{
...
...
app/assets/javascripts/boards/models/list.js
View file @
47c5ecbd
/* eslint-disable no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow
, no-param-reassign
*/
/* eslint-disable no-underscore-dangle, class-methods-use-this, consistent-return, no-shadow */
import
{
__
}
from
'
~/locale
'
;
import
ListLabel
from
'
./label
'
;
...
...
@@ -45,7 +45,7 @@
const
typeInfo
=
this
.
getTypeInfo
(
this
.
type
);
this
.
preset
=
Boolean
(
typeInfo
.
isPreset
);
this
.
isExpandable
=
Boolean
(
typeInfo
.
isExpandable
);
this
.
isExpanded
=
true
;
this
.
isExpanded
=
!
obj
.
collapsed
;
this
.
page
=
1
;
this
.
loading
=
true
;
this
.
loadingMore
=
false
;
...
...
@@ -113,7 +113,8 @@
}
update
()
{
gl
.
boardService
.
updateList
(
this
.
id
,
this
.
position
).
catch
(()
=>
{
const
collapsed
=
!
this
.
isExpanded
;
return
gl
.
boardService
.
updateList
(
this
.
id
,
this
.
position
,
collapsed
).
catch
(()
=>
{
// TODO: handle request error
});
}
...
...
@@ -259,12 +260,7 @@
}
onNewIssueResponse
(
issue
,
data
)
{
issue
.
id
=
data
.
id
;
issue
.
iid
=
data
.
iid
;
issue
.
project
=
data
.
project
;
issue
.
path
=
data
.
real_path
;
issue
.
referencePath
=
data
.
reference_path
;
issue
.
assignableLabelsEndpoint
=
data
.
assignable_labels_endpoint
;
issue
.
refreshData
(
data
);
if
(
this
.
issuesSize
>
1
)
{
const
moveBeforeId
=
this
.
issues
[
1
].
id
;
...
...
app/assets/javascripts/boards/services/board_service.js
View file @
47c5ecbd
...
...
@@ -2,7 +2,7 @@
/**
* This file is intended to be deleted.
* The existing functions will removed one by one in favor of using the board store directly.
* see https://gitlab.com/gitlab-org/gitlab-
ce
/issues/61621
* see https://gitlab.com/gitlab-org/gitlab-
foss
/issues/61621
*/
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
...
...
@@ -32,8 +32,8 @@
return
boardsStore
.
createList
(
entityId
,
entityType
);
}
updateList
(
id
,
position
)
{
return
boardsStore
.
updateList
(
id
,
position
);
updateList
(
id
,
position
,
collapsed
)
{
return
boardsStore
.
updateList
(
id
,
position
,
collapsed
);
}
destroyList
(
id
)
{
...
...
app/assets/javascripts/boards/stores/boards_store.js
View file @
47c5ecbd
...
...
@@ -82,7 +82,7 @@
this
.
state
.
lists
=
_
.
sortBy
(
this
.
state
.
lists
,
'
position
'
);
})
.
catch
(()
=>
{
// https://gitlab.com/gitlab-org/gitlab-
ce
/issues/30821
// https://gitlab.com/gitlab-org/gitlab-
foss
/issues/30821
});
this
.
removeBlankState
();
},
...
...
@@ -278,7 +278,7 @@
});
},
updateList
(
id
,
position
)
{
updateList
(
id
,
position
,
collapsed
)
{
return
axios
.
put
(
`
${
this
.
state
.
endpoints
.
listsEndpoint
}
/
${
id
}
`
,
{
list
:
{
position
,
...
...
@@ -282,6 +282,7 @@
return
axios
.
put
(
`
${
this
.
state
.
endpoints
.
listsEndpoint
}
/
${
id
}
`
,
{
list
:
{
position
,
collapsed
,
},
});
},
...
...
app/assets/javascripts/boards/stores/boards_store_ee.js
View file @
47c5ecbd
// this is just to make ee_else_ce happy and will be cleaned up in https://gitlab.com/gitlab-org/gitlab-
ce
/issues/59807
// this is just to make ee_else_ce happy and will be cleaned up in https://gitlab.com/gitlab-org/gitlab-
foss
/issues/59807
export
default
{
initEESpecific
()
{},
...
...
app/assets/javascripts/ci_variable_list/ci_variable_list.js
View file @
47c5ecbd
...
...
@@ -54,7 +54,7 @@
environment_scope
:
{
// We can't use a `.js-` class here because
// gl_dropdown replaces the <input> and doesn't copy over the class
// See https://gitlab.com/gitlab-org/gitlab-
ce
/issues/42458
// See https://gitlab.com/gitlab-org/gitlab-
foss
/issues/42458
selector
:
`input[name="
${
this
.
formField
}
[variables_attributes][][environment_scope]"]`
,
default
:
'
*
'
,
},
...
...
app/assets/javascripts/clusters/clusters_bundle.js
View file @
47c5ecbd
...
...
@@ -111,11 +111,17 @@
this
.
initApplications
(
clusterType
);
this
.
initEnvironments
();
if
(
clusterEnvironmentsPath
)
{
this
.
fetchEnvironments
();
if
(
clusterEnvironmentsPath
&&
this
.
environments
)
{
this
.
store
.
toggleFetchEnvironments
(
true
);
this
.
initPolling
(
'
fetchClusterEnvironments
'
,
data
=>
this
.
handleClusterEnvironmentsSuccess
(
data
),
()
=>
this
.
handleEnvironmentsPollError
(),
);
}
this
.
updateContainer
(
null
,
this
.
store
.
state
.
status
,
this
.
store
.
state
.
statusReason
);
this
.
addListeners
();
if
(
statusPath
&&
!
this
.
environments
)
{
...
...
@@ -116,10 +122,14 @@
}
this
.
updateContainer
(
null
,
this
.
store
.
state
.
status
,
this
.
store
.
state
.
statusReason
);
this
.
addListeners
();
if
(
statusPath
&&
!
this
.
environments
)
{
this
.
initPolling
();
this
.
initPolling
(
'
fetchClusterStatus
'
,
data
=>
this
.
handleClusterStatusSuccess
(
data
),
()
=>
this
.
handlePollError
(),
);
}
}
...
...
@@ -179,16 +189,9 @@
});
}
fetchEnvironments
()
{
this
.
store
.
toggleFetchEnvironments
(
true
);
this
.
service
.
fetchClusterEnvironments
()
.
then
(
data
=>
{
this
.
store
.
toggleFetchEnvironments
(
false
);
this
.
store
.
updateEnvironments
(
data
.
data
);
})
.
catch
(()
=>
Clusters
.
handleError
());
handleClusterEnvironmentsSuccess
(
data
)
{
this
.
store
.
toggleFetchEnvironments
(
false
);
this
.
store
.
updateEnvironments
(
data
.
data
);
}
static
initDismissableCallout
()
{
...
...
@@ -224,6 +227,6 @@
eventHub
.
$off
(
'
uninstallApplication
'
);
}
initPolling
()
{
initPolling
(
method
,
successCallback
,
errorCallback
)
{
this
.
poll
=
new
Poll
({
resource
:
this
.
service
,
...
...
@@ -228,9 +231,9 @@
this
.
poll
=
new
Poll
({
resource
:
this
.
service
,
method
:
'
fetchData
'
,
successCallback
:
data
=>
this
.
handleSuccess
(
data
)
,
errorCallback
:
()
=>
Clusters
.
handleError
()
,
method
,
successCallback
,
errorCallback
,
});
if
(
!
Visibility
.
hidden
())
{
this
.
poll
.
makeRequest
();
...
...
@@ -233,12 +236,7 @@
});
if
(
!
Visibility
.
hidden
())
{
this
.
poll
.
makeRequest
();
}
else
{
this
.
service
.
fetchData
()
.
then
(
data
=>
this
.
handleSuccess
(
data
))
.
catch
(()
=>
Clusters
.
handleError
());
}
Visibility
.
change
(()
=>
{
...
...
@@ -250,7 +248,17 @@
});
}
handlePollError
()
{
this
.
constructor
.
handleError
();
}
handleEnvironmentsPollError
()
{
this
.
store
.
toggleFetchEnvironments
(
false
);
this
.
handlePollError
();
}
static
handleError
()
{
Flash
(
s__
(
'
ClusterIntegration|Something went wrong on our end.
'
));
}
...
...
@@ -253,8 +261,8 @@
static
handleError
()
{
Flash
(
s__
(
'
ClusterIntegration|Something went wrong on our end.
'
));
}
handleSuccess
(
data
)
{
handle
ClusterStatus
Success
(
data
)
{
const
prevStatus
=
this
.
store
.
state
.
status
;
const
prevApplicationMap
=
Object
.
assign
({},
this
.
store
.
state
.
applications
);
...
...
app/assets/javascripts/clusters/services/clusters_service.js
View file @
47c5ecbd
...
...
@@ -17,7 +17,7 @@
};
}
fetch
Data
()
{
fetch
ClusterStatus
()
{
return
axios
.
get
(
this
.
options
.
endpoint
);
}
...
...
app/assets/javascripts/clusters/stores/clusters_store.js
View file @
47c5ecbd
...
...
@@ -218,6 +218,7 @@
environmentPath
:
environment
.
environment_path
,
lastDeployment
:
environment
.
last_deployment
,
rolloutStatus
:
{
status
:
environment
.
rollout_status
?
environment
.
rollout_status
.
status
:
null
,
instances
:
environment
.
rollout_status
?
environment
.
rollout_status
.
instances
:
[],
},
updatedAt
:
environment
.
updated_at
,
...
...
Prev
1
2
3
4
5
…
45
Next
Write
Preview
Supports
Markdown
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