Skip to content

ui: add new API docs tab#9409

Merged
yadvr merged 12 commits into
apache:mainfrom
shapeblue:ui-apidocs
Jul 22, 2024
Merged

ui: add new API docs tab#9409
yadvr merged 12 commits into
apache:mainfrom
shapeblue:ui-apidocs

Conversation

@yadvr

@yadvr yadvr commented Jul 17, 2024

Copy link
Copy Markdown
Member

This introduces a new API docs tab which is enabled by default but the admin can disable it via config.json. This uses the discovered APIs for logged in user/account to show them the APIs accessible to them and generates dynamic API docs based on them which are searchable. Also introduces some common auto-completed API groups that are available to most roles.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

This introduces a new API docs table which is enabled by default but
the admin can disable it via config.json. This uses the discovered
APIs for logged in user/account to show them the APIs accessible to them
and generates dynamic API docs based on them which are searchable. Also
introduces some common auto-completed API groups that are available to
most roles.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
@yadvr

yadvr commented Jul 17, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@yadvr yadvr requested a review from vishesh92 July 17, 2024 14:13
@codecov

codecov Bot commented Jul 17, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.54%. Comparing base (afdf4d7) to head (ac1a9a0).
Report is 14 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9409      +/-   ##
============================================
- Coverage     15.54%   15.54%   -0.01%     
+ Complexity    11976    11975       -1     
============================================
  Files          5493     5494       +1     
  Lines        481030   481055      +25     
  Branches      60247    60363     +116     
============================================
- Hits          74766    74763       -3     
- Misses       398000   398030      +30     
+ Partials       8264     8262       -2     
Flag Coverage Δ
uitests 4.18% <ø> (+0.01%) ⬆️
unittests 16.30% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9409 (QA-JID-407)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr

yadvr commented Jul 17, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9409 (QA-JID-408)

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue Outdated
Comment thread ui/src/views/plugins/ApiDocsPlugin.vue
@sureshanaparti

sureshanaparti commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

Parameter Name column in Request parameters table sometimes wraps text - not sure if that's the expected behavior. Not noticed in Response parameters.

addAnnotaion-api
addHost-api

Comment thread ui/src/views/plugins/ApiDocsPlugin.vue
@sureshanaparti

Copy link
Copy Markdown
Contributor

Noticed blank lines in response parameters table for some of the APIs, few screenshots for ref.

api-response-blank-lines-1
api-response-blank-lines-2
api-response-blank-lines-3

Comment thread ui/public/locales/en.json Outdated
yadvr and others added 4 commits July 18, 2024 14:18
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr yadvr requested a review from sureshanaparti July 18, 2024 10:37
@yadvr

yadvr commented Jul 18, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9409 (QA-JID-409)

@JoaoJandre JoaoJandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, tested with npm run serve, went through a lot of APIs and all seemed ok, also verified that the download and docs for CMK was ok. Great addition!

I think that it might be interesting to have the 'since' for APIs/params as well, what do you think @rohityadavcloud ? cc @DaanHoogland @weizhouapache

@sureshanaparti sureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified the API docs section, with some APIs listed.

@yadvr

yadvr commented Jul 19, 2024

Copy link
Copy Markdown
Member Author

@JoaoJandre thanks for reviewing and testing. Let me explore if since can be added. There’s also a related field and routability between selected APIs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr

yadvr commented Jul 19, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9409 (QA-JID-410)

@yadvr yadvr merged commit f24fb20 into apache:main Jul 22, 2024
@yadvr yadvr deleted the ui-apidocs branch July 22, 2024 05:16
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 23, 2024
* ui: add new API docs tab

This introduces a new API docs table which is enabled by default but
the admin can disable it via config.json. This uses the discovered
APIs for logged in user/account to show them the APIs accessible to them
and generates dynamic API docs based on them which are searchable. Also
introduces some common auto-completed API groups that are available to
most roles.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Update ui/src/views/plugins/ApiDocsPlugin.vue

* Update ui/src/views/plugins/ApiDocsPlugin.vue

* Update ui/src/views/plugins/ApiDocsPlugin.vue

* Update ui/src/views/plugins/ApiDocsPlugin.vue

* Update ui/src/views/plugins/ApiDocsPlugin.vue

* fix performance issues

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Update ui/src/views/plugins/ApiDocsPlugin.vue

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update ui/public/locales/en.json

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* address Suresh's feedback

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* filter example/options as we type

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Address Joao's comments

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants