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
Léo-Paul Géneau
gitlab-ce
Commits
1d6adc27
Commit
1d6adc27
authored
May 25, 2018
by
Filipa Lacerda
Committed by
Dmitriy Zaporozhets
May 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle disabled button state in backend
parent
2ca00a36
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
21 deletions
+6
-21
app/assets/javascripts/clusters/components/application_row.vue
...ssets/javascripts/clusters/components/application_row.vue
+1
-6
app/assets/javascripts/clusters/components/applications.vue
app/assets/javascripts/clusters/components/applications.vue
+1
-2
spec/javascripts/clusters/components/application_row_spec.js
spec/javascripts/clusters/components/application_row_spec.js
+0
-10
spec/javascripts/clusters/components/applications_spec.js
spec/javascripts/clusters/components/applications_spec.js
+4
-3
No files found.
app/assets/javascripts/clusters/components/application_row.vue
View file @
1d6adc27
...
...
@@ -52,11 +52,6 @@
type
:
String
,
required
:
false
,
},
disableInstallButton
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
installApplicationRequestParams
:
{
type
:
Object
,
required
:
false
,
...
...
@@ -77,7 +72,7 @@
// Avoid the potential for the real-time data to say APPLICATION_INSTALLABLE but
// we already made a request to install and are just waiting for the real-time
// to sync up.
return
this
.
disableInstallButton
||
(
this
.
status
!==
APPLICATION_INSTALLABLE
return
(
this
.
status
!==
APPLICATION_INSTALLABLE
&&
this
.
status
!==
APPLICATION_ERROR
)
||
this
.
requestStatus
===
REQUEST_LOADING
||
this
.
requestStatus
===
REQUEST_SUCCESS
;
...
...
app/assets/javascripts/clusters/components/applications.vue
View file @
1d6adc27
...
...
@@ -292,7 +292,6 @@ export default {
:status-reason=
"applications.jupyter.statusReason"
:request-status=
"applications.jupyter.requestStatus"
:request-reason=
"applications.jupyter.requestReason"
:disable-install-button=
"!ingressInstalled"
:install-application-request-params=
"{ hostname: applications.jupyter.hostname }"
>
<div
slot=
"description"
>
...
...
@@ -304,7 +303,7 @@ export default {
or a scientific research group.`) }}
</p>
<
template
v-if=
"ingress
Installed
"
>
<
template
v-if=
"ingress
ExternalIp
"
>
<div
class=
"form-group"
>
<label
for=
"jupyter-hostname"
>
{{
s__
(
'
ClusterIntegration|Jupyter Hostname
'
)
}}
...
...
spec/javascripts/clusters/components/application_row_spec.js
View file @
1d6adc27
...
...
@@ -211,16 +211,6 @@ describe('Application Row', () => {
expect
(
eventHub
.
$emit
).
not
.
toHaveBeenCalled
();
});
it
(
'
is disabled when disableInstallButton prop is provided
'
,
()
=>
{
vm
=
mountComponent
(
ApplicationRow
,
{
...
DEFAULT_APPLICATION_STATE
,
status
:
APPLICATION_INSTALLING
,
disableInstallButton
:
true
,
});
expect
(
vm
.
installButtonDisabled
).
toEqual
(
true
);
});
});
describe
(
'
Error block
'
,
()
=>
{
...
...
spec/javascripts/clusters/components/applications_spec.js
View file @
1d6adc27
...
...
@@ -114,7 +114,7 @@ describe('Applications', () => {
});
describe
(
'
Jupyter application
'
,
()
=>
{
describe
(
'
with ingress installed
& jupyter not installed
'
,
()
=>
{
describe
(
'
with ingress installed
with ip & jupyter installable
'
,
()
=>
{
it
(
'
renders hostname active input
'
,
()
=>
{
vm
=
mountComponent
(
Applications
,
{
applications
:
{
...
...
@@ -122,12 +122,13 @@ describe('Applications', () => {
ingress
:
{
title
:
'
Ingress
'
,
status
:
'
installed
'
,
externalIp
:
'
1.1.1.1
'
},
runner
:
{
title
:
'
GitLab Runner
'
},
prometheus
:
{
title
:
'
Prometheus
'
},
jupyter
:
{
title
:
'
JupyterHub
'
,
hostname
:
''
},
jupyter
:
{
title
:
'
JupyterHub
'
,
hostname
:
''
,
status
:
'
installable
'
},
},
});
expect
(
vm
.
$el
.
querySelector
(
'
.js-hostname
'
).
getAttribute
(
'
readonly
'
)).
toEqual
(
null
);
});
describe
(
'
with ingress & jupyter installed
'
,
()
=>
{
it
(
'
renders readonly input
'
,
()
=>
{
vm
=
mountComponent
(
Applications
,
{
...
...
@@ -153,7 +154,7 @@ describe('Applications', () => {
ingress
:
{
title
:
'
Ingress
'
},
runner
:
{
title
:
'
GitLab Runner
'
},
prometheus
:
{
title
:
'
Prometheus
'
},
jupyter
:
{
title
:
'
JupyterHub
'
},
jupyter
:
{
title
:
'
JupyterHub
'
,
status
:
'
not_installable
'
},
},
});
});
...
...
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