Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor resources API #1750

Merged
merged 1 commit into from Jan 10, 2020
Merged

refactor resources API #1750

merged 1 commit into from Jan 10, 2020

Conversation

@wansir
Copy link
Member

wansir commented Jan 9, 2020

Signed-off-by: hongming talonwan@yunify.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

Sort resources by name when the creation time is the same.

Which issue(s) this PR fixes:

Fixes #1722

@wansir

This comment has been minimized.

Copy link
Member Author

wansir commented Jan 9, 2020

@ks-ci-bot ks-ci-bot requested review from runzexia and zryfish Jan 9, 2020
pkg/server/params/params.go Outdated Show resolved Hide resolved
pkg/models/resources/resources.go Outdated Show resolved Hide resolved
@@ -45,7 +44,9 @@ func ParsePaging(paging string) (limit, offset int) {
return

This comment has been minimized.

Copy link
@zryfish

zryfish Jan 9, 2020

Contributor

why ignore error here? what would happen if there is an error during parsing?

This comment has been minimized.

Copy link
@wansir

wansir Jan 9, 2020

Author Member

Use default values when parsing failed, limit and page must be defined at the same time.

This comment has been minimized.

Copy link
@zryfish

zryfish Jan 9, 2020

Contributor

I believe atoi will return 0 when there is an error

This comment has been minimized.

Copy link
@wansir

wansir Jan 9, 2020

Author Member

Regular expression \d+ defines that only numbers are allowed here, i think this error can be ignored.

@wansir wansir force-pushed the wansir:fix branch 3 times, most recently from 805acbe to a5fd89d Jan 9, 2020
Signed-off-by: hongming <talonwan@yunify.com>
@wansir wansir force-pushed the wansir:fix branch from a5fd89d to 05e9491 Jan 10, 2020
@zryfish

This comment has been minimized.

Copy link
Contributor

zryfish commented Jan 10, 2020

/lgtm
/approve

@ks-ci-bot

This comment has been minimized.

Copy link
Collaborator

ks-ci-bot commented Jan 10, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wansir, zryfish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the approved label Jan 10, 2020
@ks-ci-bot ks-ci-bot merged commit 89f1158 into kubesphere:release-2.1 Jan 10, 2020
1 check was pending
1 check was pending
tide Not mergeable. Needs approved, lgtm labels.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.