Skip to content

Commit

Permalink
fix(*):1. 解决冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
jie@apache.org committed Jun 12, 2024
1 parent bb0c24d commit 65294ce
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 82 deletions.
117 changes: 68 additions & 49 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -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: <Navigate to="home" replace />
},
{ path: 'home', element: <Home /> },
{
path: 'clusters',
element: <Clusters />,
children: [
{ path: 'clusters', element: <Clusters /> },
{
path: ':clusterId',
children: [
{
path: '*',
element: <Navigate to="home" replace />
},
{ path: 'overview', element: <ClusterOverView /> },
{ path: 'runtime', element: <ClusterRuntime /> },
{ path: 'topic', element: <ClusterTopic /> },
{ path: 'connection', element: <ClusterConnection /> },
{ path: 'message', element: <ClusterMessage /> },
{ path: 'security', element: <ClusterSecurity /> }
]
}
]
},
{ path: 'settings', element: <Settings /> },
{ path: 'users', element: <Users /> },
{ path: 'logs', element: <Logs /> }
])
}

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
55 changes: 22 additions & 33 deletions eventmesh-dashboard-view/src/routes/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <Navigate to="home" replace />
},
{ path: 'home', element: <Home /> },
{
path: 'clusters',
element: <Clusters />,
path: '/',
element: <RootLayout />,
children: [
{ path: 'clusters', element: <Clusters /> },
{
path: ':clusterId',
children: [
{
path: '*',
element: <Navigate to="home" replace />
},
{ path: 'overview', element: <ClusterOverView /> },
{ path: 'runtime', element: <ClusterRuntime /> },
{ path: 'topic', element: <ClusterTopic /> },
{ path: 'connection', element: <ClusterConnection /> },
{ path: 'message', element: <ClusterMessage /> },
{ path: 'security', element: <ClusterSecurity /> }
]
}
path: '*',
element: <Navigate to="/home" replace />
},
{ path: '', element: <Navigate to="/home" /> },
{ path: 'home', element: <Home /> },
{ path: 'runtime', element: <Runtime /> },
{ path: 'topic', element: <Topic /> },
{ path: 'connection', element: <Connection /> },
{ path: 'message', element: <Message /> },
{ path: 'security', element: <Security /> },
{ path: 'settings', element: <Settings /> },
{ path: 'users', element: <Users /> },
{ path: 'logs', element: <Logs /> }
]
},
{ path: 'settings', element: <Settings /> },
{ path: 'users', element: <Users /> },
{ path: 'logs', element: <Logs /> }
}
])
}

Expand Down

0 comments on commit 65294ce

Please sign in to comment.