Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
b641080d
D
dashboard
项目概览
凌波微步_大先生
/
dashboard
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dashboard
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b641080d
编写于
10月 31, 2019
作者:
F
Faye Zhang
提交者:
Kubernetes Prow Robot
10月 31, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix golint failures (#4458)
上级
8a75205e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
15 addition
and
17 deletion
+15
-17
src/app/backend/resource/common/resourcechannels.go
src/app/backend/resource/common/resourcechannels.go
+1
-1
src/app/backend/resource/daemonset/common.go
src/app/backend/resource/daemonset/common.go
+1
-1
src/app/backend/resource/dataselect/dataselectquery.go
src/app/backend/resource/dataselect/dataselectquery.go
+1
-1
src/app/backend/resource/dataselect/stdcomparabletypes.go
src/app/backend/resource/dataselect/stdcomparabletypes.go
+1
-2
src/app/backend/resource/event/common.go
src/app/backend/resource/event/common.go
+1
-1
src/app/backend/resource/horizontalpodautoscaler/common.go
src/app/backend/resource/horizontalpodautoscaler/common.go
+1
-1
src/app/backend/resource/logs/logs.go
src/app/backend/resource/logs/logs.go
+7
-8
src/app/backend/resource/resourcequota/detail.go
src/app/backend/resource/resourcequota/detail.go
+1
-1
src/app/backend/settings/api/types.go
src/app/backend/settings/api/types.go
+1
-1
未找到文件。
src/app/backend/resource/common/resourcechannels.go
浏览文件 @
b641080d
...
...
@@ -894,7 +894,7 @@ type HorizontalPodAutoscalerListChannel struct {
Error
chan
error
}
// Get
PodListMetrics
Channel returns a pair of channels to MetricsByPod and errors that
// Get
HorizontalPodAutoscalerList
Channel returns a pair of channels to MetricsByPod and errors that
// both must be read numReads times.
func
GetHorizontalPodAutoscalerListChannel
(
client
client
.
Interface
,
nsQuery
*
NamespaceQuery
,
numReads
int
)
HorizontalPodAutoscalerListChannel
{
...
...
src/app/backend/resource/daemonset/common.go
浏览文件 @
b641080d
...
...
@@ -28,7 +28,7 @@ import (
client
"k8s.io/client-go/kubernetes"
)
//
B
ased on given selector returns list of services that are candidates for deletion.
//
GetServicesForDSDeletion is b
ased on given selector returns list of services that are candidates for deletion.
// Services are matched by daemon sets' label selector. They are deleted if given
// label selector is targeting only 1 daemon set.
func
GetServicesForDSDeletion
(
client
client
.
Interface
,
labelSelector
labels
.
Selector
,
...
...
src/app/backend/resource/dataselect/dataselectquery.go
浏览文件 @
b641080d
...
...
@@ -18,7 +18,7 @@ import (
metricapi
"github.com/kubernetes/dashboard/src/app/backend/integration/metric/api"
)
//
O
ptions for GenericDataSelect which takes []GenericDataCell and returns selected data.
//
DataSelectQuery is o
ptions for GenericDataSelect which takes []GenericDataCell and returns selected data.
// Can be extended to include any kind of selection - for example filtering.
// Currently included only Pagination and Sort options.
type
DataSelectQuery
struct
{
...
...
src/app/backend/resource/dataselect/stdcomparabletypes.go
浏览文件 @
b641080d
...
...
@@ -60,9 +60,8 @@ func (self StdComparableRFC3339Timestamp) Compare(otherV ComparableValue) int {
if
err1
!=
nil
||
err2
!=
nil
{
// in case of timestamp parsing failure just compare as strings
return
strings
.
Compare
(
string
(
self
),
string
(
other
))
}
else
{
return
ints64Compare
(
selfTime
.
Unix
(),
otherTime
.
Unix
())
}
return
ints64Compare
(
selfTime
.
Unix
(),
otherTime
.
Unix
())
}
func
(
self
StdComparableRFC3339Timestamp
)
Contains
(
otherV
ComparableValue
)
bool
{
...
...
src/app/backend/resource/event/common.go
浏览文件 @
b641080d
...
...
@@ -148,7 +148,7 @@ func GetNamespaceEvents(client kubernetes.Interface, dsQuery *dataselect.DataSel
return
CreateEventList
(
FillEventsType
(
events
.
Items
),
dsQuery
),
nil
}
//
B
ased on event Reason fills event Type in order to allow correct filtering by Type.
//
FillEventsType is b
ased on event Reason fills event Type in order to allow correct filtering by Type.
func
FillEventsType
(
events
[]
v1
.
Event
)
[]
v1
.
Event
{
for
i
:=
range
events
{
// Fill in only events with empty type.
...
...
src/app/backend/resource/horizontalpodautoscaler/common.go
浏览文件 @
b641080d
...
...
@@ -19,7 +19,7 @@ import (
autoscaling
"k8s.io/api/autoscaling/v1"
)
// Simple mapping of an autoscaling.CrossVersionObjectReference
// S
caleTargetRef is a s
imple mapping of an autoscaling.CrossVersionObjectReference
type
ScaleTargetRef
struct
{
Kind
string
`json:"kind"`
Name
string
`json:"name"`
...
...
src/app/backend/resource/logs/logs.go
浏览文件 @
b641080d
...
...
@@ -22,7 +22,7 @@ import (
// LINE_INDEX_NOT_FOUND is returned if requested line could not be found
var
LINE_INDEX_NOT_FOUND
=
-
1
// Default
number of lines that should be returned
in case of invalid request.
// Default
DisplayNumLogLines returns default number of lines
in case of invalid request.
var
DefaultDisplayNumLogLines
=
100
// MaxLogLines is a number that will be certainly bigger than any number of logs. Here 2 billion logs is certainly much larger
...
...
@@ -51,7 +51,7 @@ var OldestLogLineId = LogLineId{
LogTimestamp
:
OldestTimestamp
,
}
// Default log view selector that is used in case of invalid request
// Default
Selection loads default
log view selector that is used in case of invalid request
// Downloads newest DefaultDisplayNumLogLines lines.
var
DefaultSelection
=
&
Selection
{
OffsetFrom
:
1
-
DefaultDisplayNumLogLines
,
...
...
@@ -60,14 +60,14 @@ var DefaultSelection = &Selection{
LogFilePosition
:
End
,
}
//
R
eturns all logs.
//
AllSelection r
eturns all logs.
var
AllSelection
=
&
Selection
{
OffsetFrom
:
-
MaxLogLines
,
OffsetTo
:
MaxLogLines
,
ReferencePoint
:
NewestLogLineId
,
}
//
R
epresentation of log lines
//
LogDetails returns r
epresentation of log lines
type
LogDetails
struct
{
// Additional information of the logs e.g. container name, dates,...
...
...
@@ -80,7 +80,7 @@ type LogDetails struct {
LogLines
`json:"logs"`
}
//
M
eta information about the selected log lines
//
LogInfo returns m
eta information about the selected log lines
type
LogInfo
struct
{
// Pod name.
...
...
@@ -140,7 +140,7 @@ type LogLineId struct {
// slice of logs relatively to certain reference line ID.
type
LogLines
[]
LogLine
//
A single log line. Split into timestamp and the actual content
//
LogLine is a single log line that split into timestamp and the actual content.
type
LogLine
struct
{
Timestamp
LogTimestamp
`json:"timestamp"`
Content
string
`json:"content"`
...
...
@@ -215,9 +215,8 @@ func (self LogLines) getLineIndex(logLineId *LogLineId) int {
}
if
0
<=
offset
&&
offset
<
linesMatched
{
return
matchingStartedAt
+
offset
}
else
{
return
LINE_INDEX_NOT_FOUND
}
return
LINE_INDEX_NOT_FOUND
}
// CreateLogLineId returns ID of the line with provided lineIndex.
...
...
src/app/backend/resource/resourcequota/detail.go
浏览文件 @
b641080d
...
...
@@ -37,7 +37,7 @@ type ResourceQuotaDetail struct {
StatusList
map
[
v1
.
ResourceName
]
ResourceStatus
`json:"statusList,omitempty"`
}
// ResourceQuotaDetailList
// ResourceQuotaDetailList
provides a set of resource Quotas.
type
ResourceQuotaDetailList
struct
{
ListMeta
api
.
ListMeta
`json:"listMeta"`
Items
[]
ResourceQuotaDetail
`json:"items"`
...
...
src/app/backend/settings/api/types.go
浏览文件 @
b641080d
...
...
@@ -80,7 +80,7 @@ func MarshalPinnedResources(p []PinnedResource) string {
return
string
(
bytes
)
}
// Unmarshal
settings from JSON string
into object.
// Unmarshal
PinnedResources unmarshal pinned resource
into object.
func
UnmarshalPinnedResources
(
data
string
)
(
*
[]
PinnedResource
,
error
)
{
p
:=
new
([]
PinnedResource
)
err
:=
json
.
Unmarshal
([]
byte
(
data
),
p
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录