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
64af5c37
Commit
64af5c37
authored
Oct 24, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves available runners check into a computed prop
Adds a changelog entry
parent
fed49e7b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
2 deletions
+45
-2
app/assets/javascripts/jobs/components/job_app.vue
app/assets/javascripts/jobs/components/job_app.vue
+2
-1
app/assets/javascripts/jobs/store/getters.js
app/assets/javascripts/jobs/store/getters.js
+2
-0
changelogs/unreleased/52202-consider-moving-isjobstuck-verification-to-backend.yml
...02-consider-moving-isjobstuck-verification-to-backend.yml
+5
-0
spec/features/projects/jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
spec/javascripts/jobs/store/getters_spec.js
spec/javascripts/jobs/store/getters_spec.js
+35
-0
No files found.
app/assets/javascripts/jobs/components/job_app.vue
View file @
64af5c37
...
...
@@ -86,6 +86,7 @@
'
emptyStateIllustration
'
,
'
isScrollingDown
'
,
'
emptyStateAction
'
,
'
hasRunnersForProject
'
,
]),
shouldRenderContent
()
{
...
...
@@ -201,7 +202,7 @@
<stuck-block
v-if=
"job.stuck"
class=
"js-job-stuck"
:has-no-runners-for-project=
"
job.runners.available && !job.runners.online
"
:has-no-runners-for-project=
"
hasRunnersForProject
"
:tags=
"job.tags"
:runners-path=
"runnerSettingsUrl"
/>
...
...
app/assets/javascripts/jobs/store/getters.js
View file @
64af5c37
...
...
@@ -57,5 +57,7 @@ export const shouldRenderSharedRunnerLimitWarning = state =>
export
const
isScrollingDown
=
state
=>
isScrolledToBottom
()
&&
!
state
.
isTraceComplete
;
export
const
hasRunnersForProject
=
state
=>
state
.
job
.
runners
.
available
&&
!
state
.
job
.
runners
.
online
;
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export
default
()
=>
{};
changelogs/unreleased/52202-consider-moving-isjobstuck-verification-to-backend.yml
0 → 100644
View file @
64af5c37
---
title
:
Renders stuck block when runners are stuck
merge_request
:
author
:
type
:
fixed
spec/features/projects/jobs_spec.rb
View file @
64af5c37
...
...
@@ -753,7 +753,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do
it
'renders message about job being stuck because no runners are active'
do
expect
(
page
).
to
have_css
(
'.js-stuck-no-active-runner'
)
expect
(
page
).
to
have_content
(
"This job is stuck, because you don
\
'
t have any active runners that can run this job."
)
expect
(
page
).
to
have_content
(
"This job is stuck, because you don't have any active runners that can run this job."
)
end
end
...
...
spec/javascripts/jobs/store/getters_spec.js
View file @
64af5c37
...
...
@@ -229,4 +229,39 @@ describe('Job Store Getters', () => {
});
});
});
describe
(
'
hasRunnersForProject
'
,
()
=>
{
describe
(
'
with available and offline runners
'
,
()
=>
{
it
(
'
returns true
'
,
()
=>
{
localState
.
job
.
runners
=
{
available
:
true
,
online
:
false
};
expect
(
getters
.
hasRunnersForProject
(
localState
)).
toEqual
(
true
);
});
});
describe
(
'
with non available runners
'
,
()
=>
{
it
(
'
returns false
'
,
()
=>
{
localState
.
job
.
runners
=
{
available
:
false
,
online
:
false
};
expect
(
getters
.
hasRunnersForProject
(
localState
)).
toEqual
(
false
);
});
});
describe
(
'
with online runners
'
,
()
=>
{
it
(
'
returns false
'
,
()
=>
{
localState
.
job
.
runners
=
{
available
:
false
,
online
:
true
};
expect
(
getters
.
hasRunnersForProject
(
localState
)).
toEqual
(
false
);
});
});
});
});
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