From 58a42e3a4bea1390a0426db5c6627ab0f3c71b9a Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 18:23:31 +0800 Subject: [PATCH 1/8] [Core] [Metadata] Add new insert row configuration --- core/datacap-web/src/fontawesome.ts | 2 ++ .../src/i18n/langs/en/source/manager.ts | 1 + .../src/i18n/langs/zhCn/source/manager.ts | 3 ++- .../admin/source/components/TableData.vue | 25 +++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/core/datacap-web/src/fontawesome.ts b/core/datacap-web/src/fontawesome.ts index 8ac1028bb8..38ec741667 100644 --- a/core/datacap-web/src/fontawesome.ts +++ b/core/datacap-web/src/fontawesome.ts @@ -23,6 +23,7 @@ import { faKey, faMagnifyingGlass, faMinus, + faPlus, faRepeat, faSun, faTable, @@ -39,6 +40,7 @@ import { */ const createIcons = (app: any) => { library.add(faArrowRight, + faPlus, faTablet, faMinus, faUpload, diff --git a/core/datacap-web/src/i18n/langs/en/source/manager.ts b/core/datacap-web/src/i18n/langs/en/source/manager.ts index 7e18f917f9..a9c0c484c8 100644 --- a/core/datacap-web/src/i18n/langs/en/source/manager.ts +++ b/core/datacap-web/src/i18n/langs/en/source/manager.ts @@ -9,4 +9,5 @@ export default { resetTo: 'Reset To', filter: 'Filter', addFilter: 'Add Filter', + addRows: 'Add Rows', } diff --git a/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts b/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts index 59c1778b89..ac269bb290 100644 --- a/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts +++ b/core/datacap-web/src/i18n/langs/zhCn/source/manager.ts @@ -8,5 +8,6 @@ export default { resetAutoIncrement: '重置自增列', resetTo: '重置为', filter: '筛选器', - addFilter: '添加筛选器' + addFilter: '添加筛选器', + addRows: '添加行', } diff --git a/core/datacap-web/src/views/admin/source/components/TableData.vue b/core/datacap-web/src/views/admin/source/components/TableData.vue index 53bce4d8b5..a8de51607e 100644 --- a/core/datacap-web/src/views/admin/source/components/TableData.vue +++ b/core/datacap-web/src/views/admin/source/components/TableData.vue @@ -76,10 +76,20 @@ {{ $t('common.row') }} + + + @@ -108,6 +120,7 @@ placement="bottom-end" transfer> @@ -116,6 +129,7 @@ placement="bottom-end" transfer> @@ -225,6 +239,7 @@ export default defineComponent({ gridApi: null as GridApi, gridColumnApi: null as ColumnApi, originalColumns: [], + newRows: [], configure: { headers: [], columns: [], @@ -425,6 +440,16 @@ export default defineComponent({ { this.filterConfigure.configure = value; }, + handlerAddRow() + { + const newData = {}; + this.originalColumns.forEach((column: { field: string; }) => { + newData[column.field] = null; + }); + this.configure.datasets.push(newData); + this.newRows.push(newData); + this.gridApi.setRowData(this.configure.datasets); + }, getSortConfigure(configure: TableFilter) { const columnState = this.gridColumnApi.getColumnState(); From ccaf86db375245cbfd608cbe9ae1156ab9171cc7 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 21:49:54 +0800 Subject: [PATCH 2/8] test --- .github/workflows/publish-maven.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/publish-maven.yml diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml new file mode 100644 index 0000000000..f41f07c1a2 --- /dev/null +++ b/.github/workflows/publish-maven.yml @@ -0,0 +1,41 @@ +name: Publish package to the Maven Central Repository and GitHub Packages + +on: + push + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish to the Maven Central Repository + run: | + chmod 755 ./mvnw + ./mvnw clean install package -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + - name: Set up Java for publishing to GitHub Packages + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Publish to GitHub Packages + run: | + chmod 755 ./mvnw + ./mvnw clean install package -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1fb463e402861a6f46f0477f3834ee0775ad171f Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 21:54:38 +0800 Subject: [PATCH 3/8] d --- .github/workflows/publish-maven.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index f41f07c1a2..ada5db7dab 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -4,13 +4,11 @@ on: push jobs: - publish: + publish-github-package: runs-on: ubuntu-latest - permissions: contents: read packages: write - steps: - uses: actions/checkout@v4 - name: Set up Java for publishing to Maven Central Repository @@ -24,10 +22,18 @@ jobs: - name: Publish to the Maven Central Repository run: | chmod 755 ./mvnw - ./mvnw clean install package -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + + publish-github-package: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v3 with: @@ -36,6 +42,6 @@ jobs: - name: Publish to GitHub Packages run: | chmod 755 ./mvnw - ./mvnw clean install package -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 9f0250291000098bdbb9fe1fe39b39d143ce6692 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 21:55:18 +0800 Subject: [PATCH 4/8] ffas --- .github/workflows/publish-maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index ada5db7dab..9fd0f81a48 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -4,7 +4,7 @@ on: push jobs: - publish-github-package: + publish-maven-central: runs-on: ubuntu-latest permissions: contents: read From 94234b9af3b573938da023339ad51cec07bc1042 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 22:15:34 +0800 Subject: [PATCH 5/8] fsdf --- .github/workflows/publish-maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index 9fd0f81a48..b733714023 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -44,4 +44,4 @@ jobs: chmod 755 ./mvnw ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} From e6ea6bc4464251713dde00a489d568060c5ae086 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 22:45:51 +0800 Subject: [PATCH 6/8] test --- .github/workflows/publish-maven.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index b733714023..f9698613bf 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -20,12 +20,13 @@ jobs: server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish to the Maven Central Repository - run: | - chmod 755 ./mvnw - ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + uses: samuelmeuli/action-maven-publish@v1 + with: + maven_args: '-DskipTests' + gpg_private_key: ${{ secrets.GPG_SECRET }} + gpg_passphrase: ${{ secrets.GPG_PASSWORD }} + nexus_username: ${{ secrets.OSSRH_USERNAME }} + nexus_password: ${{ secrets.OSSRH_TOKEN }} publish-github-package: runs-on: ubuntu-latest From 0154926f05a2c0e401bbaf545f5f4cf0bd7c1b85 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 22:50:36 +0800 Subject: [PATCH 7/8] fd --- .github/workflows/publish-maven.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index f9698613bf..1c8dfabcec 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -5,20 +5,17 @@ on: jobs: publish-maven-central: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write + runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v4 - - name: Set up Java for publishing to Maven Central Repository - uses: actions/setup-java@v3 + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Install Java and Maven + uses: actions/setup-java@v1 with: java-version: '11' distribution: 'temurin' - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD + - name: Publish to the Maven Central Repository uses: samuelmeuli/action-maven-publish@v1 with: From 715c3ed8af4d242ae7926d5b15f85dafa8dd3026 Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Sat, 18 Nov 2023 22:55:20 +0800 Subject: [PATCH 8/8] 001 --- .github/workflows/publish-maven.yml | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index 1c8dfabcec..dc91f47871 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -25,21 +25,21 @@ jobs: nexus_username: ${{ secrets.OSSRH_USERNAME }} nexus_password: ${{ secrets.OSSRH_TOKEN }} - publish-github-package: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - uses: actions/checkout@v4 - - name: Set up Java for publishing to GitHub Packages - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - - name: Publish to GitHub Packages - run: | - chmod 755 ./mvnw - ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + # publish-github-package: + # runs-on: ubuntu-latest + # permissions: + # contents: read + # packages: write + # steps: + # - uses: actions/checkout@v4 + # - name: Set up Java for publishing to GitHub Packages + # uses: actions/setup-java@v3 + # with: + # java-version: '11' + # distribution: 'temurin' + # - name: Publish to GitHub Packages + # run: | + # chmod 755 ./mvnw + # ./mvnw clean install package deploy -Dfindbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true + # env: + # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}