-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Redesign secret detail page #1452
Conversation
Current coverage is 93.55% (diff: 100%)@@ master #1452 diff @@
==========================================
Files 354 354
Lines 2953 2950 -3
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 2763 2760 -3
Misses 190 190
Partials 0 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite nice! A couple of comments PTAL.
$eye-icon-background-color-on: rgba(224, 224, 224, 1); | ||
|
||
.kd-toggle-hidden-text-input { | ||
border: 0 none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, makes total sense. Done.
<md-button ng-click="isActive = !isActive" class="md-icon-button"> | ||
<!-- SVG drawing to simulate crossed-eye icon. | ||
This should be removed if possible. --> | ||
<svg ng-if="isActive" width="40px" height="40px" viewBox="0 0 40 40" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is eye-off icon which you can use instead of svg directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, we do not use this library :( We use https://material.io/icons/, which is limited in scope. There is no eye-off icon there.
We could try evaluating and including other material design libraries, but this requires much effort of integration, validation and license eveluation. Can we do this in a separate task? I can spawn an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #1460
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also missing files: i18n/*
@@ -36,9 +36,6 @@ type SecretDetail struct { | |||
|
|||
// Used to facilitate programmatic handling of secret data. | |||
Type api.SecretType `json:"type"` | |||
|
|||
// Determines if the secret is hidden type in case of opaque and basicAuth types. | |||
IsHiddenType bool `json:"isHiddenType"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now just hide them all? When I looked at the default token I now can't see the 'namespace' anymore in a useful way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Do you think we should show namespace in an unobfuscated way?
See how my secret is described in kubectl:
Name: default-token-3kz4k
Namespace: default
Labels: <none>
Annotations: kubernetes.io/service-account.name=default
kubernetes.io/service-account.uid=4d23ccb1-087f-11e6-87f2-42010af000fb
Type: kubernetes.io/service-account-token
Data
====
ca.crt: 1172 bytes
namespace: 7 bytes
token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlZmF1bHQtdG9rZW4tM2<redeacted>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there's change in behavior here, yes. I propose hiding all secrets by default, and only showing some of them we pick by hand (possibly none). This is to follow security "principle" similar to what you have in, e.g., firewalls, i.e., you disallow all traffic and allow only selected ports and protocols.
Does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense but why do we show namespace obfuscated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubectl describe does obfuscate namespace, so we do here. I'd say to obfuscate everything for now and when feature requests come to show individual types/fields, we'd show them. But hiding everything by default is safer.
This is my second iteration to the details page upgrade effort started by @batikanu. * I propose moving eye icon to the left of the list of secrets * Changed card titles of cards there to be same as in resource lists * Changed eye-off eye-on icons to reflect material design guidelines (one icon is atfitificially created using SVG)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is my second iteration to the details page upgrade effort started by @batikanu.