MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / openLogsModal

Function openLogsModal

frontend/packages/core/src/pages/system/SystemList.tsx:139–167  ·  view source on GitHub ↗
(record: any)

Source from the content-addressed store, hash-verified

137 setOpen(false)
138 }
139 const openLogsModal = (record: any) => {
140 const closeModal = (reload = true) => {
141 modalInstance.destroy()
142 reload && manualReloadTable()
143 }
144 const updateFooter = () => {
145 record.state = 'error'
146 modalInstance.update({})
147 }
148 let cancelCb: () => void = () => {}
149 const cancel = (cancel: () => void) => {
150 cancelCb = cancel
151 }
152 const modalInstance = modal.confirm({
153 title: $t('部署过程'),
154 content: <ServiceDeployment record={record} closeModal={closeModal} updateFooter={updateFooter} cancelCb={cancel} />,
155 footer: () => {
156 return <LogsFooter record={record} closeModal={closeModal} />
157 },
158 afterClose: () => {
159 cancelCb()
160 },
161 width: 600,
162 okText: $t('确认'),
163 cancelText: $t('取消'),
164 closable: true,
165 icon: <></>
166 })
167 }
168 const columns = useMemo(() => {
169 const res = SYSTEM_TABLE_COLUMNS.map((x) => {
170 const dataIndex = x.dataIndex as string[]

Callers 1

SystemListFunction · 0.70

Calls 2

$tFunction · 0.90
cancelCbFunction · 0.70

Tested by

no test coverage detected