diff --git a/.gitea/workflows/build_tool.yaml b/.gitea/workflows/build_tool.yaml index b3e046a..2c97f55 100644 --- a/.gitea/workflows/build_tool.yaml +++ b/.gitea/workflows/build_tool.yaml @@ -2,7 +2,7 @@ name: 构建上传工具 on: [ push ] jobs: - build: + build-tool: env: RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest diff --git a/.gitea/workflows/deploy-dev.yaml b/.gitea/workflows/deploy-dev.yaml index c777bb9..caeb5ed 100644 --- a/.gitea/workflows/deploy-dev.yaml +++ b/.gitea/workflows/deploy-dev.yaml @@ -2,7 +2,7 @@ name: 部署开发环境 on: [ push ] jobs: - build-and-deploy: + deploy-dev: env: RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest diff --git a/.gitea/workflows/deploy-production.yaml b/.gitea/workflows/deploy-production.yaml index d90b0ce..d5a674b 100644 --- a/.gitea/workflows/deploy-production.yaml +++ b/.gitea/workflows/deploy-production.yaml @@ -3,7 +3,7 @@ on: workflow_dispatch: jobs: - build-and-deploy: + deploy-production: env: RUNNER_TOOL_CACHE: /toolcache runs-on: ubuntu-latest diff --git a/web/src/views/TokenDetailView.vue b/web/src/views/TokenDetailView.vue index ddf057d..8fe740f 100644 --- a/web/src/views/TokenDetailView.vue +++ b/web/src/views/TokenDetailView.vue @@ -4,11 +4,18 @@ import {ref, watch} from 'vue' import axios from "@/axios.ts"; import {useRoute} from "vue-router" +interface optionsType { + value: string +} const route = useRoute() - const result = ref() const value = ref('') +const options = ref([] as optionsType[]) +value.value = useCounterStore().token +const deleteSpecifyRedisVisible = ref(false) +const inputSpecifyRedis = ref('') + const getInfo = () => { if (value.value != '') { @@ -53,12 +60,6 @@ watch(value, (newValue) => { getInfo() }) -interface optionsType { - value: string -} - -const options = ref([] as optionsType[]) -value.value = useCounterStore().token axios.get('/api/token').then(res => { if (res.status == 200) { @@ -68,9 +69,6 @@ axios.get('/api/token').then(res => { } }) -const deleteSpecifyRedisVisible = ref(false) -const inputSpecifyRedis = ref('') - const deleteSpecifyRedis = () => { axios.delete('/api/token/info', { params: { @@ -110,8 +108,8 @@ const deleteSpecifyRedis = () => { > {{ result?.dedup_object }} {{ result?.data_format }} - {{ result?.dedup_items_number }} - {{ result?.cache_list_number }} + {{ result?.dedup_items_number }} + {{ result?.cache_list_number }}

管理

diff --git a/web/src/views/TokenManageView.vue b/web/src/views/TokenManageView.vue index acfb7f8..089f2c8 100644 --- a/web/src/views/TokenManageView.vue +++ b/web/src/views/TokenManageView.vue @@ -6,13 +6,16 @@ import {useCounterStore} from "@/stores/counter.ts"; import {useRouter} from "vue-router"; const tableData = ref([]) - -axios.get("/api/token").then(res => { - tableData.value = res.data.result -}) - const input = ref('') const value = ref('') +const dataFormat = ref('') +const inputPassWord = ref('') +const router = useRouter() +var rowOut: any +const dedupObjectVisible = ref(false) +const dataFormatVisible = ref(false) +const inputNotes = ref("") +const NotesVisible = ref(false) const options = [ { value: 'uid', @@ -31,7 +34,6 @@ const options = [ } ] -const dataFormat = ref('') const dataFormatOptions = [ { value: 'uid----secid----pid----comment_id', @@ -40,6 +42,11 @@ const dataFormatOptions = [ } ] + +axios.get("/api/token").then(res => { + tableData.value = res.data.result +}) + const addToken = () => { axios.post('/api/token', {}, { params: { @@ -63,8 +70,6 @@ const addToken = () => { }) } - -const router = useRouter() const viewDetails = (row: any) => { useCounterStore().token = row.token router.push({ @@ -72,13 +77,11 @@ const viewDetails = (row: any) => { }) } -var rowOut: any - -const dedupObjectVisible = ref(false) const dialogDedupObjectVisible = (row: any) => { rowOut = row dedupObjectVisible.value = true } + const updateDedupObject = () => { dedupObjectVisible.value = false axios.put('/api/token', {}, { @@ -103,11 +106,11 @@ const updateDedupObject = () => { }) } -const dataFormatVisible = ref(false) const dialogDataFormatVisible = (row: any) => { rowOut = row dataFormatVisible.value = true } + const updateDataFormat = () => { dataFormatVisible.value = false axios.put('/api/token', {}, { @@ -132,12 +135,11 @@ const updateDataFormat = () => { }) } -const inputNotes = ref("") -const NotesVisible = ref(false) const dialogNotesVisible = (row: any) => { rowOut = row NotesVisible.value = true } + const updateNotes = () => { NotesVisible.value = false axios.put('/api/token', {}, { @@ -182,7 +184,6 @@ const deleteToken = (row: any) => { }) } -const inputPassWord = ref('') const checkPassword = () => { if (inputPassWord.value == "haha") { ElMessage({