Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Added SelectFile component #2425

Merged
merged 2 commits into from
May 16, 2021
Merged

Conversation

mklanjsek
Copy link
Contributor

Added a new SelectFile component intended to be used to select file(s) from the file system.

Also added this new file selector to apply yaml, so it's now possible to select and open a yaml file before applying it.  While there, I refactored the form buttons to use cds-button and be consistent with the FileSelect button.

Signed-off-by: Milan Klanjsek [email protected]

Signed-off-by: Milan Klanjsek <[email protected]>
@@ -0,0 +1,68 @@
package component

import "encoding/json"
Copy link
Contributor

Choose a reason for hiding this comment

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

We want to use "github.com/vmware-tanzu/octant/internal/util/json" here

Copy link
Contributor

@lenriquez lenriquez left a comment

Choose a reason for hiding this comment

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

Looks great to me!


@Component({
selector: 'app-view-select-file',
templateUrl: './select-file.component.html',
Copy link
Contributor

@lenriquez lenriquez May 14, 2021

Choose a reason for hiding this comment

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

I wonder if it should switch the change detection to "ChangeDetectionStrategy.OnPush"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was considering it, but since it’s a simple component, I decided to keep it simple for now.

@xtreme-vikram-yadav
Copy link
Contributor

👍

Signed-off-by: Milan Klanjsek <[email protected]>
@mklanjsek mklanjsek merged commit 8d311f1 into vmware-archive:master May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File Uploader - Drag and Drop or "Browse" filesystem
4 participants