forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes: openshift#340 This commit addresses many of the points in openshift#340. Notably missing is the panel showing pod resource utilization. This was intentionally left out due to Heapster's unreliability. Additionally, this commit adds a modified pod volume section that lists volumes by name and by mount-permissions; this can lead to situations where the same volume is shown twice. Finally, the `Host Location` column was taken out since most volume types will not provide this field. Instead, this information is surfaced the `Type` column in parentheses for applicable types.
- Loading branch information
Showing
10 changed files
with
189 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.co-m-volume-icon .fa { | ||
vertical-align: middle; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @fileoverview | ||
* Displays a different icon for different types of volumes, e.g. empty directories, secrets, etc. | ||
*/ | ||
|
||
angular.module('bridge.ui') | ||
.directive('coVolumeIcon', function(k8s) { | ||
'use strict'; | ||
const volumeKind = k8s.enum.VolumeSource; | ||
|
||
return { | ||
template: ` | ||
<span class="co-m-volume-icon"> | ||
<i ng-if="faClass" class="fa{{faClass}}"></i> | ||
<span ng-bind="label"></span> | ||
</span> | ||
`, | ||
restrict: 'E', | ||
replace: true, | ||
link: function(scope, elem, attrs) { | ||
var kind = (attrs.kind || ''); | ||
if (kind) { | ||
elem.addClass('co-m-volume-icon--' + kind); | ||
} | ||
scope.label = volumeKind[kind] ? volumeKind[kind].label : ''; | ||
scope.faClass = faClass(volumeKind, kind); | ||
} | ||
}; | ||
|
||
}); | ||
|
||
|
||
function faClass(volumeKind, kind) { | ||
switch (kind) { | ||
case volumeKind.emptyDir.id: | ||
return ' fa-folder-open-o'; | ||
case volumeKind.hostPath.id: | ||
return ' fa-files-o'; | ||
case volumeKind.secret.id: | ||
return ' fa-lock'; | ||
default: | ||
return ''; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters