From 4cda11585c75ce923d357b0dbb91fb393ed8e303 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 5 Oct 2017 21:33:29 +0200 Subject: Fix almost all unresolved comments from Docs and UX review --- app/views/projects/clusters/_form.html.haml | 12 ++++++------ app/views/projects/clusters/_header.html.haml | 2 +- app/views/projects/clusters/_sidebar.html.haml | 2 +- app/views/projects/clusters/login.html.haml | 3 +++ app/views/projects/clusters/new.html.haml | 3 +++ app/views/projects/clusters/show.html.haml | 13 ++++++++----- 6 files changed, 22 insertions(+), 13 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/clusters/_form.html.haml b/app/views/projects/clusters/_form.html.haml index b5c4942f528..371cdb1e403 100644 --- a/app/views/projects/clusters/_form.html.haml +++ b/app/views/projects/clusters/_form.html.haml @@ -1,8 +1,8 @@ .row .col-sm-8.col-sm-offset-4 %p - -link_to_help_page = link_to(s_('ClusterIntegration|help page'), help_page_path('TODO'), target: '_blank', rel: 'noopener noreferrer') - = s_('ClusterIntegration|Use our %{link_to_help_page} on cluster integration.').html_safe % { link_to_help_page: link_to_help_page} + - link_to_help_page = link_to(s_('ClusterIntegration|help page'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') + = s_('ClusterIntegration|Read our %{link_to_help_page} on cluster integration.').html_safe % { link_to_help_page: link_to_help_page} = form_for [@project.namespace.becomes(Namespace), @project, @cluster] do |field| = form_errors(@cluster) @@ -18,16 +18,16 @@ .form-group = field.label :gcp_cluster_zone, s_('ClusterIntegration|Zone') = link_to(s_('ClusterIntegration|See zones'), 'https://cloud.google.com/compute/docs/regions-zones/regions-zones', target: '_blank', rel: 'noopener noreferrer') - = field.text_field :gcp_cluster_zone, class: 'form-control' + = field.text_field :gcp_cluster_zone, class: 'form-control', placeholder: 'us-central1-a' .form-group = field.label :gcp_cluster_size, s_('ClusterIntegration|Number of nodes') - = field.text_field :gcp_cluster_size, class: 'form-control' + = field.text_field :gcp_cluster_size, class: 'form-control', placeholder: '3' .form-group = field.label :gcp_machine_type, s_('ClusterIntegration|Machine type') - = link_to(s_('ClusterIntegration|Machine type'), 'https://cloud.google.com/compute/docs/machine-types', target: '_blank', rel: 'noopener noreferrer') - = field.text_field :gcp_machine_type, class: 'form-control' + = link_to(s_('ClusterIntegration|See machine types'), 'https://cloud.google.com/compute/docs/machine-types', target: '_blank', rel: 'noopener noreferrer') + = field.text_field :gcp_machine_type, class: 'form-control', placeholder: 'n1-standard-4' .form-group = field.label :project_namespace, s_('ClusterIntegration|Project namespace (optional, unique)') diff --git a/app/views/projects/clusters/_header.html.haml b/app/views/projects/clusters/_header.html.haml index b3b98ea04f6..0134d46491c 100644 --- a/app/views/projects/clusters/_header.html.haml +++ b/app/views/projects/clusters/_header.html.haml @@ -1,7 +1,7 @@ %h4.prepend-top-0 = s_('ClusterIntegration|Create new cluster on Google Container Engine') %p - = s_('ClusterIntegration|To create a new cluster on Google Container Engine, please sign in with your Google account:') + = s_('ClusterIntegration|Please make sure that your Google account meets the following requirements:') %ul %li - link_to_container_engine = link_to(s_('ClusterIntegration|access to Google Container Engine'), 'https://console.cloud.google.com', target: '_blank', rel: 'noopener noreferrer') diff --git a/app/views/projects/clusters/_sidebar.html.haml b/app/views/projects/clusters/_sidebar.html.haml index 0d744f1b028..761879db32b 100644 --- a/app/views/projects/clusters/_sidebar.html.haml +++ b/app/views/projects/clusters/_sidebar.html.haml @@ -3,5 +3,5 @@ %p = s_('ClusterIntegration|With a cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.') %p - - link = link_to(s_('ClusterIntegration|cluster'), help_page_path('TODO'), target: '_blank', rel: 'noopener noreferrer') + - link = link_to(s_('ClusterIntegration|cluster'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') = s_('ClusterIntegration|Learn more about %{link_to_documentation}').html_safe % { link_to_documentation: link } diff --git a/app/views/projects/clusters/login.html.haml b/app/views/projects/clusters/login.html.haml index 5023abc5aa0..ae132672b7e 100644 --- a/app/views/projects/clusters/login.html.haml +++ b/app/views/projects/clusters/login.html.haml @@ -1,3 +1,6 @@ +- breadcrumb_title "Cluster" +- page_title _("Login") + .row.prepend-top-default .col-sm-4 = render 'sidebar' diff --git a/app/views/projects/clusters/new.html.haml b/app/views/projects/clusters/new.html.haml index 4b7214b3c62..c538d41ffad 100644 --- a/app/views/projects/clusters/new.html.haml +++ b/app/views/projects/clusters/new.html.haml @@ -1,3 +1,6 @@ +- breadcrumb_title "Cluster" +- page_title _("New Cluster") + .row.prepend-top-default .col-sm-4 = render 'sidebar' diff --git a/app/views/projects/clusters/show.html.haml b/app/views/projects/clusters/show.html.haml index b7b4c3c389c..651388ebde7 100644 --- a/app/views/projects/clusters/show.html.haml +++ b/app/views/projects/clusters/show.html.haml @@ -1,8 +1,11 @@ +- breadcrumb_title "Cluster" +- page_title _("Cluster") + - status_path = status_namespace_project_cluster_path(@cluster.project.namespace, @cluster.project, @cluster.id, format: :json) if can?(current_user, :admin_cluster, @cluster) && @cluster.on_creation? .row.prepend-top-default.edit-cluster-form.js-edit-cluster-form{ data: { status_path: status_path, toggle_status: @cluster.enabled? ? 'true': 'false', cluster_status: @cluster.status_name, - cluster_status_reason: @cluster.status_reason }} + cluster_status_reason: @cluster.status_reason } } .col-sm-4 = render 'sidebar' .col-sm-8 @@ -35,26 +38,26 @@ - if can?(current_user, :admin_cluster, @cluster) %label - = s_('ClusterIntegration|Google container engine') + = s_('ClusterIntegration|Google Container Engine') %p - link_gke = link_to(s_('ClusterIntegration|Google Container Engine'), @cluster.gke_cluster_url, target: '_blank', rel: 'noopener noreferrer') = s_('ClusterIntegration|Manage your cluster by visiting %{link_gke}').html_safe % { link_gke: link_gke } .hidden.js-cluster-error.alert.alert-danger{ role: 'alert' } - = s_('ClusterIntegration|Something went wrong while creating your cluster on Google Container Engine.') + = s_('ClusterIntegration|Something went wrong while creating your cluster on Google Container Engine') %p.js-error-reason .hidden.js-cluster-creating.alert.alert-info{ role: 'alert' } = s_('ClusterIntegration|Cluster is being created on Google Container Engine...') .hidden.js-cluster-success.alert.alert-info{ role: 'alert' } - = s_('ClusterIntegration|Cluster was successfully created on Google Container Engine.') + = s_('ClusterIntegration|Cluster was successfully created on Google Container Engine') .form_group %label{ for: 'cluter_name' } = s_('ClusterIntegration|Cluster name') .input-group - %input.form-control.cluster-name{ value: @cluster.gcp_cluster_name, disabled: true} + %input.form-control.cluster-name{ value: @cluster.gcp_cluster_name, disabled: true } %span.input-group-addon.clipboard-addon = clipboard_button(text: @cluster.gcp_cluster_name, title: s_('ClusterIntegration|Copy cluster name')) -- cgit v1.2.3