Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a655c6d
adjust the component's main file name
FU-design Jul 14, 2025
7caf1c9
split the source into service and dependency
FU-design Jul 14, 2025
4659c26
add set new address page for set source
FU-design Jul 15, 2025
e81d4a9
remove invalid code
FU-design Jul 15, 2025
68ab0e1
fix CI
FU-design Jul 15, 2025
2e4d3ca
add FormBuilder component
FU-design Jul 17, 2025
fa3aa22
replace auto-form with form-builder
FU-design Jul 18, 2025
199f478
fix ci
FU-design Jul 18, 2025
3376323
bug fix
FU-design Jul 21, 2025
f36b29b
set the default rows for the textarea
FU-design Jul 22, 2025
b6e09f3
merge code
FU-design Jul 22, 2025
519acfd
add unit test for FormBuilder
FU-design Jul 22, 2025
3b33772
add unit test for FormBuilder
FU-design Jul 22, 2025
ff23864
ensure stack is retrieved on page refresh
FU-design Jul 22, 2025
3125e45
bump vite from 5.4.0 to 5.4.19
FU-design Jul 22, 2025
9f032e1
bump vue-i18n from 11.1.5 to 11.1.10
FU-design Jul 22, 2025
e8bc5d5
bump vue-tsc from ^1.8.5 to ^3.0.3
FU-design Jul 22, 2025
75c2f82
bump typescript from ^5.0.2 to ^5.8.3
FU-design Jul 22, 2025
27dadbb
add secondary confirmation before executing commands
FU-design Jul 23, 2025
e0fc569
add secondary confirmation before executing commands
FU-design Jul 23, 2025
4ba231b
fix bug in filtering service configs
FU-design Jul 24, 2025
ba53b52
bugfix
FU-design Jul 28, 2025
5619918
fix test
FU-design Jul 28, 2025
274bc48
fix import
FU-design Jul 28, 2025
868ba2b
reduce payload when updating component config in service
FU-design Jul 29, 2025
8884932
simplify useSteps composable
FU-design Jul 29, 2025
7155559
reduce payload when updating component config in service
FU-design Jul 29, 2025
eee2025
bugfix
FU-design Jul 30, 2025
7b91ef3
merge code
FU-design Jul 31, 2025
20155c4
merge code
FU-design Aug 6, 2025
50ffe7e
add unplugin-image-manifest to manage .png file
FU-design Aug 6, 2025
ab26cc3
run image map generation before build and dev
FU-design Aug 7, 2025
26348f2
remove unused file
FU-design Aug 7, 2025
6782506
update README.md file
FU-design Aug 7, 2025
24ceab8
change vite config
FU-design Aug 7, 2025
12923ff
change vite config
FU-design Aug 7, 2025
ba57287
unit for composables
FU-design Aug 7, 2025
67f8546
unit for composables
FU-design Aug 7, 2025
8ccdbeb
unit for composables
FU-design Aug 7, 2025
3587428
merge code
FU-design Aug 15, 2025
fa7b532
remove cli
FU-design Aug 15, 2025
9469a13
upgrade ESLint from v8 to v9
FU-design Aug 15, 2025
6119199
remove ImageManifest vite plugin
FU-design Aug 15, 2025
83fcceb
remove unused file
FU-design Aug 15, 2025
1e2da88
resolve scss warn
FU-design Aug 15, 2025
0d161b9
add license header for use-chart.test
FU-design Aug 15, 2025
5dc4aee
update README.md
FU-design Aug 18, 2025
e14a7c7
bug fix
FU-design Aug 18, 2025
507b737
fix header select
FU-design Aug 25, 2025
68935c3
add retry for last job on job page
FU-design Aug 25, 2025
cdd3feb
bug fix
FU-design Aug 26, 2025
b9aff8b
Merge remote-tracking branch 'origin/main' into bigtop-ui-feature
FU-design Aug 26, 2025
1551ff5
bugfix
FU-design Aug 26, 2025
0f95150
bugfix
FU-design Aug 26, 2025
eaf8a66
Merge remote-tracking branch 'origin/main' into bigtop-ui-feature
FU-design Aug 27, 2025
bdf79ed
fix ts config
FU-design Aug 29, 2025
ea21c24
merge code
FU-design Aug 29, 2025
b3f0139
Merge remote-tracking branch 'origin/main' into bigtop-ui-feature
FU-design Sep 4, 2025
6254289
add 'remove service' operate for Service
FU-design Sep 4, 2025
3ef743e
fix tsconfig.json
FU-design Sep 9, 2025
7197c1b
add operation for host
FU-design Sep 9, 2025
f15944c
update locales for host
FU-design Sep 10, 2025
e57a6e3
bugfix
FU-design Sep 10, 2025
654ae1e
bugfix
FU-design Sep 10, 2025
32af3d6
bugfix
FU-design Sep 11, 2025
946f45a
merge code
FU-design Sep 15, 2025
3537993
bugfix
FU-design Sep 16, 2025
1e6275e
merge code
FU-design Sep 16, 2025
a8e09f8
bugfix
FU-design Sep 25, 2025
040a2f5
Remove confirm modal async loading
FU-design Sep 26, 2025
6baf8a7
Add use-tab-state and tab-state store to manage tab state
FU-design Sep 26, 2025
a6e488f
bugfix
FU-design Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 27 additions & 43 deletions bigtop-manager-ui/src/api/host/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,66 +17,50 @@
* under the License.
*/

import request from '@/api/request.ts'
import type { HostListParams, HostParams, HostVO, HostVOList, InstalledStatusVO } from '@/api/host/types'
import type { ComponentVO } from '@/api/component/types.ts'
import { get, post, del, put } from '@/api/request-util'

export const getHosts = (params?: HostListParams): Promise<HostVOList> => {
return request({
method: 'get',
url: '/hosts',
params
})
export const getHosts = (params?: HostListParams) => {
return get<HostVOList>('/hosts', params)
}
export const getHost = (pathParams: { id: number }): Promise<HostVO> => {
return request({
method: 'get',
url: `/hosts/${pathParams.id}`
})

export const getHost = (pathParams: { id: number }) => {
return get<HostVO>(`/hosts/${pathParams.id}`)
}

export const addHost = (data: HostParams): Promise<HostVO> => {
return request({
method: 'post',
url: '/hosts',
data
})
return post<HostVO>('/hosts', data)
}

export const installDependencies = (data: HostParams) => {
return request({
method: 'post',
url: '/hosts/install-dependencies',
data
})
return post('/hosts/install-dependencies', data)
}

export const getInstalledStatus = (): Promise<InstalledStatusVO[]> => {
return request({
method: 'get',
url: '/hosts/installed-status'
})
export const getInstalledStatus = () => {
return get<InstalledStatusVO[]>('/hosts/installed-status')
}

export const updateHost = (data: HostParams): Promise<HostVO[]> => {
return request({
method: 'put',
url: `/hosts/${data.id}`,
data
})
export const updateHost = (data: HostParams) => {
return put<HostVO[]>(`/hosts/${data.id}`, data)
}

export const removeHost = (data: { ids: number[] }): Promise<boolean> => {
return request({
method: 'delete',
url: '/hosts/batch',
data
})
export const removeHost = (data: { ids: number[] }) => {
return del<boolean>('/hosts/batch', { data })
}

export const getComponentsByHost = (pathParams: { id: number }): Promise<ComponentVO[]> => {
return request({
method: 'get',
url: `/hosts/${pathParams.id}/components`
})
return get<ComponentVO[]>(`/hosts/${pathParams.id}/components`)
}

export const startAgent = (pathParams: { id: number }) => {
return post<boolean>(`/hosts/${pathParams.id}/start-agent`)
}

export const restartAgent = (pathParams: { id: number }) => {
return post<boolean>(`/hosts/${pathParams.id}/restart-agent`)
}

export const stopAgent = (pathParams: { id: number }) => {
return post<boolean>(`/hosts/${pathParams.id}/stop-agent`)
}
57 changes: 57 additions & 0 deletions bigtop-manager-ui/src/composables/use-modal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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
*
* https://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 SvgIcon from '@/components/base/svg-icon/index.vue'
import { Modal, ModalFuncProps } from 'ant-design-vue'

interface ConfirmModalProps extends ModalFuncProps {
tipText?: string
}

const DEFAULT_STYLE = { top: '30vh' }

export const useModal = () => {
function confirmModal({ tipText, onOk, ...rest }: ConfirmModalProps) {
return Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('p', tipText ?? '')
]),
style: DEFAULT_STYLE,
icon: null,
...rest,
onOk: async () => {
try {
if (onOk) {
await onOk()
}
} catch (e) {
console.error('Modal onOk error:', e)
}
return Promise.resolve()
}
})
}

return {
confirmModal,
destroyAllModal: Modal.destroyAll
}
}
44 changes: 44 additions & 0 deletions bigtop-manager-ui/src/composables/use-tab-state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* 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
*
* https://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 { useTabStore } from '@/store/tab-state'

/**
* Combined functions that manage tab state
* @param pageKey Page unique identifier
* @param defaultIndex The default selected tab
*/
export function useTabState(pageKey: string, defaultIndex = '0') {
const route = useRoute()
const tabStore = useTabStore()

const activeTab = ref(defaultIndex)

// Initialize tabIndex: Preferred from URL query, followed by store
onMounted(() => {
const queryTab = route.query.tab as string
activeTab.value = queryTab ?? tabStore.getActiveTab(pageKey) ?? activeTab.value
})

watch(activeTab, (val) => {
tabStore.setActiveTab(pageKey, val)
})

return { activeTab }
}
15 changes: 4 additions & 11 deletions bigtop-manager-ui/src/features/ai-assistant/chat-history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
import { useAiChatStore } from '@/store/ai-assistant'
import { formatTime } from '@/utils/transform'
import { EllipsisOutlined } from '@ant-design/icons-vue'
import { message, Modal, Empty } from 'ant-design-vue'

import SvgIcon from '@/components/base/svg-icon/index.vue'
import { message, Empty } from 'ant-design-vue'

import type { ChatThread, ThreadId } from '@/api/ai-assistant/types'

Expand All @@ -39,6 +37,7 @@
type ThreadOperationHandler = Record<'delete' | 'rename', (thread: ChatThread, idx: number) => void>

const { t } = useI18n()
const { confirmModal } = useModal()
const aiChatStore = useAiChatStore()
const { threads, currThread, threadLimit } = storeToRefs(aiChatStore)
const props = defineProps<Props>()
Expand Down Expand Up @@ -100,14 +99,8 @@
}

const handleDeleteConfirm = (thread: ChatThread, idx: number) => {
Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('p', t('common.delete_msg'))
]),
style: { top: '30vh' },
icon: null,
confirmModal({
tipText: t('common.delete_msg'),
async onOk() {
const success = await aiChatStore.deleteChatThread(thread)
if (success) {
Expand Down
11 changes: 3 additions & 8 deletions bigtop-manager-ui/src/features/create-cluster/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import { getInstalledStatus, installDependencies } from '@/api/host'
import { execCommand } from '@/api/command'

import SvgIcon from '@/components/base/svg-icon/index.vue'

import ClusterBase from './components/cluster-base.vue'
import ComponentInfo from './components/component-info.vue'
import HostManage from './components/host-manage.vue'
Expand All @@ -34,6 +32,7 @@
import type { ClusterCommandReq, CommandRequest, CommandVO, HostReq } from '@/api/command/types'

const { t } = useI18n()
const { confirmModal } = useModal()
const menuStore = useMenuStore()

const compRef = ref<any>()
Expand Down Expand Up @@ -201,12 +200,8 @@

onBeforeRouteLeave((_to, _from, next) => {
if (current.value === stepsLimit.value && !isDone.value) {
Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('span', t('common.exit_confirm'))
]),
confirmModal({
tipText: t('common.exit_confirm'),
content: h('div', { style: { paddingLeft: '36px' } }, t('common.installing_exit_confirm_content')),
cancelText: t('common.no'),
style: { top: '30vh' },
Expand Down
11 changes: 4 additions & 7 deletions bigtop-manager-ui/src/features/create-service/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
import ComponentAssigner from './components/component-assigner.vue'
import ServiceConfigurator from './components/service-configurator.vue'
import ComponentInstaller from './components/component-installer.vue'
import SvgIcon from '@/components/base/svg-icon/index.vue'

const { t } = useI18n()
const { confirmModal } = useModal()

const route = useRoute()
const createStore = useCreateServiceStore()
const { current, stepsLimit, stepContext, selectedServices, createdPayload } = storeToRefs(createStore)
Expand Down Expand Up @@ -136,12 +137,8 @@

onBeforeRouteLeave((_to, _from, next) => {
if (current.value === stepsLimit.value && !isDone.value) {
Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('span', t('common.exit_confirm'))
]),
confirmModal({
tipText: t('common.exit_confirm'),
content: h('div', { style: { paddingLeft: '36px' } }, t('common.installing_exit_confirm_content')),
cancelText: t('common.no'),
style: { top: '30vh' },
Expand Down
15 changes: 5 additions & 10 deletions bigtop-manager-ui/src/features/job/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
-->

<script setup lang="ts">
import { Modal, TableColumnType, TableProps } from 'ant-design-vue'
import { TableColumnType, TableProps } from 'ant-design-vue'
import { getJobList, getStageList, getTaskList, retryJob } from '@/api/job'

import SvgIcon from '@/components/base/svg-icon/index.vue'
import LogsView, { type LogViewProps } from '@/features/log-view/index.vue'

import type { JobVO, StageVO, StateType, TaskListParams, TaskVO } from '@/api/job/types'
Expand All @@ -36,6 +35,8 @@

const POLLING_INTERVAL = 3000
const { t } = useI18n()
const { confirmModal } = useModal()

const clusterInfo = useAttrs() as ClusterVO
const pollingIntervalId = ref<any>(null)
const breadcrumbs = ref<BreadcrumbItem[]>([
Expand Down Expand Up @@ -227,14 +228,8 @@
}

const onRetry = (row: JobVO | StageVO | TaskVO) => {
Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('p', t('job.retry'))
]),
style: { top: '30vh' },
icon: null,
confirmModal({
tipText: t('job.retry'),
async onOk() {
try {
const state = await retryJob({ jobId: row.id!, clusterId: clusterInfo.id! })
Expand Down
16 changes: 6 additions & 10 deletions bigtop-manager-ui/src/features/service-management/components.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
-->

<script setup lang="ts">
import { message, Modal, type TableColumnType, type TableProps } from 'ant-design-vue'
import { message, type TableColumnType, type TableProps } from 'ant-design-vue'
import { deleteComponent, getComponents } from '@/api/component'
import { useStackStore } from '@/store/stack'
import { useJobProgress } from '@/store/job-progress'
import SvgIcon from '@/components/base/svg-icon/index.vue'

import type { GroupItem } from '@/components/common/button-group/types'
import type { ComponentVO } from '@/api/component/types'
Expand All @@ -39,7 +38,10 @@
}

const POLLING_INTERVAL = 3000

const { t } = useI18n()
const { confirmModal } = useModal()

const jobProgressStore = useJobProgress()
const stackStore = useStackStore()
const route = useRoute()
Expand Down Expand Up @@ -245,14 +247,8 @@
}

const handleDelete = async (row: ComponentVO) => {
Modal.confirm({
title: () =>
h('div', { style: { display: 'flex' } }, [
h(SvgIcon, { name: 'unknown', style: { width: '24px', height: '24px' } }),
h('p', t('common.delete_msg'))
]),
style: { top: '30vh' },
icon: null,
confirmModal({
tipText: t('common.delete_msg'),
async onOk() {
try {
const data = await deleteComponent({ clusterId: attrs.clusterId, id: row.id! })
Expand Down
Loading
Loading