Skip to content

Commit

Permalink
Cleanup and update changelog for branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dkudeki committed Jan 5, 2025
1 parent 49d5cdd commit ff48173
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Disable buttons on sidebar until all widgets have loaded and whenever widgets are reloaded from a change
- Download indicator and message for Download the Data [#131](https://github.com/htrc/torchlite-frontend/issues/131)
- Full functionality for Download the Data by calling the endpoint on the backend [#120](https://github.com/htrc/torchlite-backend/issues/120)

### Changed
- Merged changes from stage. [#147](https://github.com/htrc/torchlite-frontend/issues/147)
- Download the Data interface to have only three options [#129](https://github.com/htrc/torchlite-frontend/issues/129)

### Removed

- CSV Download the Data options

## [0.1.0] – 2024-12-09

Expand Down
2 changes: 1 addition & 1 deletion src/layout/MainLayout/SideBar/DataFilterWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const DataFilterWidget = () => {
const router = useRouter();
const { dashboardState, onChangeDashboardState } = useDashboardState();
const { widgetLoadingState } = useContext(AppContext); // Access widgetLoadingState
const allWidgetsLoaded = Object.values(widgetLoadingState).every((isLoaded) => isLoaded === true); // Check if all widgets are loaded
const allWidgetsLoaded = Object.values(widgetLoadingState).every((isLoaded) => isLoaded === true); // Check if all widgets are loaded

const worksetMetadata = dashboardState?.worksetInfo?.volumes || [];
const [filterGroup, setFilterGroup] = useState<any>({});
Expand Down
2 changes: 0 additions & 2 deletions src/layout/MainLayout/SideBar/DownloadWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const CleanDataWidget = () => {
// Check if all widgets are loaded by verifying widgetLoadingState
const allWidgetsLoaded = Object.values(widgetLoadingState).every((isLoaded) => isLoaded === true);

console.log("Download button enabled:", allWidgetsLoaded); // Debug log to check button status

const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setSelectedValue(event.target.value);
};
Expand Down
1 change: 0 additions & 1 deletion src/layout/MainLayout/SideBar/WorksetWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useRouter } from 'next/router';
import React, { useEffect, useState, useContext } from 'react';
import { WidgetType } from 'data/constants';

import { AppContext } from 'contexts/AppContext';
import {
Expand Down
3 changes: 0 additions & 3 deletions src/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ export async function getWidgetData(dashboardId: any, widgetType: any) {
}

export async function getWorksetData(dashboardId: any, dataType: string, filtered: boolean = false) {
//console.log("working here")

//const filterQuery = filtered ? '?filtered=true' : '';
return defaultAxios
.get(`/api/dashboards/${dashboardId}/${dataType}/${filtered}`)
.then((response) => response.data)
Expand Down

0 comments on commit ff48173

Please sign in to comment.