This is an automated email from the ASF dual-hosted git repository. marat pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push: new 33da37e8 UI Improvements 33da37e8 is described below commit 33da37e816a47a397257429feac753e34a7a91b4 Author: Marat Gubaidullin <ma...@talismancloud.io> AuthorDate: Thu Jan 30 16:00:02 2025 -0500 UI Improvements --- .../src/main/resources/application.properties | 4 +- .../docker/docker-compose.yaml} | 0 .../src/main/webui/src/api/ProjectModels.ts | 7 +- .../{ConfigurationPage.tsx => SystemPage.tsx} | 4 +- .../InfoContainer.tsx => log/InfoTabContainer.tsx} | 6 +- .../InfoContext.tsx => log/InfoTabContext.tsx} | 8 +- .../InfoMemory.tsx => log/InfoTabMemory.tsx} | 8 +- .../DashboardTab.tsx => log/InformationLog.tsx} | 39 +++---- .../src/main/webui/src/log/ProjectLogPanel.tsx | 113 ++++++++++++--------- .../{KnowledgebaseWrapper.tsx => HelpWrapper.tsx} | 2 +- karavan-app/src/main/webui/src/main/MainRoutes.tsx | 8 +- .../src/main/webui/src/project/ProjectPage.tsx | 1 - .../src/main/webui/src/project/ProjectPanel.tsx | 2 - .../src/main/webui/src/services/ServicesPage.tsx | 14 +-- 14 files changed, 115 insertions(+), 101 deletions(-) diff --git a/karavan-app/src/main/resources/application.properties b/karavan-app/src/main/resources/application.properties index c29b6e15..03449352 100644 --- a/karavan-app/src/main/resources/application.properties +++ b/karavan-app/src/main/resources/application.properties @@ -41,7 +41,7 @@ karavan.keycloak.backend.secret=karavan # Git repository Configuration karavan.git.repository=http://gitea:3000/karavan/karavan.git karavan.git.username=karavan -karavan.git.password=karavan +karavan.git.password=karavankaravan karavan.git.branch=main karavan.private-key-path= @@ -99,6 +99,8 @@ quarkus.kubernetes-client.devservices.enabled=false %public.quarkus.swagger-ui.always-include=true quarkus.quinoa.ci=false +quarkus.quinoa.package-manager-install=true +quarkus.quinoa.package-manager-install.node-version=22.9.0 quarkus.quinoa.dev-server.port=3003 quarkus.quinoa.dev-server.check-timeout=60000 quarkus.quinoa.ignored-path-prefixes=/ui,/public diff --git a/karavan-app/src/main/resources/configuration/docker/devservices.docker-compose.yaml b/karavan-app/src/main/resources/services/docker/docker-compose.yaml similarity index 100% rename from karavan-app/src/main/resources/configuration/docker/devservices.docker-compose.yaml rename to karavan-app/src/main/resources/services/docker/docker-compose.yaml diff --git a/karavan-app/src/main/webui/src/api/ProjectModels.ts b/karavan-app/src/main/webui/src/api/ProjectModels.ts index f6b41e49..85c22de0 100644 --- a/karavan-app/src/main/webui/src/api/ProjectModels.ts +++ b/karavan-app/src/main/webui/src/api/ProjectModels.ts @@ -30,10 +30,12 @@ export enum ProjectType { templates ='templates', kamelets ='kamelets', configuration ='configuration', + services ='services', normal ='normal', } -export const BUILD_IN_PROJECTS: string[] = [ProjectType.kamelets.toString(), ProjectType.templates.toString(), ProjectType.configuration.toString()]; +export const BUILD_IN_PROJECTS: string[] = [ProjectType.kamelets.toString(), ProjectType.templates.toString(), ProjectType.configuration.toString(), ProjectType.services.toString()]; +export const RESERVED_WORDS: string[] = [...BUILD_IN_PROJECTS, 'karavan']; export class Project { projectId: string = ''; @@ -68,6 +70,7 @@ export class DeploymentStatus { replicas: number = 0; readyReplicas: number = 0; unavailableReplicas: number = 0; + type: 'devmode' | 'devservice' | 'project' | 'internal' | 'build' | 'unknown' = 'unknown'; } export class ServiceStatus { @@ -105,7 +108,7 @@ export class ContainerStatus { ports: ContainerPort [] = []; commands: string [] = []; inTransit: boolean = false; - camelRuntime: string = '' + labels: any public constructor(init?: Partial<ContainerStatus>) { Object.assign(this, init); diff --git a/karavan-app/src/main/webui/src/config/ConfigurationPage.tsx b/karavan-app/src/main/webui/src/config/SystemPage.tsx similarity index 96% rename from karavan-app/src/main/webui/src/config/ConfigurationPage.tsx rename to karavan-app/src/main/webui/src/config/SystemPage.tsx index 18bd909c..93375822 100644 --- a/karavan-app/src/main/webui/src/config/ConfigurationPage.tsx +++ b/karavan-app/src/main/webui/src/config/SystemPage.tsx @@ -33,7 +33,7 @@ interface Props { dark: boolean, } -export const ConfigurationPage = (props: Props) => { +export const SystemPage = (props: Props) => { const [tab, setTab] = useState<string | number>("statuses"); @@ -62,7 +62,7 @@ export const ConfigurationPage = (props: Props) => { function title() { return (<TextContent> - <Text component="h2">Configuration</Text> + <Text component="h2">System</Text> </TextContent>); } diff --git a/karavan-app/src/main/webui/src/project/dashboard/InfoContainer.tsx b/karavan-app/src/main/webui/src/log/InfoTabContainer.tsx similarity index 96% rename from karavan-app/src/main/webui/src/project/dashboard/InfoContainer.tsx rename to karavan-app/src/main/webui/src/log/InfoTabContainer.tsx index b6a5b392..3b2e5fe1 100644 --- a/karavan-app/src/main/webui/src/project/dashboard/InfoContainer.tsx +++ b/karavan-app/src/main/webui/src/log/InfoTabContainer.tsx @@ -24,17 +24,15 @@ import { DescriptionListTerm, Label, } from '@patternfly/react-core'; -import '../../designer/karavan.css'; import DownIcon from "@patternfly/react-icons/dist/esm/icons/error-circle-o-icon"; import UpIcon from "@patternfly/react-icons/dist/esm/icons/check-circle-icon"; -import {ContainerStatus} from "../../api/ProjectModels"; - +import {ContainerStatus} from "../api/ProjectModels"; interface Props { containerStatus: ContainerStatus, } -export function InfoContainer (props: Props) { +export function InfoTabContainer (props: Props) { function getPodInfoLabel(info: React.ReactNode) { return ( diff --git a/karavan-app/src/main/webui/src/project/dashboard/InfoContext.tsx b/karavan-app/src/main/webui/src/log/InfoTabContext.tsx similarity index 97% rename from karavan-app/src/main/webui/src/project/dashboard/InfoContext.tsx rename to karavan-app/src/main/webui/src/log/InfoTabContext.tsx index 33795e8d..caa2c169 100644 --- a/karavan-app/src/main/webui/src/project/dashboard/InfoContext.tsx +++ b/karavan-app/src/main/webui/src/log/InfoTabContext.tsx @@ -24,19 +24,17 @@ import { Label, LabelGroup, Tooltip } from '@patternfly/react-core'; -import '../../designer/karavan.css'; import DownIcon from "@patternfly/react-icons/dist/esm/icons/error-circle-o-icon"; import UpIcon from "@patternfly/react-icons/dist/esm/icons/check-circle-icon"; -import {ContainerStatus} from "../../api/ProjectModels"; -import {useProjectStore} from "../../api/ProjectStore"; import {shallow} from "zustand/shallow"; - +import {useProjectStore} from "../api/ProjectStore"; +import {ContainerStatus} from "../api/ProjectModels"; interface Props { containerStatus: ContainerStatus } -export function InfoContext (props: Props) { +export function InfoTabContext (props: Props) { const [camelStatuses] = useProjectStore((state) => [state.camelStatuses], shallow); const camelStatus = camelStatuses.filter(s => s.containerName === props.containerStatus.containerName).at(0); diff --git a/karavan-app/src/main/webui/src/project/dashboard/InfoMemory.tsx b/karavan-app/src/main/webui/src/log/InfoTabMemory.tsx similarity index 96% rename from karavan-app/src/main/webui/src/project/dashboard/InfoMemory.tsx rename to karavan-app/src/main/webui/src/log/InfoTabMemory.tsx index 689d904c..2b345483 100644 --- a/karavan-app/src/main/webui/src/project/dashboard/InfoMemory.tsx +++ b/karavan-app/src/main/webui/src/log/InfoTabMemory.tsx @@ -24,19 +24,17 @@ import { Label, LabelGroup, Tooltip } from '@patternfly/react-core'; -import '../../designer/karavan.css'; import DownIcon from "@patternfly/react-icons/dist/esm/icons/error-circle-o-icon"; import UpIcon from "@patternfly/react-icons/dist/esm/icons/check-circle-icon"; -import {ContainerStatus} from "../../api/ProjectModels"; -import {useProjectStore} from "../../api/ProjectStore"; import {shallow} from "zustand/shallow"; - +import {useProjectStore} from "../api/ProjectStore"; +import { ContainerStatus } from '../api/ProjectModels'; interface Props { containerStatus: ContainerStatus } -export function InfoMemory (props: Props) { +export function InfoTabMemory (props: Props) { const [camelStatuses] = useProjectStore((state) => [state.camelStatuses], shallow); diff --git a/karavan-app/src/main/webui/src/project/dashboard/DashboardTab.tsx b/karavan-app/src/main/webui/src/log/InformationLog.tsx similarity index 71% rename from karavan-app/src/main/webui/src/project/dashboard/DashboardTab.tsx rename to karavan-app/src/main/webui/src/log/InformationLog.tsx index 3bdffead..9f70a6e3 100644 --- a/karavan-app/src/main/webui/src/project/dashboard/DashboardTab.tsx +++ b/karavan-app/src/main/webui/src/log/InformationLog.tsx @@ -14,60 +14,61 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import React, {useEffect} from 'react'; +import React from 'react'; import { Card, CardBody, Flex, FlexItem, Divider, - PageSection, EmptyState, EmptyStateVariant, EmptyStateHeader, EmptyStateIcon, Bullseye } from '@patternfly/react-core'; -import '../../designer/karavan.css'; -import {InfoContainer} from "./InfoContainer"; -import {InfoContext} from "./InfoContext"; -import {InfoMemory} from "./InfoMemory"; -import {useProjectStore, useStatusesStore} from "../../api/ProjectStore"; +import {InfoTabContainer} from "./InfoTabContainer"; +import {InfoTabContext} from "./InfoTabContext"; +import {InfoTabMemory} from "./InfoTabMemory"; import {shallow} from "zustand/shallow"; import SearchIcon from "@patternfly/react-icons/dist/esm/icons/search-icon"; +import {useStatusesStore} from "../api/ProjectStore"; -export function DashboardTab() { +interface Props { + currentPodName: string + header?: React.ReactNode +} - const [project] = useProjectStore((state) => [state.project], shallow); - const [containers] = useStatusesStore((state) => [state.containers], shallow); +export function InformationLog(props: Props): JSX.Element { - const camelContainers = containers - .filter(c => c.projectId === project.projectId && ['devmode', 'project'].includes(c.type)); + const [containers] = useStatusesStore((state) => [state.containers], shallow); + const camelContainers = containers.filter(cs => cs.containerName === props.currentPodName); return ( - <PageSection className="project-tab-panel" padding={{default: "padding"}}> + <div style={{display: "flex", flexDirection: "column", position: "relative", height: "100%"}}> + {props.header} {camelContainers.map((containerStatus, index) => - <Card className="dashboard-card" key={containerStatus.containerId}> + <Card key={containerStatus.containerId} isFlat isFullHeight> <CardBody> <Flex direction={{default: "row"}} justifyContent={{default: "justifyContentSpaceBetween"}}> <FlexItem flex={{default: "flex_1"}}> - <InfoContainer containerStatus={containerStatus}/> + <InfoTabContainer containerStatus={containerStatus}/> </FlexItem> <Divider orientation={{default: "vertical"}}/> <FlexItem flex={{default: "flex_1"}}> - <InfoMemory containerStatus={containerStatus}/> + <InfoTabMemory containerStatus={containerStatus}/> </FlexItem> <Divider orientation={{default: "vertical"}}/> <FlexItem flex={{default: "flex_1"}}> - <InfoContext containerStatus={containerStatus}/> + <InfoTabContext containerStatus={containerStatus}/> </FlexItem> </Flex> </CardBody> </Card> )} {camelContainers.length === 0 && - <Card className="project-development"> + <Card> <CardBody> <Bullseye> <EmptyState variant={EmptyStateVariant.sm}> @@ -78,6 +79,6 @@ export function DashboardTab() { </CardBody> </Card> } - </PageSection> + </div> ) } diff --git a/karavan-app/src/main/webui/src/log/ProjectLogPanel.tsx b/karavan-app/src/main/webui/src/log/ProjectLogPanel.tsx index 42ecea1c..f660cdd6 100644 --- a/karavan-app/src/main/webui/src/log/ProjectLogPanel.tsx +++ b/karavan-app/src/main/webui/src/log/ProjectLogPanel.tsx @@ -1,46 +1,44 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import React, {useEffect, useState} from 'react'; -import {Button, Checkbox, Label, PageSection, Tooltip, TooltipPosition} from '@patternfly/react-core'; +import { + Button, + Checkbox, + Label, + PageSection, ToggleGroup, ToggleGroupItem, + Tooltip, + TooltipPosition +} from '@patternfly/react-core'; import './ProjectLog.css'; import CloseIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon'; import CollapseIcon from '@patternfly/react-icons/dist/esm/icons/compress-icon'; import CleanIcon from '@patternfly/react-icons/dist/esm/icons/trash-alt-icon'; -import {useLogStore} from "../api/ProjectStore"; +import {useAppConfigStore, useLogStore, useProjectStore, useStatusesStore} from "../api/ProjectStore"; import {shallow} from "zustand/shallow"; import {ProjectEventBus} from "../api/ProjectEventBus"; import {ProjectLog} from "./ProjectLog"; import {LogWatchApi} from "../api/LogWatchApi"; +import {InformationLog} from "./InformationLog"; +import {ProjectService} from "../api/ProjectService"; const INITIAL_LOG_HEIGHT = "50%"; -export function ProjectLogPanel () { +export function ProjectLogPanel() { + + const [config] = useAppConfigStore((state) => [state.config], shallow); + const [project] = useProjectStore((s) => [s.project], shallow); + const [containers] = useStatusesStore((state) => [state.containers], shallow); const [showLog, type, setShowLog, podName] = useLogStore( (state) => [state.showLog, state.type, state.setShowLog, state.podName], shallow) const [height, setHeight] = useState(INITIAL_LOG_HEIGHT); const [isTextWrapped, setIsTextWrapped] = useState(true); const [autoScroll, setAutoScroll] = useState(true); - const [controller, setController] = React.useState(new AbortController()); const [currentPodName, setCurrentPodName] = useState<string | undefined>(undefined); + const [tab, setTab] = useState<'log' | 'events' | 'main-configuration' | 'info'>('log'); + const [controller, setController] = React.useState(new AbortController()); useEffect(() => { + setTab('log'); controller.abort() const c = new AbortController(); setController(c); @@ -61,39 +59,58 @@ export function ProjectLogPanel () { } }, [podName]); + useEffect(() => { + const interval = setInterval(() => refreshData(), 1300) + return () => clearInterval(interval); + }, [tab]); + + function refreshData(){ + if (tab === 'info') { + ProjectService.refreshCamelStatus(project.projectId, config.environment); + } + } + function getButtons() { - return (<div className="buttons"> - <Label className="log-name">{podName !== undefined ? (type + ": " + podName) : ''}</Label> - <Tooltip content={"Clean log"} position={TooltipPosition.bottom}> - <Button variant="plain" onClick={() => ProjectEventBus.sendLog('set', '')} icon={<CleanIcon/>}/> - </Tooltip> - <Checkbox label="Wrap text" aria-label="wrap text checkbox" isChecked={isTextWrapped} - id="wrap-text-checkbox" - onChange={(_, checked) => setIsTextWrapped(checked)}/> - <Checkbox label="Autoscroll" aria-label="autoscroll checkbox" isChecked={autoScroll} - id="autoscroll-checkbox" - onChange={(_, checked) => setAutoScroll(checked)}/> - {/*<Tooltip content={"Scroll to bottom"} position={TooltipPosition.bottom}>*/} - {/* <Button variant="plain" onClick={() => } icon={<ScrollIcon/>}/>*/} - {/*</Tooltip>*/} - <Tooltip content={height === "100%" ? "Collapse" : "Expand"} position={TooltipPosition.bottom}> + const isKubernetes = config.infrastructure === 'kubernetes'; + const title = isKubernetes ? ('Pod (' + type + "): " + podName) : (type + ": " + podName); + const containerType = containers.filter(c => c.containerName === podName).at(0)?.type; + const showMain= containerType !== undefined && ['devmode', 'project'].includes(containerType); + return ( + <div className="buttons"> + <Label className="log-name">{podName !== undefined ? title : ''}</Label> + <ToggleGroup isCompact style={{marginRight:'auto'}}> + <ToggleGroupItem key={0} isSelected={tab === 'log'} text='Log' onChange={_ => setTab('log')}/> + <ToggleGroupItem key={4} isSelected={tab === 'info'} text='Information' onChange={_ => setTab('info')}/> + </ToggleGroup> + <Tooltip content={"Clean log"} position={TooltipPosition.bottom}> + <Button variant="plain" onClick={() => ProjectEventBus.sendLog('set', '')} icon={<CleanIcon/>}/> + </Tooltip> + <Checkbox label="Wrap text" aria-label="wrap text checkbox" isChecked={isTextWrapped} + id="wrap-text-checkbox" + onChange={(_, checked) => setIsTextWrapped(checked)}/> + <Checkbox label="Autoscroll" aria-label="autoscroll checkbox" isChecked={autoScroll} + id="autoscroll-checkbox" + onChange={(_, checked) => setAutoScroll(checked)}/> + <Tooltip content={height === "100%" ? "Collapse" : "Expand"} position={TooltipPosition.bottom}> + <Button variant="plain" onClick={() => { + const h = height === "100%" ? INITIAL_LOG_HEIGHT : "100%"; + setHeight(h); + ProjectEventBus.sendLog('add', ' ') + }} icon={height === "100%" ? <CollapseIcon/> : <ExpandIcon/>}/> + </Tooltip> <Button variant="plain" onClick={() => { - const h = height === "100%" ? INITIAL_LOG_HEIGHT : "100%"; - setHeight(h); - ProjectEventBus.sendLog('add', ' ') - }} icon={height === "100%" ? <CollapseIcon/> : <ExpandIcon/>}/> - </Tooltip> - <Button variant="plain" onClick={() => { - setShowLog(false, 'none'); - setHeight(INITIAL_LOG_HEIGHT); - ProjectEventBus.sendLog('set', '') - }} icon={<CloseIcon/>}/> - </div>); + setShowLog(false, 'none'); + setHeight(INITIAL_LOG_HEIGHT); + ProjectEventBus.sendLog('set', '') + }} icon={<CloseIcon/>}/> + </div> + ); } return (showLog ? <PageSection className="project-log" padding={{default: "noPadding"}} style={{height: height}}> - <ProjectLog autoScroll={autoScroll} isTextWrapped={isTextWrapped} header={getButtons()}/> + {tab === 'log' && <ProjectLog autoScroll={autoScroll} isTextWrapped={isTextWrapped} header={getButtons()}/>} + {tab === 'info' && currentPodName && <InformationLog currentPodName={currentPodName} header={getButtons()}/>} </PageSection> : <></>); } diff --git a/karavan-app/src/main/webui/src/main/KnowledgebaseWrapper.tsx b/karavan-app/src/main/webui/src/main/HelpWrapper.tsx similarity index 97% rename from karavan-app/src/main/webui/src/main/KnowledgebaseWrapper.tsx rename to karavan-app/src/main/webui/src/main/HelpWrapper.tsx index 8224c2ed..f6c08570 100644 --- a/karavan-app/src/main/webui/src/main/KnowledgebaseWrapper.tsx +++ b/karavan-app/src/main/webui/src/main/HelpWrapper.tsx @@ -25,7 +25,7 @@ import { ProjectService } from "../api/ProjectService"; interface Props { dark: boolean, } -export const KnowledgebaseWrapper = (props: Props) => { +export const HelpWrapper = (props: Props) => { const [blockList, setBlockList] = useState<ProjectFile[]>(); diff --git a/karavan-app/src/main/webui/src/main/MainRoutes.tsx b/karavan-app/src/main/webui/src/main/MainRoutes.tsx index adb8b4ac..835b6d5a 100644 --- a/karavan-app/src/main/webui/src/main/MainRoutes.tsx +++ b/karavan-app/src/main/webui/src/main/MainRoutes.tsx @@ -22,8 +22,8 @@ import {ProjectPage} from "../project/ProjectPage"; import {ServicesPage} from "../services/ServicesPage"; import {ContainersPage} from "../containers/ContainersPage"; import {ResourcesPage} from "../resources/ResourcesPage"; -import {ConfigurationPage} from "../config/ConfigurationPage"; -import { KnowledgebaseWrapper } from './KnowledgebaseWrapper'; +import {SystemPage} from "../config/SystemPage"; +import { HelpWrapper } from './HelpWrapper'; export function MainRoutes() { @@ -34,8 +34,8 @@ export function MainRoutes() { <Route path="/resources" element={<ResourcesPage key={'resources'}/>}/> <Route path="/services" element={<ServicesPage key="services"/>}/> <Route path="/containers" element={<ContainersPage key="services"/>}/> - <Route path="/knowledgebase" element={<KnowledgebaseWrapper dark={false}/>}/> - <Route path="/configuration" element={<ConfigurationPage dark={false}/>}/> + <Route path="/help" element={<HelpWrapper dark={false}/>}/> + <Route path="/system" element={<SystemPage dark={false}/>}/> <Route path="*" element={<Navigate to="/projects" replace/>}/> </Routes> ) diff --git a/karavan-app/src/main/webui/src/project/ProjectPage.tsx b/karavan-app/src/main/webui/src/project/ProjectPage.tsx index 06537f5f..64094088 100644 --- a/karavan-app/src/main/webui/src/project/ProjectPage.tsx +++ b/karavan-app/src/main/webui/src/project/ProjectPage.tsx @@ -107,7 +107,6 @@ export function ProjectPage() { }}> {<Tab eventKey="topology" title="Topology"/>} <Tab eventKey="files" title="Files"/> - {<Tab eventKey="dashboard" title="Dashboard"/>} {<Tab eventKey="trace" title="Trace"/>} {showBuildTab && <Tab eventKey="build" title="Build"/>} <Tab eventKey="container" title={containerTabName}/> diff --git a/karavan-app/src/main/webui/src/project/ProjectPanel.tsx b/karavan-app/src/main/webui/src/project/ProjectPanel.tsx index d33d4d41..f7db0365 100644 --- a/karavan-app/src/main/webui/src/project/ProjectPanel.tsx +++ b/karavan-app/src/main/webui/src/project/ProjectPanel.tsx @@ -23,7 +23,6 @@ import { import '../designer/karavan.css'; import {FilesTab} from "./files/FilesTab"; import {useAppConfigStore, useFilesStore, useFileStore, useProjectStore, useWizardStore} from "../api/ProjectStore"; -import {DashboardTab} from "./dashboard/DashboardTab"; import {TraceTab} from "./trace/TraceTab"; import {ProjectBuildTab} from "./builder/ProjectBuildTab"; import {ProjectService} from "../api/ProjectService"; @@ -102,7 +101,6 @@ export function ProjectPanel() { <PageSection isFilled padding={{default: 'noPadding'}} className="scrollable-in"> <Flex direction={{default: "column"}} spaceItems={{default: "spaceItemsNone"}}> {tab === 'files' && <FlexItem><FilesTab/></FlexItem>} - {!buildIn && tab === 'dashboard' && project && <FlexItem><DashboardTab/></FlexItem>} {!buildIn && tab === 'trace' && project && <TraceTab/>} {!buildIn && tab === 'build' && <FlexItem><ProjectBuildTab/></FlexItem>} {!buildIn && tab === 'build' && config.infrastructure !== 'kubernetes' && diff --git a/karavan-app/src/main/webui/src/services/ServicesPage.tsx b/karavan-app/src/main/webui/src/services/ServicesPage.tsx index 4c073e14..835f8893 100644 --- a/karavan-app/src/main/webui/src/services/ServicesPage.tsx +++ b/karavan-app/src/main/webui/src/services/ServicesPage.tsx @@ -33,13 +33,13 @@ import { import '../designer/karavan.css'; import RefreshIcon from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; import { - Td, - Th, - Thead, - Tr + Td, + Th, + Thead, + Tr } from '@patternfly/react-table'; import { - Table + Table } from '@patternfly/react-table/deprecated'; import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; import {ServicesTableRow} from "./ServicesTableRow"; @@ -68,8 +68,8 @@ export function ServicesPage () { }, []); function getServices() { - KaravanApi.getFiles(ProjectType.configuration.toString(), files => { - const file = files.filter(f => f.name === 'devservices.docker-compose.yaml').at(0); + KaravanApi.getFiles(ProjectType.services.toString(), files => { + const file = files.filter(f => f.name === 'docker-compose.yaml').at(0); if (file) { const services: DockerCompose = ServicesYaml.yamlToServices(file.code); setServices(services);