Skip to content

Update cluster environment badge to pajamas

Alexander Turinske requested to merge 344300-environments-tab-badge-pajamas into master

What does this MR do and why?

Update cluster environment badge to pajamas

  • update badge to pajamas

Changelog: changed

EE: true

Screenshots or screen recordings

Before After
Screen_Shot_2022-01-27_at_17.27.15 Screen_Shot_2022-01-27_at_17.31.03

How to set up and validate locally

  1. Navigate to a project => Infrastructure => Kubernetes
  2. Connect a cluster via a certificate
  3. Apply the following patch
  4. Navigate to the cluster
  5. Verify the tabs
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js
index 8dcab55ac61..6fe4c3bce54 100644
--- a/app/assets/javascripts/clusters/clusters_bundle.js
+++ b/app/assets/javascripts/clusters/clusters_bundle.js
@@ -110,8 +110,15 @@ export default class Clusters {
       render(createElement) {
         return createElement(Environments, {
           props: {
-            isFetching: this.state.fetchingEnvironments,
-            environments: this.state.environments,
+            isFetching: false,
+            environments: [
+              {
+                project: 'this',
+                name: 'test env',
+                lastDeployment: 'Today',
+                rolloutStatus: 'complete',
+              },
+            ],
             environmentsHelpPath: this.state.environmentsHelpPath,
             clustersHelpPath: this.state.clustersHelpPath,
             deployBoardsHelpPath: this.state.deployBoardsHelpPath,
diff --git a/ee/app/views/clusters/clusters/_environments_tab.html.haml b/ee/app/views/clusters/clusters/_environments_tab.html.haml
index e48e5332a6b..85888be2277 100644
--- a/ee/app/views/clusters/clusters/_environments_tab.html.haml
+++ b/ee/app/views/clusters/clusters/_environments_tab.html.haml
@@ -1,6 +1,6 @@
 - cluster_environments_path = clusterable.environments_cluster_path(@cluster)
 - active = params[:tab] == 'environments'
 
-- if !project_cluster?(@cluster) && cluster_environments_path.present?
+- if true
   = gl_tab_link_to clusterable.cluster_path(@cluster.id, params: {tab: 'environments'}), { item_active: active, data: { testid: 'cluster-environments-tab' } } do
     = _('Environments')

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344300 (closed)

Edited by Alexander Turinske

Merge request reports

Loading