Skip to content

Commit

Permalink
fix: Fix devops and pipiline check api (#1430) (#4151)
Browse files Browse the repository at this point in the history
fix: fix devops and pipiline check api (#1430)

Signed-off-by: yazhou <yazhouhu@yunify.com>
  • Loading branch information
yazhouio committed Jun 25, 2023
1 parent 742b8e3 commit e58ecf0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Forms/Pipelines/BaseInfo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class BaseInfo extends React.Component {
pattern: PATTERN_NAME,
message: t('INVALID_NAME_DESC'),
},
// { validator: this.validator },
{ validator: this.validator },
]}
>
<Input name="name" maxLength={63} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/devops/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1686562525
1686647106
21 changes: 13 additions & 8 deletions src/stores/devops.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with KubeSphere Console. If not, see <https://www.gnu.org/licenses/>.
*/

import { cloneDeep, get, isArray, pick, omit, set } from 'lodash'
import { cloneDeep, get, isArray, omit, set } from 'lodash'
import { action, observable } from 'mobx'

import Base from 'stores/base'
Expand Down Expand Up @@ -154,9 +154,7 @@ export default class DevOpsStore extends Base {
@action
checkNewName(params, query) {
return request.get(
`/kapis/devops.kubesphere.io/v1alpha3${this.getPath(
params
)}/devops/checkDevopsName`,
`/kapis/devops.kubesphere.io/v1alpha3${this.getPath(params)}`,
{ ...query }
)
}
Expand All @@ -173,10 +171,17 @@ export default class DevOpsStore extends Base {
}
)
}
return this.checkNewName(pick(params, ['cluster', 'workspace']), {
devopsName: params.name,
generateName: true,
})
return this.checkNewName(
{
...params,
devops: params.name,
},
{
// devopsName: params.name,
check: true,
generateName: true,
}
)
}

@action
Expand Down
4 changes: 2 additions & 2 deletions src/stores/devops/pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ export default class PipelineStore extends BaseStore {
`/kapis/devops.kubesphere.io/v1alpha2${this.getPath({
cluster,
devops,
})}/checkPipelineName`,
})}/pipelines/${name}`,
{
value: name,
check: true,
}
)
}
Expand Down

0 comments on commit e58ecf0

Please sign in to comment.