-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: autocompletion for resource shortnames #7466
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
feat: autocompletion for resource shortnames #7466
Conversation
What's the best way to try this out? |
It is dependent on this - argoproj/argo-ui#160, but i'll add steps for running this. |
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, thank you!
LGTM except I think you have some type errors that the UI check is yelling at you for in filter.tsx:
|
a1853c2
to
04f4647
Compare
yes linking it with the latest argo-ui will resolve that |
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
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.
Gotchya, okay LGTM then!
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
04f4647
to
2937e81
Compare
Codecov Report
@@ Coverage Diff @@
## master #7466 +/- ##
==========================================
- Coverage 41.40% 41.39% -0.01%
==========================================
Files 161 161
Lines 21622 21687 +65
==========================================
+ Hits 8952 8977 +25
- Misses 11408 11445 +37
- Partials 1262 1265 +3
Continue to review full report at Codecov.
|
@alexmt |
ui/src/app/shared/models.ts
Outdated
@@ -837,6 +837,37 @@ export const ResourceKinds = [ | |||
'Volume' | |||
]; | |||
|
|||
export const ResourceKindShortnames: {[key: string]: string} = { |
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 already have shortnames for most of k8s resources in resource.ts:
argo-cd/ui/src/app/applications/components/resources.ts
Lines 4 to 10 in 5f4ecf1
export const resources = new Map<string, string>([ | |
['ClusterRole', 'c-role'], | |
['ConfigMap', 'cm'], | |
['ClusterRoleBinding', 'crb'], | |
['CustomResourceDefinition', 'crd'], | |
['CronJob', 'cronjob'], | |
['Deployment', 'deploy'], |
Your list introduces some additional kinds. Can you please merge additional kinds into existing list and use it?
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.
sure, i'll have to create a new PR for argo-ui as well because this will change the prop type.
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Dependent on merging of argoproj/argo-ui#163 |
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
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
closes #7214 , this PR is dependent on merging of argo-ui PR PR-160 to add abbreviation prop to autocomplete
STEPS TO RUN (these steps are not needed anymore! )
npm i -g yalc
cd argo-ui
,yalc publish
this will create the link to the updates argo-ui dependencycd argo-cd/ui
,yalc add argo-ui
cd argo-cd
,make start
Signed-off-by: saumeya saumeyakatyal@gmail.com
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: