Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/#139 multiple projects support #204

Merged
merged 33 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9c7c0b2
#139 reorganize shared stores
Kreezag Jul 13, 2024
c1d048f
#139 fix error with circular dependencies
Kreezag Jul 13, 2024
2337f31
#139 integrate stored project to requests
Kreezag Jul 13, 2024
781d658
#139 actualize server event types and mocks
Kreezag Jul 13, 2024
73939d7
#139 update project params api integrations
Kreezag Jul 13, 2024
a4573bf
#139 add base ui for project selects
Kreezag Jul 13, 2024
ae54d63
#139 fix project param for rest endpoints
Kreezag Jul 13, 2024
dd5b59d
#139 collect all events in ws
Kreezag Jul 15, 2024
56e0b98
#139 use null as default project
Kreezag Jul 15, 2024
d47555b
#139 add selected project to session store
Kreezag Jul 15, 2024
ffbfaba
#139 update ws publication handler
Kreezag Jul 15, 2024
44d1a7b
#139 move cached and locked events storing from local to session
Kreezag Jul 15, 2024
fa38aaf
#139 make all events call on project change
Kreezag Jul 15, 2024
2128784
#139 polish stored project logics
Kreezag Jul 15, 2024
5063c0b
#139 polish sidebar styles to work with projects
Kreezag Jul 16, 2024
1e250ce
#139 create active styles for layout projects
Kreezag Jul 16, 2024
a83cc01
#139 use projects api instead of settings api
Kreezag Jul 18, 2024
7e21d54
#139 polish prop name in layout-sidebar profile
Kreezag Jul 18, 2024
7f9adc3
#139 add simple dropdown menu to projects
Kreezag Jul 18, 2024
f773b78
create helper function in layout-sidebar
Kreezag Jul 26, 2024
c843328
#139 fix error in events-store
Kreezag Jul 26, 2024
aaf444d
#139 add floating ui to layout sidebar
Kreezag Jul 26, 2024
b17bb89
#139 fix white theme background color
Kreezag Jul 26, 2024
f5921e6
#139 add script to generte project colors
Kreezag Jul 27, 2024
aeb1a65
#139 fix project active check logic
Kreezag Jul 27, 2024
5f105fa
#139 polish layout-sidebar styles
Kreezag Jul 27, 2024
f0862f1
#139 add project active reset if recieve empty projects
Kreezag Jul 27, 2024
aafd404
#139 fix project type to sync with server
Kreezag Jul 27, 2024
2323d91
#139 update project icon style
Kreezag Jul 28, 2024
d3dbcf6
#139 update project dropdown items style
Kreezag Jul 28, 2024
b1696ee
#139 polish project dropdown in dark theme
Kreezag Jul 28, 2024
03736b2
#139 remove redirect to root on project change in sidebar
Kreezag Jul 28, 2024
673d317
#139 update project dropdown accessable from keyboard
Kreezag Jul 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<script lang="ts" setup>
import "./src/assets/index.css";
import "./src/assets/vendor";
import { useSettingsStore } from "~/src/shared/stores";
import { useEventsStore, useSettingsStore } from "~/src/shared/stores";

useSettingsStore().initialize();
useEventsStore().initialize();
</script>
17 changes: 11 additions & 6 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
<script lang="ts" setup>
import { onMounted } from "vue";
import { storeToRefs } from "pinia";
import { watch } from "vue";
import { LayoutSidebar } from "~/src/widgets/ui";
import { useEvents } from "~/src/shared/lib/use-events";
import SfdumpWrap from "~/src/shared/lib/vendor/dumper";
import { useEventsStore } from "~/src/shared/stores";

SfdumpWrap(window.document);

onMounted(() => {
const { events } = useEvents();
const { activeProjectKey } = storeToRefs(useEventsStore());
const { events } = useEvents();

if (!events?.items?.value?.length) {
watch(
() => activeProjectKey.value,
() => {
events.getAll();
}
});
},
{ immediate: true },
);
</script>

<template>
Expand Down
3 changes: 1 addition & 2 deletions middleware/auth.global.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { navigateTo, defineNuxtRouteMiddleware } from "#app";
import { useSettings } from "~/src/shared/lib/use-settings";
import {useSettingsStore} from "~/src/shared/stores";
import { useProfileStore } from "~/src/shared/stores/profile"
import {useSettingsStore, useProfileStore} from "~/src/shared/stores";

export default defineNuxtRouteMiddleware(async (to) => {
const { auth} = storeToRefs(useSettingsStore())
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"vue-eslint-parser": "^9.1.0"
},
"dependencies": {
"@floating-ui/vue": "^1.1.2",
"@highlightjs/vue-plugin": "^2.1.2",
"@hpcc-js/wasm": "^2.8.0",
"@pinia/nuxt": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useTitle } from "@vueuse/core";
import { storeToRefs } from "pinia";
import { computed } from "vue";
import { useSettingsStore, THEME_MODES } from "~/src/shared/stores/settings";
import { useSettingsStore, THEME_MODES } from "~/src/shared/stores";
import { AppHeader, BadgeNumber, IconSvg } from "~/src/shared/ui";

const settingsStore = useSettingsStore();
Expand Down
2 changes: 1 addition & 1 deletion src/assets/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "vendor.css";

body {
@apply bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-50 p-0;
@apply bg-gray-50 dark:bg-gray-800 text-gray-800 dark:text-gray-50 p-0;
}

body a:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/entities/http-dump/mocks/http-dump-with-pdf.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
}
},
"timestamp": 1683838591,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/http-dump/mocks/http-dump.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
}
},
"timestamp": 1683838591,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/inspector/mocks/inspector.json
Original file line number Diff line number Diff line change
Expand Up @@ -1040,5 +1040,5 @@
}
],
"timestamp": 1678366953,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/monolog/mocks/monolog.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"extra": []
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/profiler/mocks/profiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
}
},
"timestamp": 1678450656,
"project_id": null
"project": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"value": "{\"request\":\"a\",\"response\":\"a\"}"
},
"origin": {
"file": "\/var\/www\/html\/vendor\/psy\/psysh\/src\/ExecutionLoopClosure.php(53) : eval()'d code",
"file": "/var/www/html/vendor/psy/psysh/src/ExecutionLoopClosure.php(53) : eval()'d code",
"line_number": 1,
"hostname": "f5813cb9520f"
}
Expand All @@ -26,5 +26,5 @@
}
},
"timestamp": 1701161948,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-eloquent.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-events.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-mailable.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-query.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks-laravel/ray-laravel-views.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-boolean-false.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-boolean-true.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-caller.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-carbon.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-color.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-counter.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-dump.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
3 changes: 2 additions & 1 deletion src/entities/ray/mocks/ray-empty-string.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"project_id": null,
"project": null,
"uuid": "b3ee69b0-60e1-4fc0-add5-2c5677dd2b8c",
"type": "ray",
"timestamp": 1678271981,
"payload": {
"uuid": "b3ee69b0-60e1-4fc0-add5-2c5677dd2b8c",
"payloads": [
Expand Down
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-exception.json
Original file line number Diff line number Diff line change
Expand Up @@ -2956,5 +2956,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-hide.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-integer.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-json.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-label.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
}
},
"timestamp": 1684060098,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-measure-start.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-measure.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-notify.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-size.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-text.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/ray/mocks/ray-trace.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,5 @@
}
},
"timestamp": 1673266869,
"project_id": null
"project": null
}
2 changes: 1 addition & 1 deletion src/entities/sentry/mocks/sentry-common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1179,5 +1179,5 @@
}
},
"timestamp": 1678272505,
"project_id": null
"project": null
}
7 changes: 2 additions & 5 deletions src/entities/sentry/mocks/sentry-event.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"uuid": "17d252f1-a602-4ab5-9a1f-837cf8ba9be6",
"type": "sentry",
"labels": ["sentry.1"],
"origin": null,
"server_name": "",
"project_id": null,
"date": "2023-09-17T20:33:28.000Z",
"project": null,
"timestamp": 1694982808,
"payload": {
"event_id": "16f48014895e405ab3f94dd18018d34d",
"timestamp": 1694982808.188267,
Expand Down
7 changes: 2 additions & 5 deletions src/entities/sentry/mocks/sentry-js-event.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"uuid": "79e27c1d-e610-4c82-9180-aa07b51d2295",
"type": "sentry",
"labels": ["sentry.1"],
"origin": null,
"server_name": "",
"date": "2023-09-17T21:49:59.000Z",
"timestamp": 1720882615,
"payload": {
"message": "Something went wrong",
"level": "info",
Expand Down Expand Up @@ -52,5 +49,5 @@
}
}
},
"project_id": null
"project": null
}
Loading
Loading