Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
凌波微步_大先生
dashboard
提交
588081a9
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,发现更多精彩内容 >>
未验证
提交
588081a9
编写于
1月 29, 2021
作者:
M
Marcos Diez
提交者:
GitHub
1月 29, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix showing pods with hosttype (#5782)
上级
3d58c87e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
35 deletion
+36
-35
src/app/frontend/common/components/volumemount/component.ts
src/app/frontend/common/components/volumemount/component.ts
+2
-2
src/app/frontend/common/components/volumemount/template.html
src/app/frontend/common/components/volumemount/template.html
+4
-4
src/app/frontend/typings/volume.api.ts
src/app/frontend/typings/volume.api.ts
+30
-29
未找到文件。
src/app/frontend/common/components/volumemount/component.ts
浏览文件 @
588081a9
...
...
@@ -50,10 +50,10 @@ export class VolumeMountComponent {
return
this
.
kdState_
.
href
(
kind
.
toLowerCase
(),
name
,
this
.
namespace
);
}
getTypeFromVolume
(
volume
:
PersistentVolumeSource
):
string
{
get
Mount
TypeFromVolume
(
volume
:
PersistentVolumeSource
):
string
{
// This is to make sure that volume is an actual class instance with all methods.
volume
=
new
PersistentVolumeSource
(
volume
);
return
volume
.
source
?
volume
.
source
.
t
ype
:
'
-
'
;
return
volume
.
source
?
volume
.
source
.
mountT
ype
:
'
-
'
;
}
getNameFromVolume
(
volume
:
PersistentVolumeSource
):
string
{
...
...
src/app/frontend/common/components/volumemount/template.html
浏览文件 @
588081a9
...
...
@@ -63,21 +63,21 @@ limitations under the License.
<mat-header-cell
*matHeaderCellDef
i18n
>
Source Type
</mat-header-cell>
<mat-cell
*matCellDef=
"let volumeMount"
>
{{getTypeFromVolume(volumeMount.volume)}}
{{get
Mount
TypeFromVolume(volumeMount.volume)}}
</mat-cell>
</ng-container>
<ng-container
[matColumnDef]=
"columns[5]"
>
<mat-header-cell
*matHeaderCellDef
i18n
>
Source Name
</mat-header-cell>
<mat-cell
*matCellDef=
"let volumeMount"
>
<ng-container
*ngIf=
"isResourceSupported(getTypeFromVolume(volumeMount.volume))"
>
<a
[routerLink]=
"getDetailsHref(getNameFromVolume(volumeMount.volume), getTypeFromVolume(volumeMount.volume))"
<ng-container
*ngIf=
"isResourceSupported(get
Mount
TypeFromVolume(volumeMount.volume))"
>
<a
[routerLink]=
"getDetailsHref(getNameFromVolume(volumeMount.volume), get
Mount
TypeFromVolume(volumeMount.volume))"
queryParamsHandling=
"preserve"
>
{{getNameFromVolume(volumeMount.volume)}}
</a>
</ng-container>
<ng-container
*ngIf=
"!isResourceSupported(getTypeFromVolume(volumeMount.volume))"
>
<ng-container
*ngIf=
"!isResourceSupported(get
Mount
TypeFromVolume(volumeMount.volume))"
>
{{getNameFromVolume(volumeMount.volume)}}
</ng-container>
</mat-cell>
...
...
src/app/frontend/typings/volume.api.ts
浏览文件 @
588081a9
...
...
@@ -69,14 +69,15 @@ export class PersistentVolumeSource {
// Our custom object to extend Persistent Volume Sources with generic type/name information
export
class
IVolumeSource
{
t
ype
:
string
;
mountT
ype
:
string
;
displayName
:
string
;
}
export
class
HostPathVolumeSource
implements
IVolumeSource
{
path
:
string
;
type
?:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
HostPath
'
;
}
...
...
@@ -86,7 +87,7 @@ export class HostPathVolumeSource implements IVolumeSource {
}
export
class
EmptyDirVolumeSource
implements
IVolumeSource
{
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
EmptyDir
'
;
}
...
...
@@ -101,7 +102,7 @@ export class GCEPersistentDiskVolumeSource implements IVolumeSource {
partition
:
number
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
GCE Persistent Disk
'
;
}
...
...
@@ -116,7 +117,7 @@ export class AWSElasticBlockStorageVolumeSource implements IVolumeSource {
partition
:
number
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
AWS Elastic Block Store
'
;
}
...
...
@@ -130,7 +131,7 @@ export class GitRepoVolumeSource implements IVolumeSource {
revision
:
string
;
directory
:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
GitRepo
'
;
}
...
...
@@ -144,7 +145,7 @@ export class SecretVolumeSource implements IVolumeSource {
defaultMode
:
number
;
optional
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
SupportedResources
.
Secret
;
}
...
...
@@ -158,7 +159,7 @@ export class NFSVolumeSource implements IVolumeSource {
path
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
NFS
'
;
}
...
...
@@ -174,7 +175,7 @@ export class ISCSIVolumeSource implements IVolumeSource {
fsType
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
ISCI
'
;
}
...
...
@@ -188,7 +189,7 @@ export class GlusterfsVolumeSource implements IVolumeSource {
path
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
GlusterFS
'
;
}
...
...
@@ -201,7 +202,7 @@ export class PersistentVolumeClaimVolumeSource implements IVolumeSource {
claimName
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
SupportedResources
.
PersistentVolumeClaim
;
}
...
...
@@ -220,7 +221,7 @@ export class RBDVolumeSource implements IVolumeSource {
secretRef
:
LocalObjectReference
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
RBD
'
;
}
...
...
@@ -234,7 +235,7 @@ export class FlexVolumeSource implements IVolumeSource {
fsType
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Flex
'
;
}
...
...
@@ -248,7 +249,7 @@ export class CinderVolumeSource implements IVolumeSource {
fsType
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Cinder
'
;
}
...
...
@@ -265,7 +266,7 @@ export class CephFSVolumeSource implements IVolumeSource {
secretRef
:
LocalObjectReference
;
readonly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
CephFS
'
;
}
...
...
@@ -277,7 +278,7 @@ export class CephFSVolumeSource implements IVolumeSource {
export
class
FlockerVolumeSource
implements
IVolumeSource
{
datasetName
:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Flocker
'
;
}
...
...
@@ -289,7 +290,7 @@ export class FlockerVolumeSource implements IVolumeSource {
export
class
DownwardAPIVolumeSource
implements
IVolumeSource
{
defaultMode
:
number
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
DownwardAPI
'
;
}
...
...
@@ -304,7 +305,7 @@ export class FCVolumeSource implements IVolumeSource {
fsType
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
FC
'
;
}
...
...
@@ -318,7 +319,7 @@ export class AzureFileVolumeSource implements IVolumeSource {
shareName
:
string
;
readOnly
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Azure File
'
;
}
...
...
@@ -333,7 +334,7 @@ export class ConfigMapVolumeSource implements IVolumeSource {
defaultMode
:
number
;
optional
:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
SupportedResources
.
ConfigMap
;
}
...
...
@@ -348,7 +349,7 @@ export class VSphereVirtualDiskVolumeSource implements IVolumeSource {
storagePolicyName
:
string
;
storagePolicyID
:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
VSphere Virtual Disk
'
;
}
...
...
@@ -365,7 +366,7 @@ export class QuobyteVolumeSource implements IVolumeSource {
group
:
string
;
tenant
:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Quobyte
'
;
}
...
...
@@ -381,7 +382,7 @@ export class CSIVolumeSource implements IVolumeSource {
volumeAttributes
?:
any
;
nodePublishSecretRef
?:
LocalObjectReference
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
CSI
'
;
}
...
...
@@ -397,7 +398,7 @@ export class StorageOSVolumeSource implements IVolumeSource {
readOnly
?:
boolean
;
secretRef
?:
LocalObjectReference
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Storage OS
'
;
}
...
...
@@ -418,7 +419,7 @@ export class ScaleIOVolumeSource implements IVolumeSource {
fSType
?:
string
;
readOnly
?:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Scale IO
'
;
}
...
...
@@ -432,7 +433,7 @@ export class PortworxVolumeSource implements IVolumeSource {
fSType
:
string
;
readOnly
?:
boolean
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Portworx
'
;
}
...
...
@@ -445,7 +446,7 @@ export class ProjectedVolumeSource implements IVolumeSource {
sources
?:
VolumeProjection
[];
defaultMode
?:
number
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Projected
'
;
}
...
...
@@ -458,7 +459,7 @@ export class PhotonPersistentDiskVolumeSource implements IVolumeSource {
phID
:
string
;
fsType
:
string
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Photon Persistent Disk
'
;
}
...
...
@@ -475,7 +476,7 @@ export class AzureDiskVolumeSource implements IVolumeSource {
readOnly
:
boolean
;
kind
:
AzureDataDiskKind
;
get
t
ype
():
string
{
get
mountT
ype
():
string
{
return
'
Azure Disk
'
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录