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 widgets #3362

Merged
merged 54 commits into from
Jan 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a9a13de
fix: created dashboard, widgets and dashboard widget model
NarayanBavisetti Jan 8, 2024
76b1ead
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 8, 2024
b0c5293
fix: new user home dashboard
NarayanBavisetti Jan 8, 2024
3aa6ef6
chore: recent projects list
NarayanBavisetti Jan 8, 2024
9ee1b65
chore: recent collaborators
NarayanBavisetti Jan 8, 2024
b1bcbb8
chore: priority order change
NarayanBavisetti Jan 8, 2024
2bb57ac
chore: payload changes
NarayanBavisetti Jan 8, 2024
b64d6bc
chore: collaborator's active issue count
NarayanBavisetti Jan 8, 2024
3849e60
chore: all dashboard widgets added with services and typs
aaryan610 Jan 8, 2024
c4c7081
chore: centered metric for pie chart
aaryan610 Jan 9, 2024
0ea0f0b
chore: assigned and created issues widgets
aaryan610 Jan 9, 2024
151e846
chore: widget filters
NarayanBavisetti Jan 9, 2024
d321f7e
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 9, 2024
89fd0a2
chore: created issue filter
NarayanBavisetti Jan 9, 2024
a1ed588
fix: created and assigned issues payload change
NarayanBavisetti Jan 10, 2024
bb20e17
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 10, 2024
faac5c2
chore: created issue payload change
NarayanBavisetti Jan 11, 2024
a31abef
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 11, 2024
50a3f9b
fix: date filter change
NarayanBavisetti Jan 11, 2024
1be726d
chore: implement filters
aaryan610 Jan 11, 2024
d619ec5
fix: merge conflicts resolved
aaryan610 Jan 11, 2024
6172d3a
fix: added expansion fields
NarayanBavisetti Jan 11, 2024
8a8fcd1
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 11, 2024
9c1a269
fix: changed issue structure with relation
NarayanBavisetti Jan 12, 2024
c8f476f
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 12, 2024
e97f713
chore: new issues response
aaryan610 Jan 12, 2024
0660344
fix: project member fix
NarayanBavisetti Jan 12, 2024
349842e
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 12, 2024
3eeb448
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 12, 2024
b446f93
chore: updated issue_relation structure
gurusainath Jan 15, 2024
f9907fd
chore: code cleanup
NarayanBavisetti Jan 16, 2024
d12b259
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 16, 2024
1635e34
Merge branch 'develop' of github.com:makeplane/plane into feat/dashbo…
NarayanBavisetti Jan 16, 2024
6f4d86a
chore: update issues response and added empty states
aaryan610 Jan 16, 2024
3c7d6fc
fix: merge conflicts resolved from develop
aaryan610 Jan 16, 2024
13a26cd
fix: button text wrap
aaryan610 Jan 16, 2024
94cdb1e
chore: update empty state messages
aaryan610 Jan 16, 2024
7c6dc75
fix: filters
aaryan610 Jan 17, 2024
3a5e758
chore: update dark mode empty states
aaryan610 Jan 17, 2024
fc102f2
build-error: Type check in the issue relation service
gurusainath Jan 17, 2024
51daa0c
fix: issues redirection
aaryan610 Jan 17, 2024
307b1ec
Merge branch 'feat/dashboard-widgets' of https://github.com/makeplane…
aaryan610 Jan 17, 2024
b26a8ea
fix: project empty state
aaryan610 Jan 17, 2024
abd25f3
chore: project member active check
NarayanBavisetti Jan 17, 2024
1ef2377
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 17, 2024
df036d4
chore: project member check in state and priority
NarayanBavisetti Jan 17, 2024
f1abddf
chore: remove console logs and replace harcoded values with constants
aaryan610 Jan 17, 2024
336cbcc
Merge branch 'feat/dashboard-widgets' of https://github.com/makeplane…
aaryan610 Jan 17, 2024
1666ad3
fix: code refactoring
NarayanBavisetti Jan 18, 2024
235c771
Merge branch 'feat/dashboard-widgets' of github.com:makeplane/plane i…
NarayanBavisetti Jan 18, 2024
e63dd34
fix: key name changed
NarayanBavisetti Jan 18, 2024
20f6714
refactor: mapping through similar components using an array
aaryan610 Jan 18, 2024
8a3a513
Merge branch 'feat/dashboard-widgets' of https://github.com/makeplane…
aaryan610 Jan 18, 2024
59249a0
fix: build errors
aaryan610 Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: recent projects list
  • Loading branch information
NarayanBavisetti committed Jan 8, 2024
commit 3aa6ef6389eca0ae5502cab777a21dec0dbc778d
26 changes: 9 additions & 17 deletions apiserver/plane/app/views/dashboard.py
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
F,
Exists,
OuterRef,
Max,
)

# Third Party imports
@@ -235,35 +236,26 @@ def dashboard_recent_activity(request, slug):


def dashboard_recent_projects(request, slug):
# first get all the projects in which the user is part of
projects = ProjectMember.objects.filter(
member=request.user,
is_active=True,
).values_list("project_id", flat=True)

# now order the projects by the last activity change
recent_projects = (
top_5_project_ids = (
IssueActivity.objects.filter(
workspace__slug=slug,
project__project_projectmember__member=request.user,
project_id__in=projects,
actor=request.user,
)
.select_related("project")
.order_by("updated_at")[:5]
.values('project_id')
.annotate(latest_activity=Max('updated_at'))
.order_by('-latest_activity')[:5]
)

# just return all the project ids
project_ids = [activity['project_id'] for activity in top_5_project_ids]

return Response(
{
"recent_projects": DashBoardIssueSerializer(
recent_projects, many=True
).data,
},
{"project_ids": project_ids},
status=status.HTTP_200_OK,
)



def dashboard_recent_collaborators(request, slug):
recent_collaborators = Issue.issue_objects.filter(
workspace__slug=slug,