-
Notifications
You must be signed in to change notification settings - Fork 98
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
base: main
Are you sure you want to change the base?
Conversation
b5bec6f
to
f6d915a
Compare
# example, server address and db name should be parametrized, the code | ||
# reorganized into a single class or function, etc. | ||
# | ||
# initial author: [email protected] |
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.
Change the author
#Counting total releases | ||
design_doc = "_design/Release" | ||
url = f"{design_doc}/_view/all" #Existing view | ||
result = list(db.view(url)) |
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.
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'] |
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.
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 |
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.
same data iterated over multiple times, please use a function instead
f6d915a
to
6d066cc
Compare
6d066cc
to
b562cef
Compare
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.
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.
Added a script file which gets back all the required data for dashboard
Following data are fetched
Suggest Reviewer
@ag4ums