-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: prevent dataset export if not authorized (#898) * fix: component config import from package (#898) --------- Co-authored-by: Fran McDade <[email protected]>
- Loading branch information
Showing
6 changed files
with
116 additions
and
39 deletions.
There are no files selected for viewing
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
68 changes: 65 additions & 3 deletions
68
explorer/site-config/anvil-cmg/dev/detail/dataset/exportMainColumn.ts
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 |
---|---|---|
@@ -1,11 +1,73 @@ | ||
import { ComponentConfig } from "@clevercanary/data-explorer-ui/lib/config/entities"; | ||
import { DatasetsResponse } from "../../../../../app/apis/azul/anvil-cmg/common/responses"; | ||
import * as C from "../../../../../app/components"; | ||
import * as MDX from "../../../../../app/content/anvil-cmg"; | ||
import * as V from "../../../../../app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders"; | ||
|
||
export const mainColumn: ComponentConfig[] = [ | ||
{ | ||
component: C.ExportToTerra, | ||
viewBuilder: V.buildExportEntityToTerra, | ||
} as ComponentConfig<typeof C.ExportToTerra, DatasetsResponse>, | ||
/* Dataset is not accessible; render warning */ | ||
children: [ | ||
{ | ||
children: [ | ||
{ | ||
component: C.FluidAlert, | ||
viewBuilder: V.buildExportEntityWarning, | ||
} as ComponentConfig<typeof C.FluidAlert, DatasetsResponse>, | ||
], | ||
component: C.BackPageContentSingleColumn, | ||
} as ComponentConfig<typeof C.BackPageContentSingleColumn>, | ||
], | ||
component: C.ConditionalComponent, | ||
viewBuilder: V.renderExportEntityWarning, | ||
} as ComponentConfig<typeof C.ConditionalComponent, DatasetsResponse>, | ||
{ | ||
/* Dataset is accessible; render export entity */ | ||
children: [ | ||
/* mainColumn */ | ||
{ | ||
children: [ | ||
{ | ||
component: C.ExportToTerra, | ||
viewBuilder: V.buildExportEntityToTerra, | ||
} as ComponentConfig<typeof C.ExportToTerra, DatasetsResponse>, | ||
], | ||
component: C.BackPageContentMainColumn, | ||
} as ComponentConfig<typeof C.BackPageContentMainColumn>, | ||
/* sideColumn */ | ||
{ | ||
children: [ | ||
{ | ||
children: [ | ||
{ | ||
component: C.ExportCurrentQuery, | ||
viewBuilder: V.buildExportCurrentQuery, | ||
} as ComponentConfig<typeof C.ExportCurrentQuery>, | ||
{ | ||
component: C.ExportSelectedDataSummary, | ||
viewBuilder: V.buildExportSelectedDataSummary, | ||
} as ComponentConfig<typeof C.ExportSelectedDataSummary>, | ||
], | ||
component: C.ExportSummary, | ||
} as ComponentConfig<typeof C.ExportSummary>, | ||
{ | ||
children: [ | ||
{ | ||
children: [ | ||
{ | ||
component: MDX.DataReleasePolicy, | ||
} as ComponentConfig<typeof MDX.DataReleasePolicy>, | ||
], | ||
component: MDX.Section, | ||
} as ComponentConfig<typeof MDX.Section>, | ||
], | ||
component: C.FluidPaper, | ||
} as ComponentConfig<typeof C.FluidPaper>, | ||
], | ||
component: C.BackPageContentSideColumn, | ||
} as ComponentConfig<typeof C.BackPageContentSideColumn>, | ||
], | ||
component: C.ConditionalComponent, | ||
viewBuilder: V.renderExportEntity, | ||
} as ComponentConfig<typeof C.ConditionalComponent, DatasetsResponse>, | ||
]; |
33 changes: 0 additions & 33 deletions
33
explorer/site-config/anvil-cmg/dev/detail/dataset/exportSideColumn.ts
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
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