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
8103c99f
Commit
8103c99f
authored
Apr 18, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove UJS action from graph dropdown
parent
9c2f6e04
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
95 deletions
+1
-95
app/assets/javascripts/pipelines/components/graph/dropdown_action_component.vue
.../pipelines/components/graph/dropdown_action_component.vue
+0
-53
app/assets/javascripts/pipelines/components/graph/job_component.vue
.../javascripts/pipelines/components/graph/job_component.vue
+1
-10
spec/javascripts/pipelines/graph/dropdown_action_component_spec.js
...scripts/pipelines/graph/dropdown_action_component_spec.js
+0
-32
No files found.
app/assets/javascripts/pipelines/components/graph/dropdown_action_component.vue
deleted
100644 → 0
View file @
9c2f6e04
<
script
>
import
icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
/**
* Renders either a cancel, retry or play icon pointing to the given path.
* TODO: Remove UJS from here and use an async request instead.
*/
export
default
{
components
:
{
icon
,
},
directives
:
{
tooltip
,
},
props
:
{
tooltipText
:
{
type
:
String
,
required
:
true
,
},
link
:
{
type
:
String
,
required
:
true
,
},
actionMethod
:
{
type
:
String
,
required
:
true
,
},
actionIcon
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
<
template
>
<a
v-tooltip
:data-method=
"actionMethod"
:title=
"tooltipText"
:href=
"link"
rel=
"nofollow"
class=
"ci-action-icon-wrapper js-ci-status-icon"
data-container=
"body"
aria-label=
"Job's action"
>
<icon
:name=
"actionIcon"
/>
</a>
</
template
>
app/assets/javascripts/pipelines/components/graph/job_component.vue
View file @
8103c99f
<
script
>
<
script
>
import
ActionComponent
from
'
./action_component.vue
'
;
import
ActionComponent
from
'
./action_component.vue
'
;
import
DropdownActionComponent
from
'
./dropdown_action_component.vue
'
;
import
JobNameComponent
from
'
./job_name_component.vue
'
;
import
JobNameComponent
from
'
./job_name_component.vue
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
import
tooltip
from
'
../../../vue_shared/directives/tooltip
'
;
...
@@ -32,7 +31,6 @@ import tooltip from '../../../vue_shared/directives/tooltip';
...
@@ -32,7 +31,6 @@ import tooltip from '../../../vue_shared/directives/tooltip';
export
default
{
export
default
{
components
:
{
components
:
{
ActionComponent
,
ActionComponent
,
DropdownActionComponent
,
JobNameComponent
,
JobNameComponent
,
},
},
...
@@ -134,19 +132,12 @@ export default {
...
@@ -134,19 +132,12 @@ export default {
</div>
</div>
<action-component
<action-component
v-if=
"hasAction
&& !isDropdown
"
v-if=
"hasAction"
:tooltip-text=
"status.action.title"
:tooltip-text=
"status.action.title"
:link=
"status.action.path"
:link=
"status.action.path"
:action-icon=
"status.action.icon"
:action-icon=
"status.action.icon"
:button-disabled=
"actionDisabled"
:button-disabled=
"actionDisabled"
/>
/>
<dropdown-action-component
v-if=
"hasAction && isDropdown"
:tooltip-text=
"status.action.title"
:link=
"status.action.path"
:action-icon=
"status.action.icon"
:action-method=
"status.action.method"
/>
</div>
</div>
</
template
>
</
template
>
spec/javascripts/pipelines/graph/dropdown_action_component_spec.js
deleted
100644 → 0
View file @
9c2f6e04
import
Vue
from
'
vue
'
;
import
dropdownActionComponent
from
'
~/pipelines/components/graph/dropdown_action_component.vue
'
;
describe
(
'
action component
'
,
()
=>
{
let
component
;
beforeEach
((
done
)
=>
{
const
DropdownActionComponent
=
Vue
.
extend
(
dropdownActionComponent
);
component
=
new
DropdownActionComponent
({
propsData
:
{
tooltipText
:
'
bar
'
,
link
:
'
foo
'
,
actionMethod
:
'
post
'
,
actionIcon
:
'
cancel
'
,
},
}).
$mount
();
Vue
.
nextTick
(
done
);
});
it
(
'
should render a link
'
,
()
=>
{
expect
(
component
.
$el
.
getAttribute
(
'
href
'
)).
toEqual
(
'
foo
'
);
});
it
(
'
should render the provided title as a bootstrap tooltip
'
,
()
=>
{
expect
(
component
.
$el
.
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
bar
'
);
});
it
(
'
should render an svg
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
svg
'
)).
toBeDefined
();
});
});
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