Skip to content
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

Merged
merged 3 commits into from
Nov 21, 2016
Merged

Redesign secret detail page #1452

merged 3 commits into from
Nov 21, 2016

Conversation

bryk
Copy link
Contributor

@bryk bryk commented Nov 18, 2016

This is my second iteration to the details page upgrade effort started by @batikanu.

  • Made all secrets hidden by default. This is the spirit of secrets anyway.
  • 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)

@bryk
Copy link
Contributor Author

bryk commented Nov 18, 2016

@rf232 @batikanu Can you review this?

@codecov-io
Copy link

codecov-io commented Nov 18, 2016

Current coverage is 93.55% (diff: 100%)

Merging #1452 into master will decrease coverage by <.01%

@@             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          

Powered by Codecov. Last update 76bb6ee...ed363a1

@rf232 rf232 changed the title Redesing secret detail page Redesign secret detail page Nov 21, 2016
Copy link
Contributor

@batikanu batikanu left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove border: 0 none; It will look without placeholder as a normal input field with borders which doesn't fit so much our ui right?
secretinput

Copy link
Contributor Author

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"
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #1460

Copy link
Contributor

@rf232 rf232 left a 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"`
Copy link
Contributor

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

Copy link
Contributor Author

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>

Copy link
Contributor Author

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

bryk added 2 commits November 21, 2016 13:42
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)
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 21, 2016
@bryk
Copy link
Contributor Author

bryk commented Nov 21, 2016

@rf232 @batikanu PTAL

Copy link
Contributor

@rf232 rf232 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@batikanu batikanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rf232 rf232 merged commit 3a492dd into kubernetes:master Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants