mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
feat: feature/1.5-Data Integration
This commit is contained in:
@@ -133,9 +133,7 @@ const LocalModelList: React.FC = () => {
|
||||
const configureService = (address?: string) => {
|
||||
modal.confirm({
|
||||
title: $t('配置 Ollama 服务'),
|
||||
content: (
|
||||
<ConfigureOllamaService ref={ConfigureOllamaServiceRef} address={address}></ConfigureOllamaService>
|
||||
),
|
||||
content: <ConfigureOllamaService ref={ConfigureOllamaServiceRef} address={address}></ConfigureOllamaService>,
|
||||
onOk: () => {
|
||||
return ConfigureOllamaServiceRef.current?.save().then((res) => {
|
||||
if (res === true) {
|
||||
@@ -175,9 +173,11 @@ const LocalModelList: React.FC = () => {
|
||||
<div>
|
||||
<Icon className="align-sub mr-[5px]" icon="ph:hard-drives-light" width="50" height="50" />
|
||||
<div>{$t('模型部署服务未配置')}</div>
|
||||
<Button type="primary" className="mt-[10px]" onClick={() => configureService()}>
|
||||
{$t('配置服务')}
|
||||
</Button>
|
||||
<WithPermission access="system.devops.ai_provider.edit">
|
||||
<Button type="primary" className="mt-[10px]" onClick={() => configureService()}>
|
||||
{$t('配置服务')}
|
||||
</Button>
|
||||
</WithPermission>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
@@ -448,14 +448,19 @@ const LocalModelList: React.FC = () => {
|
||||
setSearchWord(e.target.value)
|
||||
pageListRef.current?.reload()
|
||||
}}
|
||||
beforeNewBtn={
|
||||
[<Button className="mr-btnbase" key="removeFromDep" onClick={() => configureService(ollamaAddress)}>{$t('配置服务')}</Button>]
|
||||
}
|
||||
beforeNewBtn={[
|
||||
<WithPermission access="system.devops.ai_provider.edit">
|
||||
<Button className="mr-btnbase" key="removeFromDep" onClick={() => configureService(ollamaAddress)}>
|
||||
{$t('配置服务')}
|
||||
</Button>
|
||||
</WithPermission>
|
||||
]}
|
||||
showPagination={true}
|
||||
searchPlaceholder={$t('请输入名称搜索')}
|
||||
columns={columns}
|
||||
addNewBtnTitle={$t('部署模型')}
|
||||
onAddNewBtnClick={handleAdd}
|
||||
addNewBtnAccess="system.devops.ai_provider.edit"
|
||||
addNewBtnDisabled={!ollamaAddress}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -216,6 +216,7 @@ const OnlineModelList: React.FC = () => {
|
||||
showPagination={true}
|
||||
searchPlaceholder={$t('请输入名称搜索')}
|
||||
columns={columns}
|
||||
addNewBtnAccess="system.devops.ai_provider.edit"
|
||||
addNewBtnTitle={$t('添加模型')}
|
||||
onAddNewBtnClick={handleAdd}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user