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
236a0cb4
Commit
236a0cb4
authored
Nov 05, 2018
by
Mike Greiling
Committed by
Thong Kuah
Nov 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove integration toggle from cluster index page
parent
c72cf879
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
40 deletions
+8
-40
app/assets/javascripts/clusters/clusters_index.js
app/assets/javascripts/clusters/clusters_index.js
+0
-24
app/assets/javascripts/pages/groups/clusters/index/index.js
app/assets/javascripts/pages/groups/clusters/index/index.js
+2
-2
app/assets/javascripts/pages/projects/clusters/index/index.js
...assets/javascripts/pages/projects/clusters/index/index.js
+2
-2
app/views/clusters/clusters/_cluster.html.haml
app/views/clusters/clusters/_cluster.html.haml
+4
-12
No files found.
app/assets/javascripts/clusters/clusters_index.js
deleted
100644 → 0
View file @
c72cf879
import
createFlash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
setupToggleButtons
from
'
~/toggle_buttons
'
;
import
initDismissableCallout
from
'
~/dismissable_callout
'
;
import
ClustersService
from
'
./services/clusters_service
'
;
export
default
()
=>
{
const
clusterList
=
document
.
querySelector
(
'
.js-clusters-list
'
);
initDismissableCallout
(
'
.gcp-signup-offer
'
);
// The empty state won't have a clusterList
if
(
clusterList
)
{
setupToggleButtons
(
document
.
querySelector
(
'
.js-clusters-list
'
),
(
value
,
toggle
)
=>
ClustersService
.
updateCluster
(
toggle
.
dataset
.
endpoint
,
{
cluster
:
{
enabled
:
value
}
}).
catch
(
err
=>
{
createFlash
(
__
(
'
Something went wrong on our end.
'
));
throw
err
;
},
),
);
}
};
app/assets/javascripts/pages/groups/clusters/index/index.js
View file @
236a0cb4
import
ClustersIndex
from
'
~/clusters/clusters_index
'
;
import
initDismissableCallout
from
'
~/dismissable_callout
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ClustersIndex
();
// eslint-disable-line no-new
initDismissableCallout
(
'
.gcp-signup-offer
'
);
});
app/assets/javascripts/pages/projects/clusters/index/index.js
View file @
236a0cb4
import
ClustersIndex
from
'
~/clusters/clusters_index
'
;
import
initDismissableCallout
from
'
~/dismissable_callout
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ClustersIndex
();
// eslint-disable-line no-new
initDismissableCallout
(
'
.gcp-signup-offer
'
);
});
app/views/clusters/clusters/_cluster.html.haml
View file @
236a0cb4
...
...
@@ -3,19 +3,11 @@
.table-mobile-header
{
role:
"rowheader"
}=
s_
(
"ClusterIntegration|Kubernetes cluster"
)
.table-mobile-content
=
link_to
cluster
.
name
,
cluster
.
show_path
.table-section.section-
30
.table-section.section-
25
.table-mobile-header
{
role:
"rowheader"
}=
s_
(
"ClusterIntegration|Environment scope"
)
.table-mobile-content
=
cluster
.
environment_scope
.table-section.section-1
0
.table-section.section-1
5.text-right
.table-mobile-header
{
role:
"rowheader"
}
.table-mobile-content
%button
.js-project-feature-toggle.project-feature-toggle
{
type:
"button"
,
class:
"#{'is-checked' if cluster.enabled?} #{'is-disabled' if !cluster.can_toggle_cluster?}"
,
"aria-label"
:
s_
(
"ClusterIntegration|Toggle Kubernetes Cluster"
),
disabled:
!
cluster
.
can_toggle_cluster?
,
data:
{
endpoint:
clusterable
.
cluster_path
(
cluster
,
format: :json
)
}
}
%input
.js-project-feature-toggle-input
{
type:
"hidden"
,
value:
cluster
.
enabled?
}
=
icon
(
"spinner spin"
,
class:
"loading-icon"
)
%span
.toggle-icon
=
sprite_icon
(
'status_success_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-checked'
)
=
sprite_icon
(
'status_failed_borderless'
,
size:
16
,
css_class:
'toggle-icon-svg toggle-status-unchecked'
)
%span
.badge.badge-light
=
cluster
.
project_type?
?
s_
(
"ClusterIntegration|Project cluster"
)
:
s_
(
"ClusterIntegration|Group cluster"
)
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