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
99c4e46d
Commit
99c4e46d
authored
May 28, 2018
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix `no-unused-vars`
parent
ef849c6c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
109 additions
and
159 deletions
+109
-159
app/assets/javascripts/boards/components/modal/list.js
app/assets/javascripts/boards/components/modal/list.js
+5
-4
app/assets/javascripts/boards/components/project_select.vue
app/assets/javascripts/boards/components/project_select.vue
+55
-57
app/assets/javascripts/ide/lib/common/model.js
app/assets/javascripts/ide/lib/common/model.js
+0
-1
app/assets/javascripts/ide/stores/actions/file.js
app/assets/javascripts/ide/stores/actions/file.js
+3
-3
app/assets/javascripts/ide/stores/actions/merge_request.js
app/assets/javascripts/ide/stores/actions/merge_request.js
+3
-3
app/assets/javascripts/ide/stores/actions/project.js
app/assets/javascripts/ide/stores/actions/project.js
+4
-10
app/assets/javascripts/ide/stores/actions/tree.js
app/assets/javascripts/ide/stores/actions/tree.js
+3
-3
app/assets/javascripts/ide/stores/modules/commit/actions.js
app/assets/javascripts/ide/stores/modules/commit/actions.js
+4
-7
app/assets/javascripts/jobs/job_details_mediator.js
app/assets/javascripts/jobs/job_details_mediator.js
+2
-3
app/assets/javascripts/notes/stores/actions.js
app/assets/javascripts/notes/stores/actions.js
+19
-50
app/assets/javascripts/registry/stores/actions.js
app/assets/javascripts/registry/stores/actions.js
+11
-11
spec/javascripts/boards/board_blank_state_spec.js
spec/javascripts/boards/board_blank_state_spec.js
+0
-1
spec/javascripts/boards/board_card_spec.js
spec/javascripts/boards/board_card_spec.js
+0
-1
spec/javascripts/boards/board_list_spec.js
spec/javascripts/boards/board_list_spec.js
+0
-1
spec/javascripts/boards/board_new_issue_spec.js
spec/javascripts/boards/board_new_issue_spec.js
+0
-1
spec/javascripts/boards/boards_store_spec.js
spec/javascripts/boards/boards_store_spec.js
+0
-1
spec/javascripts/boards/issue_spec.js
spec/javascripts/boards/issue_spec.js
+0
-1
spec/javascripts/boards/list_spec.js
spec/javascripts/boards/list_spec.js
+0
-1
No files found.
app/assets/javascripts/boards/components/modal/list.js
View file @
99c4e46d
/* global ListIssue */
import
Vue
from
'
vue
'
;
import
bp
from
'
../../../breakpoints
'
;
import
ModalStore
from
'
../../stores/modal_store
'
;
...
...
@@ -56,8 +54,11 @@ gl.issueBoards.ModalList = Vue.extend({
scrollHandler
()
{
const
currentPage
=
Math
.
floor
(
this
.
issues
.
length
/
this
.
perPage
);
if
((
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
100
)
&&
!
this
.
loadingNewPage
&&
currentPage
===
this
.
page
)
{
if
(
this
.
scrollTop
()
>
this
.
scrollHeight
()
-
100
&&
!
this
.
loadingNewPage
&&
currentPage
===
this
.
page
)
{
this
.
loadingNewPage
=
true
;
this
.
page
+=
1
;
}
...
...
app/assets/javascripts/boards/components/project_select.vue
View file @
99c4e46d
<
script
>
/* global ListIssue */
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
eventHub
from
'
../eventhub
'
;
import
loadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
import
Api
from
'
../../api
'
;
import
$
from
'
jquery
'
;
import
_
from
'
underscore
'
;
import
eventHub
from
'
../eventhub
'
;
import
loadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
import
Api
from
'
../../api
'
;
export
default
{
name
:
'
BoardProjectSelect
'
,
components
:
{
loadingIcon
,
},
props
:
{
groupId
:
{
type
:
Number
,
required
:
true
,
default
:
0
,
},
export
default
{
name
:
'
BoardProjectSelect
'
,
components
:
{
loadingIcon
,
},
props
:
{
groupId
:
{
type
:
Number
,
required
:
true
,
default
:
0
,
},
data
()
{
return
{
loading
:
true
,
selectedProject
:
{},
};
},
data
()
{
return
{
loading
:
true
,
selectedProject
:
{},
};
},
computed
:
{
selectedProjectName
()
{
return
this
.
selectedProject
.
name
||
'
Select a project
'
;
},
computed
:
{
selectedProjectName
()
{
return
this
.
selectedProject
.
name
||
'
Select a project
'
;
},
mounted
()
{
$
(
this
.
$refs
.
projectsDropdown
).
glDropdown
({
filterable
:
true
,
filterRemote
:
true
,
search
:
{
fields
:
[
'
name_with_namespace
'
],
},
},
mounted
()
{
$
(
this
.
$refs
.
projectsDropdown
).
glDropdown
({
filterable
:
true
,
filterRemote
:
true
,
search
:
{
fields
:
[
'
name_with_namespace
'
],
},
clicked
:
({
$el
,
e
})
=>
{
e
.
preventDefault
();
this
.
selectedProject
=
{
id
:
$el
.
data
(
'
project-id
'
),
name
:
$el
.
data
(
'
project-name
'
),
};
eventHub
.
$emit
(
'
setSelectedProject
'
,
this
.
selectedProject
);
},
selectable
:
true
,
data
:
(
term
,
callback
)
=>
{
this
.
loading
=
true
;
return
Api
.
groupProjects
(
this
.
groupId
,
term
,
(
projects
)
=>
{
this
.
loading
=
false
;
callback
(
projects
);
});
},
renderRow
(
project
)
{
return
`
clicked
:
({
$el
,
e
})
=>
{
e
.
preventDefault
();
this
.
selectedProject
=
{
id
:
$el
.
data
(
'
project-id
'
),
name
:
$el
.
data
(
'
project-name
'
),
};
eventHub
.
$emit
(
'
setSelectedProject
'
,
this
.
selectedProject
);
},
selectable
:
true
,
data
:
(
term
,
callback
)
=>
{
this
.
loading
=
true
;
return
Api
.
groupProjects
(
this
.
groupId
,
term
,
projects
=>
{
this
.
loading
=
false
;
callback
(
projects
);
});
},
renderRow
(
project
)
{
return
`
<li>
<a href='#' class='dropdown-menu-link' data-project-id="
${
project
.
id
}
" data-project-name="
${
project
.
name
}
">
${
_
.
escape
(
project
.
name
)}
</a>
</li>
`
;
},
text
:
project
=>
project
.
name
,
});
},
};
},
text
:
project
=>
project
.
name
,
});
},
};
</
script
>
<
template
>
...
...
app/assets/javascripts/ide/lib/common/model.js
View file @
99c4e46d
/* global monaco */
import
Disposable
from
'
./disposable
'
;
import
eventHub
from
'
../../eventhub
'
;
...
...
app/assets/javascripts/ide/stores/actions/file.js
View file @
99c4e46d
...
...
@@ -84,11 +84,11 @@ export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive
});
};
export
const
setFileMrChange
=
({
state
,
commit
},
{
file
,
mrChange
})
=>
{
export
const
setFileMrChange
=
({
commit
},
{
file
,
mrChange
})
=>
{
commit
(
types
.
SET_FILE_MERGE_REQUEST_CHANGE
,
{
file
,
mrChange
});
};
export
const
getRawFileData
=
({
state
,
commit
,
dispatch
},
{
path
,
baseSha
})
=>
{
export
const
getRawFileData
=
({
state
,
commit
},
{
path
,
baseSha
})
=>
{
const
file
=
state
.
entries
[
path
];
return
new
Promise
((
resolve
,
reject
)
=>
{
service
...
...
@@ -156,7 +156,7 @@ export const setEditorPosition = ({ getters, commit }, { editorRow, editorColumn
}
};
export
const
setFileViewMode
=
({
state
,
commit
},
{
file
,
viewMode
})
=>
{
export
const
setFileViewMode
=
({
commit
},
{
file
,
viewMode
})
=>
{
commit
(
types
.
SET_FILE_VIEWMODE
,
{
file
,
viewMode
});
};
...
...
app/assets/javascripts/ide/stores/actions/merge_request.js
View file @
99c4e46d
...
...
@@ -3,7 +3,7 @@ import service from '../../services';
import
*
as
types
from
'
../mutation_types
'
;
export
const
getMergeRequestData
=
(
{
commit
,
state
,
dispatch
},
{
commit
,
state
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -32,7 +32,7 @@ export const getMergeRequestData = (
});
export
const
getMergeRequestChanges
=
(
{
commit
,
state
,
dispatch
},
{
commit
,
state
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -58,7 +58,7 @@ export const getMergeRequestChanges = (
});
export
const
getMergeRequestVersions
=
(
{
commit
,
state
,
dispatch
},
{
commit
,
state
},
{
projectId
,
mergeRequestId
,
force
=
false
}
=
{},
)
=>
new
Promise
((
resolve
,
reject
)
=>
{
...
...
app/assets/javascripts/ide/stores/actions/project.js
View file @
99c4e46d
...
...
@@ -7,10 +7,7 @@ import Poll from '../../../lib/utils/poll';
let
eTagPoll
;
export
const
getProjectData
=
(
{
commit
,
state
,
dispatch
},
{
namespace
,
projectId
,
force
=
false
}
=
{},
)
=>
export
const
getProjectData
=
({
commit
,
state
},
{
namespace
,
projectId
,
force
=
false
}
=
{})
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
projects
[
`
${
namespace
}
/
${
projectId
}
`
]
||
force
)
{
commit
(
types
.
TOGGLE_LOADING
,
{
entry
:
state
});
...
...
@@ -40,10 +37,7 @@ export const getProjectData = (
}
});
export
const
getBranchData
=
(
{
commit
,
state
,
dispatch
},
{
projectId
,
branchId
,
force
=
false
}
=
{},
)
=>
export
const
getBranchData
=
({
commit
,
state
},
{
projectId
,
branchId
,
force
=
false
}
=
{})
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
typeof
state
.
projects
[
`
${
projectId
}
`
]
===
'
undefined
'
||
...
...
@@ -78,7 +72,7 @@ export const getBranchData = (
}
});
export
const
refreshLastCommitData
=
({
commit
,
state
,
dispatch
},
{
projectId
,
branchId
}
=
{})
=>
export
const
refreshLastCommitData
=
({
commit
},
{
projectId
,
branchId
}
=
{})
=>
service
.
getBranchData
(
projectId
,
branchId
)
.
then
(({
data
})
=>
{
...
...
@@ -92,7 +86,7 @@ export const refreshLastCommitData = ({ commit, state, dispatch }, { projectId,
flash
(
__
(
'
Error loading last commit.
'
),
'
alert
'
,
document
,
null
,
false
,
true
);
});
export
const
pollSuccessCallBack
=
({
commit
,
state
,
dispatch
},
{
data
})
=>
{
export
const
pollSuccessCallBack
=
({
commit
,
state
},
{
data
})
=>
{
if
(
data
.
pipelines
&&
data
.
pipelines
.
length
)
{
const
lastCommitHash
=
state
.
projects
[
state
.
currentProjectId
].
branches
[
state
.
currentBranchId
].
commit
.
id
;
...
...
app/assets/javascripts/ide/stores/actions/tree.js
View file @
99c4e46d
...
...
@@ -5,7 +5,7 @@ import * as types from '../mutation_types';
import
{
findEntry
}
from
'
../utils
'
;
import
FilesDecoratorWorker
from
'
../workers/files_decorator_worker
'
;
export
const
toggleTreeOpen
=
({
commit
,
dispatch
},
path
)
=>
{
export
const
toggleTreeOpen
=
({
commit
},
path
)
=>
{
commit
(
types
.
TOGGLE_TREE_OPEN
,
path
);
};
...
...
@@ -23,7 +23,7 @@ export const handleTreeEntryAction = ({ commit, dispatch }, row) => {
}
};
export
const
getLastCommitData
=
({
state
,
commit
,
dispatch
,
getters
},
tree
=
state
)
=>
{
export
const
getLastCommitData
=
({
state
,
commit
,
dispatch
},
tree
=
state
)
=>
{
if
(
!
tree
||
tree
.
lastCommitPath
===
null
||
!
tree
.
lastCommitPath
)
return
;
service
...
...
@@ -49,7 +49,7 @@ export const getLastCommitData = ({ state, commit, dispatch, getters }, tree = s
.
catch
(()
=>
flash
(
'
Error fetching log data.
'
,
'
alert
'
,
document
,
null
,
false
,
true
));
};
export
const
getFiles
=
({
state
,
commit
,
dispatch
},
{
projectId
,
branchId
}
=
{})
=>
export
const
getFiles
=
({
state
,
commit
},
{
projectId
,
branchId
}
=
{})
=>
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
state
.
trees
[
`
${
projectId
}
/
${
branchId
}
`
])
{
const
selectedProject
=
state
.
projects
[
projectId
];
...
...
app/assets/javascripts/ide/stores/modules/commit/actions.js
View file @
99c4e46d
...
...
@@ -31,9 +31,9 @@ export const setLastCommitMessage = ({ rootState, commit }, data) => {
const
currentProject
=
rootState
.
projects
[
rootState
.
currentProjectId
];
const
commitStats
=
data
.
stats
?
sprintf
(
__
(
'
with %{additions} additions, %{deletions} deletions.
'
),
{
additions
:
data
.
stats
.
additions
,
// eslint-disable-line indent
deletions
:
data
.
stats
.
deletions
,
// eslint-disable-line indent
})
// eslint-disable-line indent
additions
:
data
.
stats
.
additions
,
// eslint-disable-line indent
-legacy
deletions
:
data
.
stats
.
deletions
,
// eslint-disable-line indent
-legacy
})
// eslint-disable-line indent
-legacy
:
''
;
const
commitMsg
=
sprintf
(
__
(
'
Your changes have been committed. Commit %{commitId} %{commitStats}
'
),
...
...
@@ -74,10 +74,7 @@ export const checkCommitStatus = ({ rootState }) =>
),
);
export
const
updateFilesAfterCommit
=
(
{
commit
,
dispatch
,
state
,
rootState
,
rootGetters
},
{
data
},
)
=>
{
export
const
updateFilesAfterCommit
=
({
commit
,
dispatch
,
rootState
},
{
data
})
=>
{
const
selectedProject
=
rootState
.
projects
[
rootState
.
currentProjectId
];
const
lastCommit
=
{
commit_path
:
`
${
selectedProject
.
web_url
}
/commit/
${
data
.
id
}
`
,
...
...
app/assets/javascripts/jobs/job_details_mediator.js
View file @
99c4e46d
/* global Build */
import
Visibility
from
'
visibilityjs
'
;
import
Flash
from
'
../flash
'
;
import
Poll
from
'
../lib/utils/poll
'
;
...
...
@@ -50,7 +48,8 @@ export default class JobMediator {
}
getJob
()
{
return
this
.
service
.
getJob
()
return
this
.
service
.
getJob
()
.
then
(
response
=>
this
.
successCallback
(
response
))
.
catch
(()
=>
this
.
errorCallback
());
}
...
...
app/assets/javascripts/notes/stores/actions.js
View file @
99c4e46d
...
...
@@ -12,20 +12,13 @@ import { isInViewport, scrollToElement } from '../../lib/utils/common_utils';
let
eTagPoll
;
export
const
setNotesData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_NOTES_DATA
,
data
);
export
const
setNoteableData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_NOTEABLE_DATA
,
data
);
export
const
setUserData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_USER_DATA
,
data
);
export
const
setLastFetchedAt
=
({
commit
},
data
)
=>
commit
(
types
.
SET_LAST_FETCHED_AT
,
data
);
export
const
setInitialNotes
=
({
commit
},
data
)
=>
commit
(
types
.
SET_INITIAL_NOTES
,
data
);
export
const
setTargetNoteHash
=
({
commit
},
data
)
=>
commit
(
types
.
SET_TARGET_NOTE_HASH
,
data
);
export
const
toggleDiscussion
=
({
commit
},
data
)
=>
commit
(
types
.
TOGGLE_DISCUSSION
,
data
);
export
const
setNotesData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_NOTES_DATA
,
data
);
export
const
setNoteableData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_NOTEABLE_DATA
,
data
);
export
const
setUserData
=
({
commit
},
data
)
=>
commit
(
types
.
SET_USER_DATA
,
data
);
export
const
setLastFetchedAt
=
({
commit
},
data
)
=>
commit
(
types
.
SET_LAST_FETCHED_AT
,
data
);
export
const
setInitialNotes
=
({
commit
},
data
)
=>
commit
(
types
.
SET_INITIAL_NOTES
,
data
);
export
const
setTargetNoteHash
=
({
commit
},
data
)
=>
commit
(
types
.
SET_TARGET_NOTE_HASH
,
data
);
export
const
toggleDiscussion
=
({
commit
},
data
)
=>
commit
(
types
.
TOGGLE_DISCUSSION
,
data
);
export
const
fetchNotes
=
({
commit
},
path
)
=>
service
...
...
@@ -69,20 +62,14 @@ export const createNewNote = ({ commit }, { endpoint, data }) =>
return
res
;
});
export
const
removePlaceholderNotes
=
({
commit
})
=>
commit
(
types
.
REMOVE_PLACEHOLDER_NOTES
);
export
const
removePlaceholderNotes
=
({
commit
})
=>
commit
(
types
.
REMOVE_PLACEHOLDER_NOTES
);
export
const
toggleResolveNote
=
(
{
commit
},
{
endpoint
,
isResolved
,
discussion
},
)
=>
export
const
toggleResolveNote
=
({
commit
},
{
endpoint
,
isResolved
,
discussion
})
=>
service
.
toggleResolveNote
(
endpoint
,
isResolved
)
.
then
(
res
=>
res
.
json
())
.
then
(
res
=>
{
const
mutationType
=
discussion
?
types
.
UPDATE_DISCUSSION
:
types
.
UPDATE_NOTE
;
const
mutationType
=
discussion
?
types
.
UPDATE_DISCUSSION
:
types
.
UPDATE_NOTE
;
commit
(
mutationType
,
res
);
});
...
...
@@ -114,7 +101,7 @@ export const reopenIssue = ({ commit, dispatch, state }) => {
export
const
toggleStateButtonLoading
=
({
commit
},
value
)
=>
commit
(
types
.
TOGGLE_STATE_BUTTON_LOADING
,
value
);
export
const
emitStateChangedEvent
=
({
commit
,
getters
},
data
)
=>
{
export
const
emitStateChangedEvent
=
({
getters
},
data
)
=>
{
const
event
=
new
CustomEvent
(
'
issuable_vue_app:change
'
,
{
detail
:
{
data
,
...
...
@@ -179,10 +166,7 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
loadAwardsHandler
()
.
then
(
awardsHandler
=>
{
awardsHandler
.
addAwardToEmojiBar
(
votesBlock
,
commandsChanges
.
emoji_award
,
);
awardsHandler
.
addAwardToEmojiBar
(
votesBlock
,
commandsChanges
.
emoji_award
);
awardsHandler
.
scrollToAwards
();
})
.
catch
(()
=>
{
...
...
@@ -194,10 +178,7 @@ export const saveNote = ({ commit, dispatch }, noteData) => {
});
}
if
(
commandsChanges
.
spend_time
!=
null
||
commandsChanges
.
time_estimate
!=
null
)
{
if
(
commandsChanges
.
spend_time
!=
null
||
commandsChanges
.
time_estimate
!=
null
)
{
sidebarTimeTrackingEventHub
.
$emit
(
'
timeTrackingUpdated
'
,
res
);
}
}
...
...
@@ -218,14 +199,8 @@ const pollSuccessCallBack = (resp, commit, state, getters) => {
resp
.
notes
.
forEach
(
note
=>
{
if
(
notesById
[
note
.
id
])
{
commit
(
types
.
UPDATE_NOTE
,
note
);
}
else
if
(
note
.
type
===
constants
.
DISCUSSION_NOTE
||
note
.
type
===
constants
.
DIFF_NOTE
)
{
const
discussion
=
utils
.
findNoteObjectById
(
state
.
notes
,
note
.
discussion_id
,
);
}
else
if
(
note
.
type
===
constants
.
DISCUSSION_NOTE
||
note
.
type
===
constants
.
DIFF_NOTE
)
{
const
discussion
=
utils
.
findNoteObjectById
(
state
.
notes
,
note
.
discussion_id
);
if
(
discussion
)
{
commit
(
types
.
ADD_NEW_REPLY_TO_DISCUSSION
,
note
);
...
...
@@ -249,11 +224,8 @@ export const poll = ({ commit, state, getters }) => {
method
:
'
poll
'
,
data
:
state
,
successCallback
:
resp
=>
resp
.
json
()
.
then
(
data
=>
pollSuccessCallBack
(
data
,
commit
,
state
,
getters
)),
errorCallback
:
()
=>
Flash
(
'
Something went wrong while fetching latest comments.
'
),
resp
.
json
().
then
(
data
=>
pollSuccessCallBack
(
data
,
commit
,
state
,
getters
)),
errorCallback
:
()
=>
Flash
(
'
Something went wrong while fetching latest comments.
'
),
});
if
(
!
Visibility
.
hidden
())
{
...
...
@@ -292,14 +264,11 @@ export const fetchData = ({ commit, state, getters }) => {
.
catch
(()
=>
Flash
(
'
Something went wrong while fetching latest comments.
'
));
};
export
const
toggleAward
=
(
{
commit
,
state
,
getters
,
dispatch
},
{
awardName
,
noteId
},
)
=>
{
export
const
toggleAward
=
({
commit
,
getters
},
{
awardName
,
noteId
})
=>
{
commit
(
types
.
TOGGLE_AWARD
,
{
awardName
,
note
:
getters
.
notesById
[
noteId
]
});
};
export
const
toggleAwardRequest
=
({
commit
,
getters
,
dispatch
},
data
)
=>
{
export
const
toggleAwardRequest
=
({
dispatch
},
data
)
=>
{
const
{
endpoint
,
awardName
}
=
data
;
return
service
...
...
app/assets/javascripts/registry/stores/actions.js
View file @
99c4e46d
...
...
@@ -7,9 +7,10 @@ Vue.use(VueResource);
export
const
fetchRepos
=
({
commit
,
state
})
=>
{
commit
(
types
.
TOGGLE_MAIN_LOADING
);
return
Vue
.
http
.
get
(
state
.
endpoint
)
return
Vue
.
http
.
get
(
state
.
endpoint
)
.
then
(
res
=>
res
.
json
())
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
commit
(
types
.
TOGGLE_MAIN_LOADING
);
commit
(
types
.
SET_REPOS_LIST
,
response
);
});
...
...
@@ -18,20 +19,19 @@ export const fetchRepos = ({ commit, state }) => {
export
const
fetchList
=
({
commit
},
{
repo
,
page
})
=>
{
commit
(
types
.
TOGGLE_REGISTRY_LIST_LOADING
,
repo
);
return
Vue
.
http
.
get
(
repo
.
tagsPath
,
{
params
:
{
page
}
})
.
then
((
response
)
=>
{
const
headers
=
response
.
headers
;
return
Vue
.
http
.
get
(
repo
.
tagsPath
,
{
params
:
{
page
}
}).
then
(
response
=>
{
const
headers
=
response
.
headers
;
return
response
.
json
().
then
((
resp
)
=>
{
commit
(
types
.
TOGGLE_REGISTRY_LIST_LOADING
,
repo
);
commit
(
types
.
SET_REGISTRY_LIST
,
{
repo
,
resp
,
headers
});
});
return
response
.
json
().
then
(
resp
=>
{
commit
(
types
.
TOGGLE_REGISTRY_LIST_LOADING
,
repo
);
commit
(
types
.
SET_REGISTRY_LIST
,
{
repo
,
resp
,
headers
});
});
});
};
export
const
deleteRepo
=
({
commit
},
repo
)
=>
Vue
.
http
.
delete
(
repo
.
destroyPath
);
export
const
deleteRepo
=
({
commit
},
repo
)
=>
Vue
.
http
.
delete
(
repo
.
destroyPath
);
// eslint-disable-line no-unused-vars
export
const
deleteRegistry
=
({
commit
},
image
)
=>
Vue
.
http
.
delete
(
image
.
destroyPath
);
export
const
deleteRegistry
=
({
commit
},
image
)
=>
Vue
.
http
.
delete
(
image
.
destroyPath
);
// eslint-disable-line no-unused-vars
export
const
setMainEndpoint
=
({
commit
},
data
)
=>
commit
(
types
.
SET_MAIN_ENDPOINT
,
data
);
export
const
toggleLoading
=
({
commit
})
=>
commit
(
types
.
TOGGLE_MAIN_LOADING
);
...
...
spec/javascripts/boards/board_blank_state_spec.js
View file @
99c4e46d
/* global BoardService */
import
Vue
from
'
vue
'
;
import
'
~/boards/stores/boards_store
'
;
import
BoardBlankState
from
'
~/boards/components/board_blank_state.vue
'
;
...
...
spec/javascripts/boards/board_card_spec.js
View file @
99c4e46d
/* global List */
/* global ListAssignee */
/* global ListLabel */
/* global BoardService */
import
Vue
from
'
vue
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
...
...
spec/javascripts/boards/board_list_spec.js
View file @
99c4e46d
/* global BoardService */
/* global List */
/* global ListIssue */
import
Vue
from
'
vue
'
;
...
...
spec/javascripts/boards/board_new_issue_spec.js
View file @
99c4e46d
/* global BoardService */
/* global List */
import
Vue
from
'
vue
'
;
...
...
spec/javascripts/boards/boards_store_spec.js
View file @
99c4e46d
/* eslint-disable comma-dangle, one-var, no-unused-vars */
/* global BoardService */
/* global ListIssue */
import
Vue
from
'
vue
'
;
...
...
spec/javascripts/boards/issue_spec.js
View file @
99c4e46d
/* eslint-disable comma-dangle */
/* global BoardService */
/* global ListIssue */
import
Vue
from
'
vue
'
;
...
...
spec/javascripts/boards/list_spec.js
View file @
99c4e46d
/* eslint-disable comma-dangle */
/* global BoardService */
/* global List */
/* global ListIssue */
...
...
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