Skip to content

Commit

Permalink
Merge pull request #137 from buggregator/hotfix/130
Browse files Browse the repository at this point in the history
Fixes in ray events
  • Loading branch information
butschster authored Apr 30, 2024
2 parents e826d19 + eece94a commit 271c104
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/entities/ray/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface RayContent {
label: string,
}

export interface RayContentCarbone {
export interface RayContentCarbon {
formatted: string,
timestamp: number,
timezone: string
Expand Down Expand Up @@ -144,7 +144,7 @@ export interface RayPayload {
| RayContent
| RayContentArray
| RayContentObject
| RayContentCarbone
| RayContentCarbon
| RayContentSQL
| RayContentApplicationLog
| RayContentEloquent
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './ray-frame';
export * from './ray-carbone';
export * from './ray-carbon';
export * from './ray-exception';
export * from './ray-file';
export * from './ray-trace';
Expand Down
10 changes: 6 additions & 4 deletions src/entities/ray/ui/preview-card/preview-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { NormalizedEvent } from "~/src/shared/types";
import { PreviewCard } from "~/src/shared/ui";
import type {
EnhancedRayEvent,
RayContentCarbone,
RayContentCarbon,
RayContentCustom,
RayContentEloquent,
RayContentApplicationLog,
Expand All @@ -25,7 +25,7 @@ import type {
} from "../../types";
import { RAY_EVENT_TYPES } from "../../types";
import { RayApplicationLog } from "../ray-application-log";
import { RayCarbone } from "../ray-carbone";
import { RayCarbon } from "../ray-carbon";
import { RayCustom } from "../ray-custom";
import { RayEloquent } from "../ray-eloquent";
import { RayEvent } from "../ray-event";
Expand Down Expand Up @@ -79,9 +79,9 @@ const COMPONENT_TYPE_MAP = {
}),
},
[RAY_EVENT_TYPES.CARBON]: {
view: RayCarbone,
view: RayCarbon,
getProps: (payload: RayPayload) => ({
carbone: payload.content as RayContentCarbone,
carbon: payload.content as RayContentCarbon,
}),
},
[RAY_EVENT_TYPES.TRACE]: {
Expand Down Expand Up @@ -180,3 +180,5 @@ const COMPONENT_TYPE_MAP = {
</template>
</PreviewCard>
</template>


1 change: 1 addition & 0 deletions src/entities/ray/ui/ray-carbon/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as RayCarbon } from './ray-carbon.vue'
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Meta, StoryObj } from "@storybook/vue3";
import { useRay } from "../../lib";
import { rayCarbonMock } from '../../mocks'
import type { RayContentCarbone } from "../../types";
import RayCarbon from './ray-carbone.vue';
import type { RayContentCarbon } from "../../types";
import RayCarbon from './ray-carbon.vue';

const { normalizeRayEvent } = useRay();

Expand All @@ -14,6 +14,6 @@ export default {

export const Default: StoryObj<typeof RayCarbon> = {
args: {
content: (normalizeRayEvent(rayCarbonMock).payload.payloads[0].content as RayContentCarbone)
carbon: (normalizeRayEvent(rayCarbonMock).payload.payloads[0].content as RayContentCarbon)
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
import { TableBase, TableBaseRow } from "~/src/shared/ui";
import type { RayContentCarbone } from "../../types";
import type { RayContentCarbon } from "../../types";
type Props = {
carbone: RayContentCarbone;
carbon: RayContentCarbon;
};
defineProps<Props>();
Expand All @@ -13,13 +13,13 @@ defineProps<Props>();
<div class="ray-carbon">
<TableBase>
<TableBaseRow title="Formatted">
{{ carbone.formatted }}
{{ carbon.formatted }}
</TableBaseRow>
<TableBaseRow title="Timezone">
{{ carbone.timezone }}
{{ carbon.timezone }}
</TableBaseRow>
<TableBaseRow title="Timestamp">
{{ carbone.timestamp }}
{{ carbon.timestamp }}
</TableBaseRow>
</TableBase>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/entities/ray/ui/ray-carbone/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-exception/ray-exception.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {

export const Default: StoryObj<typeof RayException> = {
args: {
content: (normalizeRayEvent(rayExceptionMock).payload.payloads[0].content as RayContentException)
exception: (normalizeRayEvent(rayExceptionMock).payload.payloads[0].content as RayContentException)
}
}

2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-file/ray-file.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const hasSnippets = computed(() =>
}
.ray-file__icon {
@apply w-5 h-4 border border-purple-300 shadow bg-white dark:bg-gray-600 py-1 rounded;
@apply w-5 h-4 py-1 rounded;
}
.ray-file__icon--collapsed {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/ui/ray-view/ray-view.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export default {

export const Default: StoryObj<typeof RayViews> = {
args: {
content: (normalizeRayEvent(rayLaravelViewsMock).payload.payloads[0].content as RayContentView)
view: (normalizeRayEvent(rayLaravelViewsMock).payload.payloads[0].content as RayContentView)
}
}

0 comments on commit 271c104

Please sign in to comment.