Skip to main content
Glama
AuditLogCell.vue1.88 kB
<template> <td v-tooltip="tooltip" align="center" :class=" clsx( 'border-x border-collapse', cell.column.id === 'json' && 'w-8', themeClasses('border-neutral-300', 'border-neutral-900'), ) " > <IconButton v-if="cell.column.id === 'json'" :icon="rowExpanded ? 'collapse-row' : 'expand-row'" iconIdleTone="neutral" size="xs" @click="emit('toggleExpand')" /> <span v-else-if="cellDataTruncated" v-tooltip="{ content: cellRawData }"> <FlexRender :render="cell.column.columnDef.cell" :props="{ ...cell.getContext(), getValue: () => cellDataTruncated }" /> </span> <FlexRender v-else :render="cell.column.columnDef.cell" :props="cell.getContext()" /> </td> </template> <script lang="ts" setup> import { IconButton, themeClasses } from "@si/vue-lib/design-system"; import { FlexRender, Cell } from "@tanstack/vue-table"; import clsx from "clsx"; import { computed, PropType } from "vue"; import { AuditLogDisplay } from "@/store/logs.store"; const MAX_STRING_LENGTH = 100; const props = defineProps({ cell: { type: Object as PropType<Cell<AuditLogDisplay, unknown>>, required: true, }, rowExpanded: { type: Boolean }, }); const tooltip = computed(() => { if (props.cell.column.id === "json") { return { content: props.rowExpanded ? "Collapse Row" : "Expand Row", theme: "instant-show", }; } return null; }); const cellRawData = computed( () => props.cell.getContext().getValue() as string, ); const cellDataTruncated = computed(() => { if (cellRawData.value.length > MAX_STRING_LENGTH) { return `${cellRawData.value.substring(0, MAX_STRING_LENGTH)}...`; } return undefined; }); const emit = defineEmits<{ (e: "select"): void; (e: "toggleExpand"): void; }>(); </script>

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server