Commit 9a6faca8 authored by Serena Fang's avatar Serena Fang Committed by Ezekiel Kigbo

Remove Kubernetes cluster icons and tooltips

Updated vue cluster list component to remove
cluster icon which was sending in incorrect info,
so removed due to bugs.
parent 547be8fe
......@@ -72,10 +72,7 @@ export default {
},
methods: {
...mapActions(['fetchClusters', 'setPage']),
statusClass(status) {
const iconClass = STATUSES[status] || STATUSES.default;
return iconClass.className;
},
statusTitle(status) {
const iconTitle = STATUSES[status] || STATUSES.default;
return sprintf(__('Status: %{title}'), { title: iconTitle.title }, false);
......@@ -96,19 +93,12 @@ export default {
</gl-link>
<gl-loading-icon
v-if="item.status === 'deleting'"
v-if="item.status === 'deleting' || item.status === 'creating'"
v-tooltip
:title="statusTitle(item.status)"
size="sm"
class="mr-2 ml-md-2"
/>
<div
v-else
v-tooltip
class="cluster-status-indicator rounded-circle align-self-center gl-w-4 gl-h-4 mr-2 ml-md-2"
:class="statusClass(item.status)"
:title="statusTitle(item.status)"
></div>
</div>
</template>
......
......@@ -15,4 +15,5 @@ export const STATUSES = {
unreachable: { className: 'bg-danger', title: __('Unreachable') },
authentication_failure: { className: 'bg-warning', title: __('Authentication Failure') },
deleting: { title: __('Deleting') },
creating: { title: __('Creating') },
};
---
title: Resolve Fix Incomplete Kubernetes Cluster Status List
merge_request: 33344
author:
type: fixed
......@@ -6618,6 +6618,9 @@ msgstr ""
msgid "Creates branch '%{branch_name}' and a merge request to resolve this issue."
msgstr ""
msgid "Creating"
msgstr ""
msgid "Creating epic"
msgstr ""
......
......@@ -83,24 +83,21 @@ describe('Clusters', () => {
describe('cluster status', () => {
it.each`
statusName | className | lineNumber
${'disabled'} | ${'disabled'} | ${0}
${'unreachable'} | ${'bg-danger'} | ${1}
${'authentication_failure'} | ${'bg-warning'} | ${2}
${'deleting'} | ${null} | ${3}
${'created'} | ${'bg-success'} | ${4}
${'default'} | ${'bg-white'} | ${5}
`('renders a status for each cluster', ({ statusName, className, lineNumber }) => {
const statuses = findStatuses();
const status = statuses.at(lineNumber);
if (statusName !== 'deleting') {
const statusIndicator = status.find('.cluster-status-indicator');
expect(statusIndicator.exists()).toBe(true);
expect(statusIndicator.classes()).toContain(className);
} else {
expect(status.find(GlLoadingIcon).exists()).toBe(true);
}
});
statusName | lineNumber | result
${'creating'} | ${0} | ${true}
${null} | ${1} | ${false}
${null} | ${2} | ${false}
${'deleting'} | ${3} | ${true}
${null} | ${4} | ${false}
${null} | ${5} | ${false}
`(
'renders $result when status=$statusName and lineNumber=$lineNumber',
({ lineNumber, result }) => {
const statuses = findStatuses();
const status = statuses.at(lineNumber);
expect(status.find(GlLoadingIcon).exists()).toBe(result);
},
);
});
describe('nodes present', () => {
......
......@@ -3,7 +3,7 @@ export const clusterList = [
name: 'My Cluster 1',
environment_scope: '*',
cluster_type: 'group_type',
status: 'disabled',
status: 'creating',
nodes: null,
},
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment