Skip to content

Commit

Permalink
Merge pull request #843 from NASA-IMPACT/119-chart-dashboard
Browse files Browse the repository at this point in the history
119 chart dashboard
  • Loading branch information
Kshaw362 authored Jun 13, 2024
2 parents 7e4109d + 3bd8cc7 commit 7efbebf
Show file tree
Hide file tree
Showing 8 changed files with 764 additions and 40 deletions.
1 change: 1 addition & 0 deletions sde_collections/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

urlpatterns = [
path("", view=views.CollectionListView.as_view(), name="list"),
path("sde-dashboard/", view=views.SdeDashboardView.as_view(), name="dashboard"),
path("<int:pk>/", view=views.CollectionDetailView.as_view(), name="detail"),
path(
"api/collections/push_to_github/",
Expand Down
21 changes: 19 additions & 2 deletions sde_collections/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,24 @@ def get_context_data(self, **kwargs):

return context

class SdeDashboardView(LoginRequiredMixin,ListView ):

model = Collection
template_name = "sde_collections/sde_dashboard.html"
context_object_name = "collections"

def get_queryset(self):
return (
super()
.get_queryset()
)

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["segment"] = "collections"
return context



class CollectionFilterMixin:
def get_queryset(self):
Expand Down Expand Up @@ -367,14 +385,13 @@ def create(self, request, *args, **kwargs):

class CollectionViewSet(viewsets.ModelViewSet):
queryset = Collection.objects.all()
serializer_class = CollectionSerializer

class CollectionReadViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Collection.objects.all()
serializer_class = CollectionReadSerializer


class PushToGithubView(APIView):
class PushToGithubView(APIView):
def post(self, request):
collection_ids = request.POST.getlist("collection_ids[]", [])
if len(collection_ids) == 0:
Expand Down
39 changes: 1 addition & 38 deletions sde_indexing_helper/static/css/candidate_url_list.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,6 @@
.select-dropdown.focus {
box-shadow: none, 0 0 0 0.2rem rgba(76, 175, 80, 0.5);
}


.tab-nav {
color: black;
padding-right: 25px;
padding-left: 25px;
font-weight: 500;
}

/* tab headers hover effect */
.tab-nav:hover {
text-decoration: underline;
color: #0066CA;
}

/* alligning tab container with the table */
.nav-tabs {
padding-left: 0px;
}

/* active tab */
.nav-item > .active {
color: #0066CA;
font-weight: 700;
border-bottom: 3px solid #FF3D57;
padding-bottom: 15px;
}

/* line under the tab options */
div > .nav {
padding-bottom: 15px;
border-bottom: 1px solid #F8FAFB;
}

/* badge showing workflow status by header */
.badge {
Expand Down Expand Up @@ -279,11 +246,7 @@ letter-spacing: -0.02em;
font-weight: 500;
}

.pageTitle{
font-size:56px;
color:white;
font-weight:500;
}


.custom-select, .buttons-csv, .customizeColumns, .addPattern{
border-style: solid !important;
Expand Down
40 changes: 40 additions & 0 deletions sde_indexing_helper/static/css/project.css
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ body {

}

.pageTitle{
font-size:56px;
color:white;
font-weight:500;
}
/* base_auth.html layout css */

.auth-wrapper {
Expand Down Expand Up @@ -572,8 +577,43 @@ height: 38px;
justify-content: center;
}

.tab-nav {
color: black;
padding-right: 25px;
padding-left: 25px;
font-weight: 500;
}

.dropdown-menu {
z-index: 1030;
}

/* tab headers hover effect */
.tab-nav:hover {
text-decoration: underline;
color: #0066CA;
}

/* alligning tab container with the table */
.nav-tabs {
padding-left: 0px;
}

/* active tab */
.nav-item > .active {
color: #0066CA;
font-weight: 700;
border-bottom: 3px solid #FF3D57;
padding-bottom: 15px;
}

/* line under the tab options */
div > .nav {
padding-bottom: 15px;
border-bottom: 1px solid #F8FAFB;
}

.divisionDropdown {
appearance: auto !important;
padding:10px;
}
11 changes: 11 additions & 0 deletions sde_indexing_helper/static/css/sde_dashboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.dashboardContainer {
background: #15232E;
padding: 40px 30px;
border-radius: 15px;
}

.filterDiv {
float: right;
margin-top: 10px;
}

Loading

0 comments on commit 7efbebf

Please sign in to comment.