Commit c8814c35 authored by jerasmus's avatar jerasmus

Add responsivity to environments table

Added responsivity to the cluster environments table
parent e8ac9eef
---
title: Add responsivity to cluster environments table
merge_request: 25501
author:
type: fixed
...@@ -71,14 +71,14 @@ export default { ...@@ -71,14 +71,14 @@ export default {
}, },
created() { created() {
this.$options.fields = [ this.$options.fields = [
{ key: 'project', label: __('Project'), class: 'pl-0 pr-5 text-nowrap' }, { key: 'project', label: __('Project'), class: 'pl-md-0 pr-md-5 text-nowrap' },
{ key: 'name', label: __('Environment'), class: 'pl-0 pr-5' }, { key: 'name', label: __('Environment'), class: 'pl-md-0 pr-md-5' },
{ key: 'lastDeployment', label: __('Job'), class: 'pl-0 pr-5 text-nowrap' }, { key: 'lastDeployment', label: __('Job'), class: 'pl-md-0 pr-md-5 text-nowrap' },
{ key: 'rolloutStatus', label: __('Pods in use'), class: 'pl-0 pr-5' }, { key: 'rolloutStatus', label: __('Pods in use'), class: 'pl-md-0 pr-md-5' },
{ {
key: 'updatedAt', key: 'updatedAt',
label: __('Last updated'), label: __('Last updated'),
class: 'pl-0 pr-0 text-md-right text-nowrap', class: 'pl-md-0 pr-md-0 text-md-right text-nowrap',
}, },
]; ];
}, },
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ export default {
:fields="$options.fields" :fields="$options.fields"
:items="environments" :items="environments"
head-variant="white" head-variant="white"
stacked="md"
> >
<!-- column: Project --> <!-- column: Project -->
<template #cell(project)="data"> <template #cell(project)="data">
...@@ -134,7 +135,10 @@ export default { ...@@ -134,7 +135,10 @@ export default {
/> />
<!-- Rollout Instances --> <!-- Rollout Instances -->
<div v-else-if="hasInstances(row.item.rolloutStatus)" class="d-flex flex-wrap flex-row"> <div
v-else-if="hasInstances(row.item.rolloutStatus)"
class="d-flex flex-wrap flex-row justify-content-end justify-content-md-start"
>
<template v-for="(instance, i) in row.item.rolloutStatus.instances"> <template v-for="(instance, i) in row.item.rolloutStatus.instances">
<deployment-instance <deployment-instance
:key="i" :key="i"
......
...@@ -60,6 +60,10 @@ describe('Environments', () => { ...@@ -60,6 +60,10 @@ describe('Environments', () => {
tableHeaders.forEach((headerText, i) => expect(headers.at(i).text()).toEqual(headerText)); tableHeaders.forEach((headerText, i) => expect(headers.at(i).text()).toEqual(headerText));
}); });
it('should stack on smaller devices', () => {
expect(table.classes()).toContain('b-table-stacked-md');
});
describe('deployment instances', () => { describe('deployment instances', () => {
let tableRows; let tableRows;
......
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