Skip to content

Commit

Permalink
Merge pull request #288 from linqiqi077/main
Browse files Browse the repository at this point in the history
fix: fix some data-handle and modelWarehouse detail issue
  • Loading branch information
Carrotzpc authored Mar 29, 2024
2 parents 351bdb7 + ae26c28 commit 0651405
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/dataset-version-list/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class DatasetVersionList$$Component extends React.Component {
}
if (event.key === 'dataProcess') {
return this.history.push(
`/data-handle/create?dataset=${params.dataset.name}&datasetVersion=${params.version.name}`
`/data-handle/create?dataset=${params.dataset.name}&datasetVersion=${params.version.version}`
);
}
if (event.key === 'import') {
Expand Down
29 changes: 24 additions & 5 deletions src/pages/CreateDataHandle/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,15 @@ class $$Page extends React.Component {
if (this.state.step3Data?.QAsplitForm?.type) {
const cur = _list.find(i => i.value === this.state.step3Data.QAsplitForm.type);
if (cur.provider !== 'worker') {
this.form('qa_split').setFieldState('model', {
this.form('qa_split')?.setFieldState('model', {
dataSource: cur.models,
});
}
}
this.setState({
llmList: _list,
});
this.form('qa_split').setFieldState('type', {
this.form('qa_split')?.setFieldState('type', {
dataSource: _list,
});
})
Expand Down Expand Up @@ -772,10 +772,10 @@ class $$Page extends React.Component {
showLlmModel: true,
},
() => {
this.form('qa_split').setFieldState('model', {
this.form('qa_split')?.setFieldState('model', {
dataSource: cur.models,
});
this.form('qa_split').setValues({
this.form('qa_split')?.setValues({
model: cur.models[0]?.value,
});
}
Expand Down Expand Up @@ -1071,6 +1071,20 @@ class $$Page extends React.Component {
});
}
});
const dataset = this.history.query.dataset;
const datasetVersion = this.history.query.datasetVersion;
this.setState({
step2FormData: {
...this.state.step2FormData,
pre_data_set_name: dataset,
pre_data_set_version: datasetVersion,
post_data_set_name: dataset,
post_data_set_version: datasetVersion,
},
});
if (dataset && datasetVersion) {
this.getTableList(`${dataset}-${datasetVersion}`);
}
}

render() {
Expand Down Expand Up @@ -1566,7 +1580,12 @@ class $$Page extends React.Component {
<Row __component_name="Row" style={{ marginBottom: '16px' }} wrap={true}>
<Col __component_name="Col" span={24}>
<Space __component_name="Space" align="center" direction="horizontal">
<Button.Back __component_name="Button.Back" title="" type="primary" />
<Button.Back
__component_name="Button.Back"
path="/data-handle"
title=""
type="primary"
/>
</Space>
<Typography.Title
__component_name="Typography.Title"
Expand Down
36 changes: 30 additions & 6 deletions src/pages/ModelWarehouseDetail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1023,8 +1023,20 @@ class ModelWarehouseDetail$$Page extends React.Component {
menu={{
items: [
{ key: 'baseinfo', label: '基础信息' },
{ key: 'edit', label: '编辑' },
{ key: 'del', label: '删除' },
{
disabled: __$$eval(
() => this.utils.getAuthData()?.project !== this.state.data.namespace
),
key: 'edit',
label: '编辑',
},
{
disabled: __$$eval(
() => this.utils.getAuthData()?.project !== this.state.data.namespace
),
key: 'del',
label: '删除',
},
],
onClick: function () {
return this.onMenuClick.apply(
Expand Down Expand Up @@ -1062,8 +1074,20 @@ class ModelWarehouseDetail$$Page extends React.Component {
disabled={false}
menu={{
items: [
{ key: 'baseinfo', label: '基础信息' },
{ key: 'del', label: '删除' },
{
disabled: __$$eval(
() => this.utils.getAuthData()?.project !== this.state.data.namespace
),
key: 'edit',
label: '编辑',
},
{
disabled: __$$eval(
() => this.utils.getAuthData()?.project !== this.state.data.namespace
),
key: 'del',
label: '删除',
},
{ disabled: true, key: 'deploy', label: '部署' },
],
onClick: function () {
Expand All @@ -1074,7 +1098,7 @@ class ModelWarehouseDetail$$Page extends React.Component {
}.bind(this),
}}
onClick={function () {
return this.onEdit.apply(
return this.onOpenBaseInfoModal.apply(
this,
Array.prototype.slice.call(arguments).concat([])
);
Expand All @@ -1090,7 +1114,7 @@ class ModelWarehouseDetail$$Page extends React.Component {
strong={false}
style={{ fontSize: '' }}
>
编辑
基础信息
</Typography.Text>
</Dropdown.Button>
)}
Expand Down

0 comments on commit 0651405

Please sign in to comment.