summaryrefslogtreecommitdiff
path: root/app/views/clusters/clusters/show.html.haml
blob: 4dfbb310142bdcc108a297886caff90fa3776b41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
- @content_class = "limit-container-width" unless fluid_layout
- add_to_breadcrumbs _('Kubernetes Clusters'), clusterable.index_path
- breadcrumb_title @cluster.name
- page_title _('Kubernetes Cluster')
- manage_prometheus_path = edit_project_service_path(@cluster.project, 'prometheus') if @project

- expanded = expanded_by_default?

- status_path = clusterable.cluster_status_cluster_path(@cluster.id, format: :json) if can?(current_user, :admin_cluster, @cluster)
.edit-cluster-form.js-edit-cluster-form{ data: { status_path: status_path,
  install_helm_path: clusterable.install_applications_cluster_path(@cluster, :helm),
  install_ingress_path: clusterable.install_applications_cluster_path(@cluster, :ingress),
  install_cert_manager_path: clusterable.install_applications_cluster_path(@cluster, :cert_manager),
  install_prometheus_path: clusterable.install_applications_cluster_path(@cluster, :prometheus),
  install_runner_path: clusterable.install_applications_cluster_path(@cluster, :runner),
  install_jupyter_path: clusterable.install_applications_cluster_path(@cluster, :jupyter),
  install_knative_path: clusterable.install_applications_cluster_path(@cluster, :knative),
  update_knative_path: clusterable.update_applications_cluster_path(@cluster, :knative),
  toggle_status: @cluster.enabled? ? 'true': 'false',
  has_rbac: has_rbac_enabled?(@cluster) ? 'true': 'false',
  cluster_type: @cluster.cluster_type,
  cluster_status: @cluster.status_name,
  cluster_status_reason: @cluster.status_reason,
  help_path: help_page_path('user/project/clusters/index.md', anchor: 'installing-applications'),
  ingress_help_path: help_page_path('user/project/clusters/index.md', anchor: 'getting-the-external-endpoint'),
  ingress_dns_help_path: help_page_path('user/project/clusters/index.md', anchor: 'manually-determining-the-external-endpoint'),
  manage_prometheus_path: manage_prometheus_path,
  cluster_id: @cluster.id } }

  .js-cluster-application-notice
    .flash-container

  %section#cluster-integration
    %h4= @cluster.name
    = render 'banner'
    = render 'form'

  = render_if_exists 'projects/clusters/prometheus_graphs'

  .cluster-applications-table#js-cluster-applications

  %section.settings#js-cluster-details{ class: ('expanded' if expanded) }
    .settings-header
      %h4= s_('ClusterIntegration|Kubernetes cluster details')
      %button.btn.js-settings-toggle{ type: 'button' }
        = expanded ? _('Collapse') : _('Expand')
      %p= s_('ClusterIntegration|See and edit the details for your Kubernetes cluster')
    .settings-content
      = render 'clusters/platforms/kubernetes/form', cluster: @cluster, platform: @cluster.platform_kubernetes, update_cluster_url_path: clusterable.cluster_path(@cluster)

  %section.settings.no-animate#js-cluster-advanced-settings{ class: ('expanded' if expanded) }
    .settings-header
      %h4= _('Advanced settings')
      %button.btn.js-settings-toggle{ type: 'button' }
        = expanded ? _('Collapse') : _('Expand')
      %p= s_("ClusterIntegration|Advanced options on this Kubernetes cluster's integration")
    .settings-content#advanced-settings-section
      = render 'advanced_settings'