|
1 |
| -import React, { useState, useRef, useEffect } from 'react'; |
| 1 | +import { useEffect, useRef, useState } from 'react'; |
2 | 2 |
|
3 |
| -import { |
4 |
| - AnalysisMode, |
5 |
| - useRenderingServiceStore, |
6 |
| -} from 'explorviz-frontend/src/stores/rendering-service'; |
7 |
| -import { Font, FontLoader } from 'three-stdlib'; //'three/examples/jsm/loaders/FontLoader'; |
8 |
| -import { ApiToken, useUserApiTokenStore } from '../stores/user-api-token'; |
9 |
| -import { LandscapeData } from '../utils/landscape-schemes/landscape-data'; |
10 |
| -import { Timestamp } from '../utils/landscape-schemes/timestamp'; |
11 |
| -import TimelineDataObjectHandler from '../utils/timeline/timeline-data-object-handler'; |
12 |
| -import { useSpectateConfigurationStore } from '../stores/spectate-configuration'; |
13 | 3 | import {
|
14 | 4 | useLocalUserStore,
|
15 | 5 | VisualizationMode,
|
16 | 6 | } from 'explorviz-frontend/src/stores/collaboration/local-user';
|
17 |
| -import { useTimestampRepositoryStore } from 'explorviz-frontend/src/stores/repos/timestamp-repository'; |
18 |
| -import SemanticZoomManager from '../view-objects/3d/application/utils/semantic-zoom-manager'; |
| 7 | +import { useWebSocketStore } from 'explorviz-frontend/src/stores/collaboration/web-socket'; |
| 8 | +import { |
| 9 | + AnalysisMode, |
| 10 | + useRenderingServiceStore, |
| 11 | +} from 'explorviz-frontend/src/stores/rendering-service'; |
19 | 12 | import { useEvolutionDataRepositoryStore } from 'explorviz-frontend/src/stores/repos/evolution-data-repository';
|
| 13 | +import { useTimestampRepositoryStore } from 'explorviz-frontend/src/stores/repos/timestamp-repository'; |
| 14 | +import { useSnapshotTokenStore } from 'explorviz-frontend/src/stores/snapshot-token'; |
| 15 | +import { useTimestampPollingStore } from 'explorviz-frontend/src/stores/timestamp-polling'; |
| 16 | +import { Font, FontLoader } from 'three-stdlib'; //'three/examples/jsm/loaders/FontLoader'; |
| 17 | +import { useApplicationRendererStore } from '../stores/application-renderer'; |
| 18 | +import { useRoomSerializerStore } from '../stores/collaboration/room-serializer'; |
20 | 19 | import { useCommitTreeStateStore } from '../stores/commit-tree-state';
|
21 |
| -import eventEmitter from '../utils/event-emitter'; |
| 20 | +import { useDetachedMenuRendererStore } from '../stores/extended-reality/detached-menu-renderer'; |
| 21 | +import { useHighlightingStore } from '../stores/highlighting'; |
| 22 | +import { useLandscapeRestructureStore } from '../stores/landscape-restructure'; |
| 23 | +import { useLinkRendererStore } from '../stores/link-renderer'; |
| 24 | +import { useReloadHandlerStore } from '../stores/reload-handler'; |
| 25 | +import { useSpectateConfigurationStore } from '../stores/spectate-configuration'; |
| 26 | +import { useToastHandlerStore } from '../stores/toast-handler'; |
| 27 | +import { ApiToken, useUserApiTokenStore } from '../stores/user-api-token'; |
| 28 | +import { ForwardedMessage } from '../utils/collaboration/web-socket-messages/receivable/forwarded'; |
22 | 29 | import {
|
23 | 30 | INITIAL_LANDSCAPE_EVENT,
|
24 | 31 | InitialLandscapeMessage,
|
25 | 32 | } from '../utils/collaboration/web-socket-messages/receivable/landscape';
|
26 | 33 | import {
|
27 |
| - TIMESTAMP_UPDATE_EVENT, |
28 |
| - TimestampUpdateMessage, |
29 |
| -} from '../utils/collaboration/web-socket-messages/sendable/timestamp-update'; |
| 34 | + TIMESTAMP_UPDATE_TIMER_EVENT, |
| 35 | + TimestampUpdateTimerMessage, |
| 36 | +} from '../utils/collaboration/web-socket-messages/receivable/timestamp-update-timer'; |
30 | 37 | import {
|
31 | 38 | SYNC_ROOM_STATE_EVENT,
|
32 | 39 | SyncRoomStateMessage,
|
33 | 40 | } from '../utils/collaboration/web-socket-messages/sendable/synchronize-room-state';
|
34 | 41 | import {
|
35 |
| - TIMESTAMP_UPDATE_TIMER_EVENT, |
36 |
| - TimestampUpdateTimerMessage, |
37 |
| -} from '../utils/collaboration/web-socket-messages/receivable/timestamp-update-timer'; |
38 |
| -import { useLinkRendererStore } from '../stores/link-renderer'; |
39 |
| -import { useRoomSerializerStore } from '../stores/collaboration/room-serializer'; |
| 42 | + TIMESTAMP_UPDATE_EVENT, |
| 43 | + TimestampUpdateMessage, |
| 44 | +} from '../utils/collaboration/web-socket-messages/sendable/timestamp-update'; |
| 45 | +import { |
| 46 | + VISUALIZATION_MODE_UPDATE_EVENT, |
| 47 | + VisualizationModeUpdateMessage, |
| 48 | +} from '../utils/collaboration/web-socket-messages/sendable/visualization-mode-update'; |
40 | 49 | import {
|
41 | 50 | SerializedAnnotation,
|
42 | 51 | SerializedApp,
|
43 | 52 | SerializedDetachedMenu,
|
44 | 53 | SerializedPopup,
|
45 | 54 | } from '../utils/collaboration/web-socket-messages/types/serialized-room';
|
46 |
| -import { useHighlightingStore } from '../stores/highlighting'; |
47 |
| -import { ForwardedMessage } from '../utils/collaboration/web-socket-messages/receivable/forwarded'; |
48 |
| -import { useReloadHandlerStore } from '../stores/reload-handler'; |
49 |
| -import { useApplicationRendererStore } from '../stores/application-renderer'; |
50 |
| -import { useDetachedMenuRendererStore } from '../stores/extended-reality/detached-menu-renderer'; |
51 |
| -import { useToastHandlerStore } from '../stores/toast-handler'; |
52 |
| -import { useSnapshotTokenStore } from 'explorviz-frontend/src/stores/snapshot-token'; |
53 |
| -import { useWebSocketStore } from 'explorviz-frontend/src/stores/collaboration/web-socket'; |
54 |
| -import { |
55 |
| - VISUALIZATION_MODE_UPDATE_EVENT, |
56 |
| - VisualizationModeUpdateMessage, |
57 |
| -} from '../utils/collaboration/web-socket-messages/sendable/visualization-mode-update'; |
58 |
| -import { useLandscapeRestructureStore } from '../stores/landscape-restructure'; |
59 |
| -import { useTimestampPollingStore } from 'explorviz-frontend/src/stores/timestamp-polling'; |
60 |
| -import { StructureLandscapeData } from '../utils/landscape-schemes/structure-data'; |
| 55 | +import eventEmitter from '../utils/event-emitter'; |
61 | 56 | import { DynamicLandscapeData } from '../utils/landscape-schemes/dynamic/dynamic-data';
|
| 57 | +import { LandscapeData } from '../utils/landscape-schemes/landscape-data'; |
| 58 | +import { StructureLandscapeData } from '../utils/landscape-schemes/structure-data'; |
| 59 | +import { Timestamp } from '../utils/landscape-schemes/timestamp'; |
| 60 | +import TimelineDataObjectHandler from '../utils/timeline/timeline-data-object-handler'; |
| 61 | +import SemanticZoomManager from '../view-objects/3d/application/utils/semantic-zoom-manager'; |
62 | 62 | // import ArRendering from 'explorviz-frontend/src/components/extended-reality/ar-rendering';
|
| 63 | +import { ChevronUpIcon } from '@primer/octicons-react'; |
63 | 64 | import VrRendering from 'explorviz-frontend/src/components/extended-reality/vr-rendering';
|
64 |
| -import { useUserSettingsStore } from '../stores/user-settings'; |
| 65 | +import PlotlyCommitTree from 'explorviz-frontend/src/components/visualization/page-setup/bottom-bar/evolution/plotly-commit-tree'; |
| 66 | +import PlotlyTimeline from 'explorviz-frontend/src/components/visualization/page-setup/bottom-bar/runtime/plotly-timeline'; |
65 | 67 | import BrowserRendering from 'explorviz-frontend/src/components/visualization/rendering/browser-rendering';
|
66 |
| -import { useLandscapeTokenStore } from '../stores/landscape-token'; |
67 |
| -import PlayPauseButton from '../components/visualization/rendering/play-pause-button'; |
68 |
| -import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; |
69 |
| -import { useFontRepositoryStore } from '../stores/repos/font-repository'; |
70 | 68 | import { Button } from 'react-bootstrap';
|
71 |
| -import PlotlyTimeline from 'explorviz-frontend/src/components/visualization/page-setup/bottom-bar/runtime/plotly-timeline'; |
72 |
| -import CommitTreeApplicationSelection from '../components/visualization/page-setup/bottom-bar/evolution/commit-tree-application-selection'; |
| 69 | +import { useNavigate, useParams, useSearchParams } from 'react-router-dom'; |
| 70 | +import { useShallow } from 'zustand/react/shallow'; |
| 71 | +import ArRendering from '../components/extended-reality/ar-rendering'; |
73 | 72 | import EvolutionRenderingButtons from '../components/extended-reality/visualization/page-setup/bottom-bar/evolution/evolution-rendering-buttons';
|
74 |
| -import PlotlyCommitTree from 'explorviz-frontend/src/components/visualization/page-setup/bottom-bar/evolution/plotly-commit-tree'; |
75 |
| -import { ChevronUpIcon } from '@primer/octicons-react'; |
76 |
| -import { useCollaborationSessionStore } from '../stores/collaboration/collaboration-session'; |
| 73 | +import CommitTreeApplicationSelection from '../components/visualization/page-setup/bottom-bar/evolution/commit-tree-application-selection'; |
| 74 | +import PlayPauseButton from '../components/visualization/rendering/play-pause-button'; |
77 | 75 | import useSyncState from '../hooks/sync-state';
|
78 |
| -import { useShallow } from 'zustand/react/shallow'; |
79 | 76 | import { ImmersiveView } from '../rendering/application/immersive-view';
|
80 |
| -import { useTimestampStore } from '../stores/timestamp'; |
81 |
| -import ArRendering from '../components/extended-reality/ar-rendering'; |
| 77 | +import { useCollaborationSessionStore } from '../stores/collaboration/collaboration-session'; |
| 78 | +import { useLandscapeTokenStore } from '../stores/landscape-token'; |
| 79 | +import { useFontRepositoryStore } from '../stores/repos/font-repository'; |
| 80 | +import { useUserSettingsStore } from '../stores/user-settings'; |
82 | 81 |
|
83 | 82 | const queryParams = [
|
84 | 83 | 'roomId',
|
@@ -405,7 +404,6 @@ export default function Visualization() {
|
405 | 404 |
|
406 | 405 | const shouldDisplayBottomBar = () => {
|
407 | 406 | return (
|
408 |
| - renderingServiceLandscapeData && |
409 | 407 | !showAR &&
|
410 | 408 | !showVR &&
|
411 | 409 | !isSingleLandscapeMode &&
|
@@ -762,9 +760,9 @@ export default function Visualization() {
|
762 | 760 | <div className="container-fluid mt-6">
|
763 | 761 | <div className="jumbotron">
|
764 | 762 | {isLandscapeExistentAndEmpty ? (
|
765 |
| - <h2>Empty Landscape received.</h2> |
| 763 | + <h2>Empty Landscape from Span Service received.</h2> |
766 | 764 | ) : (
|
767 |
| - <h2>Loading Landscape ...</h2> |
| 765 | + <h2>Loading Dynamic Landscape Data ...</h2> |
768 | 766 | )}
|
769 | 767 | <p>A new landscape will be fetched every 10 seconds.</p>
|
770 | 768 | </div>
|
@@ -798,7 +796,7 @@ export default function Visualization() {
|
798 | 796 | components={components}
|
799 | 797 | componentsToolsSidebar={componentsToolsSidebar}
|
800 | 798 | id="browser-rendering"
|
801 |
| - isDisplayed={allLandscapeDataExistsAndNotEmpty} |
| 799 | + isDisplayed={allLandscapeDataExistsAndNotEmpty || false} |
802 | 800 | landscapeData={renderingServiceLandscapeData}
|
803 | 801 | landscapeToken={landscapeTokenServiceToken}
|
804 | 802 | removeTimestampListener={removeTimestampListener}
|
|
0 commit comments