diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2f36afd9..9526fa63 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,50 +1,69 @@ -# -# 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. -# -name: Docker -on: - push: - tags: - - 'v*' + /* + * 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 from 'react' + import { useRoutes, Navigate } from 'react-router-dom' + import Home from './home/Home' + import ClusterOverView from './cluster/overview/Overview' + import ClusterTopic from './cluster/topic/Topic' + import ClusterRuntime from './cluster/runtime/Runtime' + import ClusterConnection from './cluster/connection/Connection' + import ClusterMessage from './cluster/message/Message' + import ClusterSecurity from './cluster/security/Security' + import Users from './users/Users' + import Logs from './elogs/Logs' + import Settings from './settings/Settings' + import Clusters from './cluster/Clusters' + + const AppRoutes = () => { + return useRoutes([ + { + path: '*', + element: + }, + { path: 'home', element: }, + { + path: 'clusters', + element: , + children: [ + { path: 'clusters', element: }, + { + path: ':clusterId', + children: [ + { + path: '*', + element: + }, + { path: 'overview', element: }, + { path: 'runtime', element: }, + { path: 'topic', element: }, + { path: 'connection', element: }, + { path: 'message', element: }, + { path: 'security', element: } + ] + } + ] + }, + { path: 'settings', element: }, + { path: 'users', element: }, + { path: 'logs', element: } + ]) + } -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - apache/eventmesh-dashboard - - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - file: docker/Dockerfile - context: . + export default AppRoutes diff --git a/eventmesh-dashboard-view/src/routes/Routes.tsx b/eventmesh-dashboard-view/src/routes/Routes.tsx index d45927e7..c951105e 100644 --- a/eventmesh-dashboard-view/src/routes/Routes.tsx +++ b/eventmesh-dashboard-view/src/routes/Routes.tsx @@ -19,50 +19,39 @@ import React from 'react' import { useRoutes, Navigate } from 'react-router-dom' +import RootLayout from './RootLayout' import Home from './home/Home' -import ClusterOverView from './cluster/overview/Overview' -import ClusterTopic from './cluster/topic/Topic' -import ClusterRuntime from './cluster/runtime/Runtime' -import ClusterConnection from './cluster/connection/Connection' -import ClusterMessage from './cluster/message/Message' -import ClusterSecurity from './cluster/security/Security' +import Topic from './topic/Topic' +import Runtime from './runtime/Runtime' +import Connection from './connection/Connection' +import Message from './message/Message' +import Security from './security/Security' import Users from './users/Users' import Logs from './logs/Logs' import Settings from './settings/Settings' -import Clusters from './cluster/Clusters' const AppRoutes = () => { return useRoutes([ { - path: '*', - element: - }, - { path: 'home', element: }, - { - path: 'clusters', - element: , + path: '/', + element: , children: [ - { path: 'clusters', element: }, { - path: ':clusterId', - children: [ - { - path: '*', - element: - }, - { path: 'overview', element: }, - { path: 'runtime', element: }, - { path: 'topic', element: }, - { path: 'connection', element: }, - { path: 'message', element: }, - { path: 'security', element: } - ] - } + path: '*', + element: + }, + { path: '', element: }, + { path: 'home', element: }, + { path: 'runtime', element: }, + { path: 'topic', element: }, + { path: 'connection', element: }, + { path: 'message', element: }, + { path: 'security', element: }, + { path: 'settings', element: }, + { path: 'users', element: }, + { path: 'logs', element: } ] - }, - { path: 'settings', element: }, - { path: 'users', element: }, - { path: 'logs', element: } + } ]) }