Skip to content
Snippets Groups Projects

DevOps Adoption - Add an adoption table in the Overview tab

4 files
+ 40
7
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -12,6 +12,8 @@ import {
I18N_GROUP_COL_LABEL,
I18N_TABLE_REMOVE_BUTTON_DISABLED,
I18N_TABLE_REMOVE_BUTTON,
I18N_OVERVIEW_TABLE_HEADER_GROUP,
I18N_OVERVIEW_TABLE_HEADER_SUBGROUP,
TABLE_TEST_IDS_ACTIONS,
DEVOPS_ADOPTION_TABLE_CONFIGURATION,
DELETE_MODAL_ID,
@@ -38,6 +40,11 @@ export default {
GlTooltip: GlTooltipDirective,
GlModal: GlModalDirective,
},
inject: {
groupGid: {
default: null,
},
},
i18n: {
removeButtonDisabled: I18N_TABLE_REMOVE_BUTTON_DISABLED,
removeButton: I18N_TABLE_REMOVE_BUTTON,
@@ -65,17 +72,23 @@ export default {
};
},
computed: {
tableHeader() {
return this.groupGid ? I18N_OVERVIEW_TABLE_HEADER_SUBGROUP : I18N_OVERVIEW_TABLE_HEADER_GROUP;
},
tableHeaderFields() {
return [
{
key: 'name',
title: I18N_GROUP_COL_LABEL,
label: I18N_GROUP_COL_LABEL,
...fieldOptions,
thClass: ['gl-w-grid-size-30', ...thClass],
tdClass: 'header-cell da-table-mobile-header',
},
...DEVOPS_ADOPTION_TABLE_CONFIGURATION.map((item) => ({
...item,
...fieldOptions,
label: item.title,
tdClass: 'da-table-mobile-header',
})),
{
key: 'actions',
@@ -122,6 +135,7 @@ export default {
</script>
<template>
<div>
<h4>{{ tableHeader }}</h4>
<gl-table
:fields="tableHeaderFields"
:items="formattedData"
@@ -129,9 +143,7 @@ export default {
stacked="md"
>
<template v-for="header in tableHeaderFields" #[headerSlotName(header.key)]>
<div :key="header.key" class="gl-display-flex gl-align-items-center">
<span>{{ header.title }}</span>
</div>
{{ header.label }}
</template>
<template #cell(name)="{ item }">
Loading