Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export class LightcurveApiClient {
}

async downloadTableData(sourceId: string, ext: DataFileExtensions) {
const endpoint = `${this.baseUrl}/lightcurves/${sourceId}/all/download?format=${ext}`;
const endpoint = `${this.baseUrl}/lightcurves/${sourceId}.${ext}`;
const url = await this.getUrl(endpoint, 'source-data');
const filename = this.makeFileName('source-data', sourceId, null, ext);
this.download(url, filename);
Expand Down
4 changes: 1 addition & 3 deletions src/components/LightcurveDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ export function LightcurveDataTable({
type="button"
className="download-data-btn"
onClick={downloadData}
// title="Download light curve data"
title="This feature is currently unavailable."
disabled
title="Download light curve data"
>
<DownloadIcon width={12} height={12} />
</button>
Expand Down
1 change: 0 additions & 1 deletion src/components/SkyExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ export function SkyExplorer({
dataDownloadExt as DataFileExtensions
)
}
disabled
>
<DownloadIcon width={12} height={12} />
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/configs/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const DEFAULT_SOURCES_PER_PAGE = Number(

export const CUTOUT_EXT_OPTIONS = ['png', 'fits', 'hdf5'];

export const DATA_EXT_OPTIONS = ['hdf5', 'csv'];
export const DATA_EXT_OPTIONS = ['parquet', 'hdf5', 'csv'];

export const BINNING_STRATEGY_OPTIONS: Exclude<BinningStrategy, 'none'>[] = [
'1 day',
Expand Down
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export type BinnedLightcurveData = {
export type CutoutFileExtensions = 'fits' | 'png' | 'hdf5';

/** Literal type of possible light curve data file extensions */
export type DataFileExtensions = 'csv' | 'hdf5';
export type DataFileExtensions = 'csv' | 'hdf5' | 'parquet';

export function isFrequencyLightcurveData(
obj: unknown
Expand Down
2 changes: 1 addition & 1 deletion tests/api/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('LightcurveApiClient', () => {
await client.downloadTableData('src-1', 'csv');

expect(fetchMock).toHaveBeenCalledWith(
`${BASE_URL}/lightcurves/src-1/all/download?format=csv`
`${BASE_URL}/lightcurves/src-1.csv`
);

const anchor = appendChildSpy.mock.calls
Expand Down
Loading