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
12be1559
Commit
12be1559
authored
Aug 09, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creates a Vue component for shared runner limit block
parent
4f8db02f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
0 deletions
+89
-0
ee/app/assets/javascripts/jobs/components/shared_runner_limit_block.vue
...javascripts/jobs/components/shared_runner_limit_block.vue
+34
-0
ee/changelogs/unreleased/50101-shared-runners-limit-vue.yml
ee/changelogs/unreleased/50101-shared-runners-limit-vue.yml
+5
-0
spec/javascripts/jobs/shared_runner_limit_block_spec.js
spec/javascripts/jobs/shared_runner_limit_block_spec.js
+50
-0
No files found.
ee/app/assets/javascripts/jobs/components/shared_runner_limit_block.vue
0 → 100644
View file @
12be1559
<
script
>
export
default
{
props
:
{
quotaUsed
:
{
type
:
Number
,
required
:
true
,
},
quotaLimit
:
{
type
:
Number
,
required
:
true
,
},
runnersPath
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
};
</
script
>
<
template
>
<div
class=
"bs-callout bs-callout-warning"
>
<p>
{{
s__
(
"
Runners|You have used all your shared Runners pipeline minutes.
"
)
}}
{{
quotaUsed
}}
of
{{
quotaLimit
}}
<template
v-if=
"runnersPath"
>
{{
__
(
"
For more information, go to the
"
)
}}
<a
:href=
"runnersPath"
>
{{
__
(
"
Runners page.
"
)
}}
</a>
</
template
>
</p>
</div>
</template>
ee/changelogs/unreleased/50101-shared-runners-limit-vue.yml
0 → 100644
View file @
12be1559
---
title
:
Creates vue component for shared runner limit
merge_request
:
author
:
type
:
other
spec/javascripts/jobs/shared_runner_limit_block_spec.js
0 → 100644
View file @
12be1559
import
Vue
from
'
vue
'
;
import
component
from
'
ee/jobs/components/shared_runner_limit_block.vue
'
;
import
mountComponent
from
'
../helpers/vue_mount_component_helper
'
;
import
{
trimText
}
from
'
../helpers/vue_component_helper
'
;
describe
(
'
Shared Runner Limit Block
'
,
()
=>
{
const
Component
=
Vue
.
extend
(
component
);
let
vm
;
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'
quota information
'
,
()
=>
{
it
(
'
renders provided quota limit and used quota
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
{
quotaUsed
:
1000
,
quotaLimit
:
4000
,
runnersPath
:
'
root/project/runners
'
,
});
expect
(
vm
.
$el
.
textContent
).
toContain
(
'
You have used all your shared Runners pipeline minutes.
'
);
expect
(
vm
.
$el
.
textContent
).
toContain
(
'
1000 of 4000
'
);
});
});
describe
(
'
with runnersPath
'
,
()
=>
{
it
(
'
renders runner link
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
{
quotaUsed
:
1000
,
quotaLimit
:
4000
,
runnersPath
:
'
root/project/runners
'
,
});
expect
(
trimText
(
vm
.
$el
.
textContent
)).
toContain
(
'
For more information, go to the Runners page.
'
);
});
});
describe
(
'
without runnersPath
'
,
()
=>
{
it
(
'
does not renbder runner link
'
,
()
=>
{
vm
=
mountComponent
(
Component
,
{
quotaUsed
:
1000
,
quotaLimit
:
4000
,
});
expect
(
trimText
(
vm
.
$el
.
textContent
)).
not
.
toContain
(
'
For more information, go to the Runners page.
'
);
});
});
});
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