-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the frontend talk to the updated backend
This makes the frontend talk to the refactored backend. There are 2 tests which aren't implemented yet while we workout how to mock and handle sessions in tests.
- Loading branch information
Showing
26 changed files
with
743 additions
and
301 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'express-session'; | ||
import { DatasetDTO } from '../../dtos2/dataset-dto'; | ||
|
||
declare module 'express-session' { | ||
interface SessionData { | ||
currentDataset: DatasetDTO; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
export class DatasetInfoDTO { | ||
language?: string; | ||
title?: string; | ||
description?: string; | ||
} | ||
|
||
export class DimensionInfoDTO { | ||
language?: string; | ||
name: string; | ||
description?: string; | ||
notes?: string; | ||
} | ||
|
||
export class SourceDTO { | ||
id: string; | ||
import_id: string; | ||
revision_id: string; | ||
// Commented out as we don't have lookup tables yet | ||
// lookup_table_revision_id?: string; | ||
csv_field: string; | ||
action: string; | ||
} | ||
|
||
export class DimensionDTO { | ||
id: string; | ||
type: string; | ||
start_revision_id: string; | ||
finish_revision_id?: string; | ||
validator?: string; | ||
sources?: SourceDTO[]; | ||
dimensionInfo?: DimensionInfoDTO[]; | ||
dataset_id?: string; | ||
} | ||
|
||
export class ImportDTO { | ||
id: string; | ||
revision_id: string; | ||
mime_type: string; | ||
filename: string; | ||
hash: string; | ||
uploaded_at: string; | ||
type: string; | ||
location: string; | ||
sources?: SourceDTO[]; | ||
} | ||
|
||
export class RevisionDTO { | ||
id: string; | ||
revision_index: number; | ||
creation_date: string; | ||
previous_revision_id?: string; | ||
online_cube_filename?: string; | ||
publish_date?: string; | ||
approval_date?: string; | ||
approved_by?: string; | ||
created_by: string; | ||
imports: ImportDTO[]; | ||
dataset_id?: string; | ||
} | ||
|
||
export class DatasetDTO { | ||
id: string; | ||
creation_date: string; | ||
created_by: string; | ||
live?: string; | ||
archive?: string; | ||
dimensions?: DimensionDTO[]; | ||
revisions: RevisionDTO[]; | ||
datasetInfo?: DatasetInfoDTO[]; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { DatasetDTO } from './dataset-dto'; | ||
import { Error } from './error'; | ||
|
||
export interface PageInfo { | ||
total_records: number | undefined; | ||
start_record: number | undefined; | ||
end_record: number | undefined; | ||
} | ||
|
||
export interface ProcessedCSV { | ||
success: boolean; | ||
dataset: DatasetDTO | undefined; | ||
current_page: number | undefined; | ||
page_info: PageInfo | undefined; | ||
pages: Array<string | number> | undefined; | ||
page_size: number | undefined; | ||
total_pages: number | undefined; | ||
headers: Array<string> | undefined; | ||
data: Array<Array<string>> | undefined; | ||
errors: Array<Error> | undefined; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.