This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new c90b1a849 feat(config-ui): add api link in layout header (#5061)
c90b1a849 is described below

commit c90b1a8493394198775882c5faf03a89360ae432
Author: 青湛 <[email protected]>
AuthorDate: Fri Apr 28 20:01:19 2023 +0800

    feat(config-ui): add api link in layout header (#5061)
---
 config-ui/src/images/icons/api.svg  | 40 +++++++++++++++++++++++++++++++++++++
 config-ui/src/layouts/base/base.tsx |  6 ++++++
 2 files changed, 46 insertions(+)

diff --git a/config-ui/src/images/icons/api.svg 
b/config-ui/src/images/icons/api.svg
new file mode 100644
index 000000000..c14e47f7e
--- /dev/null
+++ b/config-ui/src/images/icons/api.svg
@@ -0,0 +1,40 @@
+<!--
+This icon is from Feather Icons with the MIT license: https://feathericons.com/
+
+The MIT License (MIT)
+
+Copyright (c) 2013-2017 Cole Bemis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+-->
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" 
xmlns="http://www.w3.org/2000/svg";>
+  <g clip-path="url(#clip0_5084_38297)">
+    <path fill-rule="evenodd" clip-rule="evenodd"
+      d="M18.9226 2.25609C19.248 1.93065 19.248 1.40301 18.9226 
1.07757C18.5972 0.752137 18.0695 0.752137 17.7441 1.07757L15.9642 
2.85751C14.9624 2.17567 13.8602 2.05942 12.9132 2.20291C11.8016 2.37132 10.8226 
2.90638 10.3365 3.39248L8.94761 4.78135C8.62217 5.10679 8.62217 5.63443 8.94761 
5.95986L14.0402 11.0525C14.1965 11.2087 14.4084 11.2965 14.6295 11.2965C14.8505 
11.2965 15.0624 11.2087 15.2187 11.0525L16.6076 9.66354C17.0937 9.17746 17.6287 
8.19843 17.7971 7.08686C17.9406 6.13987 17 [...]
+      fill="#7497F7" />
+    <path fill-rule="evenodd" clip-rule="evenodd"
+      d="M5.37024 8.70381C5.59125 8.70381 5.80322 8.79161 5.9595 
8.94789L6.29626 9.28466L7.5589 8.02202C7.88434 7.69658 8.41197 7.69658 8.73741 
8.02202C9.06285 8.34746 9.06285 8.87509 8.73741 9.20053L7.47477 10.4632L9.53691 
12.5253L10.7995 11.2627C11.1249 10.9373 11.6525 10.9373 11.978 11.2627C12.3034 
11.5882 12.3034 12.1158 11.978 12.4413L10.7154 13.7038L11.0521 14.0405C11.3775 
14.3659 11.3775 14.8936 11.0521 15.219L9.66322 16.6079C9.17713 17.094 8.19807 
17.629 7.08651 17.7974C6.1395 17 [...]
+      fill="#7497F7" />
+  </g>
+  <defs>
+    <clipPath id="clip0_5084_38297">
+      <rect width="20" height="20" fill="white" />
+    </clipPath>
+  </defs>
+</svg>
\ No newline at end of file
diff --git a/config-ui/src/layouts/base/base.tsx 
b/config-ui/src/layouts/base/base.tsx
index 670e5746a..5ee3cfa43 100644
--- a/config-ui/src/layouts/base/base.tsx
+++ b/config-ui/src/layouts/base/base.tsx
@@ -26,6 +26,7 @@ import { history } from '@/utils/history';
 
 import DashboardIcon from '@/images/icons/dashborad.svg';
 import FileIcon from '@/images/icons/file.svg';
+import APIIcon from '@/images/icons/api.svg';
 import GitHubIcon from '@/images/icons/github.svg';
 import SlackIcon from '@/images/icons/slack.svg';
 
@@ -126,6 +127,11 @@ export const BaseLayout = ({ children }: Props) => {
               <span>Docs</span>
             </a>
             <Navbar.Divider />
+            <ExternalLink link="/api/swagger/index.html">
+              <img src={APIIcon} alt="api" />
+              <span>API</span>
+            </ExternalLink>
+            <Navbar.Divider />
             <a
               href="https://github.com/apache/incubator-devlake";
               rel="noreferrer"

Reply via email to