Projects STRLCPY SeaMoon Commits 1ab286d5
🤬
  • ■ ■ ■ ■ ■
    .github/workflows/build.yml
    skipped 10 lines
    11 11   build:
    12 12   runs-on: ubuntu-latest
    13 13   steps:
    14  - - name: Clone seamoon-web repository
    15  - uses: actions/checkout@v4
    16  - with:
    17  - repository: 'DVKunion/seamoon-web'
    18  - ref: 'main' # Or any other branch or tag you want to checkout
    19 14   - name: Set up Node.js
    20 15   uses: actions/setup-node@v4
    21 16   with:
    22 17   node-version: '20'
    23 18   - name: Install dependencies
    24 19   run: |
    25  - npm install
     20 + cd web && npm install
    26 21   - name: Build Front
    27 22   run: |
    28  - npm run build
    29  - cp -r dist /tmp
     23 + cd web && npm install && npm run build && cp -r dist ../cmd/client/static
    30 24   - uses: actions/checkout@v4
    31 25   - name: Set up Go
    32 26   uses: actions/setup-go@v5
    skipped 1 lines
    34 28   go-version: 1.21
    35 29   - name: Build
    36 30   run: |
    37  - cp -r /tmp/dist cmd/client/static
    38 31   go mod tidy
    39 32   go build -o seamoon -v --ldflags "-s -w -X github.com/DVKunion/SeaMoon/pkg/system/xlog.Version=${{github.ref_name}} -X github.com/DVKunion/SeaMoon/pkg/system/xlog.Commit=${{github.sha}}" cmd/main.go
    40 33   - uses: actions/upload-artifact@v4
    skipped 2 lines
  • ■ ■ ■ ■ ■
    .gitignore
    skipped 23 lines
    24 24  *.sql
    25 25   
    26 26  cmd/client/static/dist/*
     27 +.umi/
    27 28  *.log
    28 29  *.toml
    29 30  .config
    skipped 6 lines
  • ■ ■ ■ ■ ■ ■
    Dockerfile
    1 1  # build stage
     2 +FROM node:20 as front
     3 +COPY .. /src
     4 +WORKDIR /src/web
     5 +RUN npm run build
     6 + 
    2 7  FROM golang:alpine AS build
    3 8  ARG VERSION
    4 9  ARG SHA
    skipped 2 lines
    7 12  ENV CGO_ENABLED 0
    8 13  ENV VERSION=${VERSION}
    9 14  ENV SHA=${SHA}
     15 +COPY --from=front /src/web/dist /src/cmd/client/static
    10 16  #COPY ./seamoon /tmp/seamoon
    11 17  RUN go build -v -ldflags "-X github.com/DVKunion/SeaMoon/system/xlog.Version=${VERSION} -X github.com/DVKunion/SeaMoon/system/xlog.Commit=${SHA}" -o /tmp/seamoon cmd/main.go
    12 18  RUN chmod +x /tmp/seamoon
    skipped 14 lines
  • ■ ■ ■ ■ ■
    web/src/pages/provider/components/DetailDrawer.tsx
    skipped 1 lines
    2 2  import type {ProDescriptionsActionType} from '@ant-design/pro-components';
    3 3  import {ProDescriptions} from '@ant-design/pro-components';
    4 4  import {FormValueType} from "./CreateForm";
    5  -import {Button, Divider, Drawer, Popconfirm, Space, Tag, Tooltip} from "antd";
     5 +import {Button, Divider, Drawer, Popconfirm, Space, Tag, Tooltip, Badge} from "antd";
    6 6  import {CloudProviderStatusEnum, CloudProvideTypeValueEnum, RegionEnum} from "@/enum/cloud";
    7 7  import {AuthColumns, CloudRegionSelector} from "@/pages/provider/components/AuthForm";
    8 8  import {SyncOutlined} from "@ant-design/icons";
    9  -import {Badge} from "[email protected]@antd";
    10 9   
    11 10  export type DetailProps = {
    12 11   onCancel: () => void;
    skipped 190 lines
  • ■ ■ ■ ■ ■
    web/src/pages/provider/index.tsx
    1 1  import React, {useRef, useState} from "react";
    2 2  import {PageContainer, ProTable, ActionType, ProColumns} from "@ant-design/pro-components";
    3  -import {Button, Popconfirm} from "antd";
     3 +import {Button, Popconfirm, Badge, Tooltip} from "antd";
    4 4  import {PlusOutlined} from "@ant-design/icons";
    5 5  import {getCloudProvider} from "@/services/cloud/api";
    6 6  import {handleCreateCloud, handleDeleteCloud, handleSyncCloud, handleUpdateCloud} from './handle';
    7 7  import {CloudProvideTypeEnum, CloudProviderStatusEnum} from "@/enum/cloud";
    8 8  import CreateForm from './components/CreateForm';
    9 9  import DetailDrawer from "./components/DetailDrawer";
    10  -import {Badge, Tooltip} from "[email protected]@antd";
    11 10   
    12 11  const Provider: React.FC = () => {
    13 12   
    skipped 197 lines
Please wait...
Page is in error, reload to recover