Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
</sba-button>
</template>

<script>
<script lang="ts">
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
import { PropType, defineComponent } from 'vue';

import SbaButton from '@/components/sba-button';

export default {
export default defineComponent({
components: { SbaButton },
props: {
title: {
Expand All @@ -38,7 +41,9 @@ export default {
default: null,
},
icon: {
type: [String, Array],
type: [Object, Array, String] as PropType<
Array<string> | string | IconDefinition
>,
required: true,
},
size: {
Expand All @@ -51,7 +56,7 @@ export default {
},
},
emits: ['click'],
};
});
</script>

<style></style>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const modules: Record<string, any> = import.meta.glob('@/**/i18n.en.json', {
eager: true,
});
for (const modulesKey in modules) {
terms = { ...terms, ...modules[modulesKey] };
const moduleContent = modules[modulesKey].default || modules[modulesKey];
terms = { ...terms, ...moduleContent };
}
export let router;
createViewRegistry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

exports[`HealthDetails > Health .details > should format object details correctly 1`] = `
<dd
aria-label="validChains"
aria-labelledby="health-detail-v-7__validChains"
class="col-span-4"
data-v-4727d85f=""
role="definition"
>
<pre
class="formatted overflow-auto whitespace-pre!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@
:title="$t('term.fetch_failed')"
/>
<div class="-mx-4 -my-3">
<health-details :health="health" name="Instance" />
<health-details
:instance="instance"
:health="health"
:index="0"
name="Instance"
/>

<template v-for="group in healthGroups" :key="group.name">
<template v-for="(group, groupIdx) in healthGroups" :key="group.name">
<div
class="px-4 py-2 border-t border-gray-200 sm:px-6"
:class="{ 'border-b': isHealthGroupOpen(group.name) }"
Expand All @@ -71,9 +76,15 @@
'rotate-90': isHealthGroupOpen(group.name),
}"
/>
<span v-text="$t('instances.details.health_group.title')"></span
>:&nbsp;
<span v-text="group.name"></span>
<span
v-text="$t('instances.details.health_group.title')"
/>:&nbsp; <span v-text="group.name"></span>
<sba-status-badge
v-if="group.data?.status"
class="ml-2 fade"
:status="group.data?.status"
/>

<font-awesome-icon
v-if="healthGroupLoadingMap[group.name]"
icon="sync-alt"
Expand All @@ -84,7 +95,12 @@
</h4>
</div>
<div v-if="isHealthGroupOpen(group.name) && group.data">
<health-details :health="group.data" :name="group.name" />
<health-details
:instance="instance"
:health="group.data"
:name="group.name"
:index="groupIdx + 1"
/>
</div>
</template>
</div>
Expand Down
Loading