Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
b6f65272
K
kubesphere
项目概览
水淹萌龙
/
kubesphere
与 Fork 源项目一致
Fork自
KubeSphere / kubesphere
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
b6f65272
编写于
11月 08, 2019
作者:
K
KubeSphere CI Bot
提交者:
GitHub
11月 08, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1434 from wansir/master
fix openpitrix resource sort param
上级
948f293d
981669ca
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
6 deletion
+11
-6
pkg/apiserver/openpitrix/applications.go
pkg/apiserver/openpitrix/applications.go
+5
-0
pkg/models/openpitrix/applications.go
pkg/models/openpitrix/applications.go
+1
-1
pkg/models/openpitrix/apps.go
pkg/models/openpitrix/apps.go
+3
-3
pkg/models/openpitrix/categories.go
pkg/models/openpitrix/categories.go
+1
-1
pkg/models/openpitrix/repos.go
pkg/models/openpitrix/repos.go
+1
-1
未找到文件。
pkg/apiserver/openpitrix/applications.go
浏览文件 @
b6f65272
...
...
@@ -42,6 +42,11 @@ func ListApplications(req *restful.Request, resp *restful.Response) {
orderBy
:=
req
.
QueryParameter
(
params
.
OrderByParam
)
reverse
:=
params
.
ParseReverse
(
req
)
if
orderBy
==
""
{
orderBy
=
"create_time"
reverse
=
true
}
if
err
!=
nil
{
resp
.
WriteHeaderAndEntity
(
http
.
StatusBadRequest
,
errors
.
Wrap
(
err
))
return
...
...
pkg/models/openpitrix/applications.go
浏览文件 @
b6f65272
...
...
@@ -83,7 +83,7 @@ func ListApplications(conditions *params.Conditions, limit, offset int, orderBy
if
orderBy
!=
""
{
describeClustersRequest
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
describeClustersRequest
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
describeClustersRequest
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
resp
,
err
:=
client
.
Cluster
()
.
DescribeClusters
(
openpitrix
.
SystemContext
(),
describeClustersRequest
)
if
err
!=
nil
{
klog
.
Errorln
(
err
)
...
...
pkg/models/openpitrix/apps.go
浏览文件 @
b6f65272
...
...
@@ -587,7 +587,7 @@ func ListAppVersionAudits(conditions *params.Conditions, orderBy string, reverse
if
orderBy
!=
""
{
describeAppVersionAudits
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
describeAppVersionAudits
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
describeAppVersionAudits
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
describeAppVersionAudits
.
Limit
=
uint32
(
limit
)
describeAppVersionAudits
.
Offset
=
uint32
(
offset
)
resp
,
err
:=
client
.
App
()
.
DescribeAppVersionAudits
(
openpitrix
.
SystemContext
(),
describeAppVersionAudits
)
...
...
@@ -626,7 +626,7 @@ func ListAppVersionReviews(conditions *params.Conditions, orderBy string, revers
if
orderBy
!=
""
{
describeAppVersionReviews
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
describeAppVersionReviews
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
describeAppVersionReviews
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
describeAppVersionReviews
.
Limit
=
uint32
(
limit
)
describeAppVersionReviews
.
Offset
=
uint32
(
offset
)
// TODO icon is needed
...
...
@@ -669,7 +669,7 @@ func ListAppVersions(conditions *params.Conditions, orderBy string, reverse bool
if
orderBy
!=
""
{
describeAppVersionsRequest
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
describeAppVersionsRequest
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
describeAppVersionsRequest
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
describeAppVersionsRequest
.
Limit
=
uint32
(
limit
)
describeAppVersionsRequest
.
Offset
=
uint32
(
offset
)
resp
,
err
:=
client
.
App
()
.
DescribeAppVersions
(
openpitrix
.
SystemContext
(),
describeAppVersionsRequest
)
...
...
pkg/models/openpitrix/categories.go
浏览文件 @
b6f65272
...
...
@@ -144,7 +144,7 @@ func ListCategories(conditions *params.Conditions, orderBy string, reverse bool,
if
orderBy
!=
""
{
req
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
req
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
req
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
req
.
Limit
=
uint32
(
limit
)
req
.
Offset
=
uint32
(
offset
)
resp
,
err
:=
client
.
Category
()
.
DescribeCategories
(
openpitrix
.
SystemContext
(),
req
)
...
...
pkg/models/openpitrix/repos.go
浏览文件 @
b6f65272
...
...
@@ -190,7 +190,7 @@ func ListRepos(conditions *params.Conditions, orderBy string, reverse bool, limi
if
orderBy
!=
""
{
req
.
SortKey
=
&
wrappers
.
StringValue
{
Value
:
orderBy
}
}
req
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
reverse
}
req
.
Reverse
=
&
wrappers
.
BoolValue
{
Value
:
!
reverse
}
req
.
Limit
=
uint32
(
limit
)
req
.
Offset
=
uint32
(
offset
)
resp
,
err
:=
client
.
Repo
()
.
DescribeRepos
(
openpitrix
.
SystemContext
(),
req
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录