Skip to content

Commit 28c26ac

Browse files
committed
Allow visualization of evolution data without span service
1 parent 25a6346 commit 28c26ac

File tree

2 files changed

+60
-62
lines changed

2 files changed

+60
-62
lines changed

src/pages/landscapes.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import React, { ReactNode, useState, useEffect } from 'react';
1+
import RoomList from 'explorviz-frontend/src/components/collaboration/room-list';
2+
import SnapshotSelection from 'explorviz-frontend/src/components/snapshot-selection';
3+
import TokenCreationModal from 'explorviz-frontend/src/components/token-creation-modal';
4+
import TokenSelection from 'explorviz-frontend/src/components/token-selection';
5+
import React, { useEffect, useState } from 'react';
6+
import { Tab, Tabs } from 'react-bootstrap';
7+
import { createSearchParams, useNavigate } from 'react-router-dom';
8+
import { useAuthStore } from '../stores/auth';
29
import {
310
LandscapeToken,
411
useLandscapeTokenStore,
@@ -8,14 +15,7 @@ import {
815
TinySnapshot,
916
useSnapshotTokenStore,
1017
} from '../stores/snapshot-token';
11-
import { useNavigate, createSearchParams, useParams } from 'react-router-dom';
1218
import { useToastHandlerStore } from '../stores/toast-handler';
13-
import { useAuthStore } from '../stores/auth';
14-
import { Tabs, Tab, Button } from 'react-bootstrap';
15-
import TokenSelection from 'explorviz-frontend/src/components/token-selection';
16-
import RoomList from 'explorviz-frontend/src/components/collaboration/room-list';
17-
import SnapshotSelection from 'explorviz-frontend/src/components/snapshot-selection';
18-
import TokenCreationModal from 'explorviz-frontend/src/components/token-creation-modal';
1919
import LandscapeLoader from './landscapes-loading';
2020

2121
export default function Landscapes() {

src/pages/visualization.tsx

Lines changed: 52 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,83 @@
1-
import React, { useState, useRef, useEffect } from 'react';
1+
import { useEffect, useRef, useState } from 'react';
22

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';
133
import {
144
useLocalUserStore,
155
VisualizationMode,
166
} 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';
1912
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';
2019
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';
2229
import {
2330
INITIAL_LANDSCAPE_EVENT,
2431
InitialLandscapeMessage,
2532
} from '../utils/collaboration/web-socket-messages/receivable/landscape';
2633
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';
3037
import {
3138
SYNC_ROOM_STATE_EVENT,
3239
SyncRoomStateMessage,
3340
} from '../utils/collaboration/web-socket-messages/sendable/synchronize-room-state';
3441
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';
4049
import {
4150
SerializedAnnotation,
4251
SerializedApp,
4352
SerializedDetachedMenu,
4453
SerializedPopup,
4554
} 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';
6156
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';
6262
// import ArRendering from 'explorviz-frontend/src/components/extended-reality/ar-rendering';
63+
import { ChevronUpIcon } from '@primer/octicons-react';
6364
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';
6567
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';
7068
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';
7372
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';
7775
import useSyncState from '../hooks/sync-state';
78-
import { useShallow } from 'zustand/react/shallow';
7976
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';
8281

8382
const queryParams = [
8483
'roomId',
@@ -405,7 +404,6 @@ export default function Visualization() {
405404

406405
const shouldDisplayBottomBar = () => {
407406
return (
408-
renderingServiceLandscapeData &&
409407
!showAR &&
410408
!showVR &&
411409
!isSingleLandscapeMode &&
@@ -762,9 +760,9 @@ export default function Visualization() {
762760
<div className="container-fluid mt-6">
763761
<div className="jumbotron">
764762
{isLandscapeExistentAndEmpty ? (
765-
<h2>Empty Landscape received.</h2>
763+
<h2>Empty Landscape from Span Service received.</h2>
766764
) : (
767-
<h2>Loading Landscape ...</h2>
765+
<h2>Loading Dynamic Landscape Data ...</h2>
768766
)}
769767
<p>A new landscape will be fetched every 10 seconds.</p>
770768
</div>
@@ -798,7 +796,7 @@ export default function Visualization() {
798796
components={components}
799797
componentsToolsSidebar={componentsToolsSidebar}
800798
id="browser-rendering"
801-
isDisplayed={allLandscapeDataExistsAndNotEmpty}
799+
isDisplayed={allLandscapeDataExistsAndNotEmpty || false}
802800
landscapeData={renderingServiceLandscapeData}
803801
landscapeToken={landscapeTokenServiceToken}
804802
removeTimestampListener={removeTimestampListener}

0 commit comments

Comments
 (0)