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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
2b1dcc81
Commit
2b1dcc81
authored
Jul 02, 2019
by
Tiger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable terminals button for group clusters
parent
29b8830b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
37 deletions
+19
-37
app/assets/javascripts/environments/components/environment_item.vue
.../javascripts/environments/components/environment_item.vue
+0
-11
changelogs/unreleased/55487-enable-group-terminals-button.yml
...gelogs/unreleased/55487-enable-group-terminals-button.yml
+5
-0
spec/javascripts/environments/environment_terminal_button_spec.js
...ascripts/environments/environment_terminal_button_spec.js
+14
-26
No files found.
app/assets/javascripts/environments/components/environment_item.vue
View file @
2b1dcc81
...
...
@@ -15,7 +15,6 @@ import MonitoringButtonComponent from './environment_monitoring.vue';
import
CommitComponent
from
'
../../vue_shared/components/commit.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
CLUSTER_TYPE
}
from
'
~/clusters/constants
'
;
/**
* Environment Item Component
...
...
@@ -80,15 +79,6 @@ export default {
return
this
.
model
&&
this
.
model
.
is_protected
;
},
/**
* Hide group cluster features which are not currently implemented.
*
* @returns {Boolean}
*/
disableGroupClusterFeatures
()
{
return
this
.
model
&&
this
.
model
.
cluster_type
===
CLUSTER_TYPE
.
GROUP
;
},
/**
* Returns whether the environment can be stopped.
*
...
...
@@ -581,7 +571,6 @@ export default {
<terminal-button-component
v-if=
"model && model.terminal_path"
:terminal-path=
"model.terminal_path"
:disabled=
"disableGroupClusterFeatures"
/>
<rollback-component
...
...
changelogs/unreleased/55487-enable-group-terminals-button.yml
0 → 100644
View file @
2b1dcc81
---
title
:
Enable terminals button for group clusters
merge_request
:
30255
author
:
type
:
added
spec/javascripts/environments/environment_terminal_button_spec.js
View file @
2b1dcc81
...
...
@@ -12,36 +12,24 @@ describe('Stop Component', () => {
}).
$mount
();
};
describe
(
'
enabled
'
,
()
=>
{
beforeEach
(()
=>
{
mountWithProps
({
terminalPath
});
});
describe
(
'
computed
'
,
()
=>
{
it
(
'
title
'
,
()
=>
{
expect
(
component
.
title
).
toEqual
(
'
Terminal
'
);
});
});
it
(
'
should render a link to open a web terminal with the provided path
'
,
()
=>
{
expect
(
component
.
$el
.
tagName
).
toEqual
(
'
A
'
);
expect
(
component
.
$el
.
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
Terminal
'
);
expect
(
component
.
$el
.
getAttribute
(
'
aria-label
'
)).
toEqual
(
'
Terminal
'
);
expect
(
component
.
$el
.
getAttribute
(
'
href
'
)).
toEqual
(
terminalPath
);
});
beforeEach
(()
=>
{
mountWithProps
({
terminalPath
});
});
it
(
'
should render a non-disabled button
'
,
()
=>
{
expect
(
component
.
$el
.
classList
).
not
.
toContain
(
'
disabled
'
);
describe
(
'
computed
'
,
()
=>
{
it
(
'
title
'
,
()
=>
{
expect
(
component
.
title
).
toEqual
(
'
Terminal
'
);
});
});
describe
(
'
disabled
'
,
()
=>
{
beforeEach
(()
=>
{
mountWithProps
({
terminalPath
,
disabled
:
true
});
});
it
(
'
should render a link to open a web terminal with the provided path
'
,
()
=>
{
expect
(
component
.
$el
.
tagName
).
toEqual
(
'
A
'
);
expect
(
component
.
$el
.
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
Terminal
'
);
expect
(
component
.
$el
.
getAttribute
(
'
aria-label
'
)).
toEqual
(
'
Terminal
'
);
expect
(
component
.
$el
.
getAttribute
(
'
href
'
)).
toEqual
(
terminalPath
);
});
it
(
'
should render a disabled button
'
,
()
=>
{
expect
(
component
.
$el
.
classList
).
toContain
(
'
disabled
'
);
});
it
(
'
should render a non-disabled button
'
,
()
=>
{
expect
(
component
.
$el
.
classList
).
not
.
toContain
(
'
disabled
'
);
});
});
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