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

feat(dashboard): Added code for dashboard #2183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eldrin30
Copy link
Contributor

@eldrin30 eldrin30 commented Nov 9, 2023

Added a script file which gets back all the required data for dashboard
Following data are fetched

  1. Counting total number of comp, proj, rel
  2. Time Series by Year for Proj, Comp, Rel
  3. Number of Components by Type
  4. CLI Size
  5. Cleared/Not Cleared Releases
  6. Attachment Disk Usage Total
  7. Most Used Components
  8. Most Used Licenses
  9. Components that are not used

Suggest Reviewer

@ag4ums

@eldrin30 eldrin30 force-pushed the feat/dashboard branch 2 times, most recently from b5bec6f to f6d915a Compare November 9, 2023 17:27
@ag4ums ag4ums added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Nov 10, 2023
@ag4ums ag4ums self-assigned this Nov 29, 2023
# example, server address and db name should be parametrized, the code
# reorganized into a single class or function, etc.
#
# initial author: [email protected]
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the author

#Counting total releases
design_doc = "_design/Release"
url = f"{design_doc}/_view/all" #Existing view
result = list(db.view(url))
Copy link
Contributor

Choose a reason for hiding this comment

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

separate count method and then parse the design docs

def dbAttachmentConnection():
print('\nConnecting to local couchdb stage server....../')
couch = couchdb.Server("http://localhost:5984/")
return couch['sw360attachments']
Copy link
Contributor

Choose a reason for hiding this comment

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

duplication in database connection functions, please define in a single place

business_unit = doc["value"]["group"]
length = doc["length"]
group_info[business_unit]["count"] += 1
group_info[business_unit]["total_length"] += length
Copy link
Contributor

@ag4ums ag4ums Mar 26, 2024

Choose a reason for hiding this comment

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

same data iterated over multiple times, please use a function instead

@eldrin30 eldrin30 changed the title feat(dashboard): Added a script file which gets back all the required data for dashboard feat(dashboard): Added code for dashboard Apr 23, 2024
Copy link
Contributor

@heliocastro heliocastro left a comment

Choose a reason for hiding this comment

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

What is dashboard ? Why we are doing this now ?
If you plan to push this before sw360 next release, do as well on frontend side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs code review needs general test This is general testing, meaning that there is no org specific issue to check for
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants