@openneuro/app 4.1.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -18
- package/src/scripts/common/forms/warn-button.jsx +1 -1
- package/src/scripts/{redesign.tsx → index.tsx} +4 -4
- package/src/scripts/pages/citation-page.tsx +41 -0
- package/src/scripts/refactor_2021/admin/admin.jsx +1 -1
- package/src/scripts/refactor_2021/admin/flagged-files.jsx +2 -1
- package/src/scripts/refactor_2021/admin/user-tools.tsx +3 -5
- package/src/scripts/refactor_2021/admin/users.jsx +7 -10
- package/src/scripts/{authentication → refactor_2021/authentication}/__tests__/profile.spec.js +1 -1
- package/src/scripts/refactor_2021/containers/footer.tsx +1 -3
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/__snapshots__/comment.spec.jsx.snap +0 -8
- package/src/scripts/refactor_2021/dataset/comments/__tests__/__snapshots__/comments.spec.jsx.snap +129 -0
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/comment.spec.jsx +0 -0
- package/src/scripts/{datalad/dataset → refactor_2021/dataset/comments}/__tests__/comments.spec.jsx +0 -0
- package/src/scripts/refactor_2021/dataset/dataset-query.jsx +5 -3
- package/src/scripts/refactor_2021/dataset/dataset-routes.jsx +14 -4
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/download-link.spec.jsx.snap +645 -105
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/__snapshots__/shell-example.spec.jsx.snap +6 -3
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-command-line.spec.jsx +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-link.spec.jsx +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/download-native.spec.js +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/download/__tests__/shell-example.spec.jsx +0 -0
- package/src/scripts/refactor_2021/dataset/download/download-datalad.jsx +45 -10
- package/src/scripts/refactor_2021/dataset/draft-container.tsx +2 -0
- package/src/scripts/refactor_2021/dataset/files/file-tree.jsx +3 -2
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/cancel-button.spec.tsx.snap +10 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/edit-button.spec.tsx.snap +10 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +24 -0
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/__snapshots__/save-button.spec.tsx.snap +10 -0
- package/src/scripts/{datalad/fragments/__tests__/__snapshots__/select-input.spec.jsx.snap → refactor_2021/dataset/fragments/__tests__/__snapshots__/select-input.spec.tsx.snap} +0 -0
- package/src/scripts/{datalad/fragments/__tests__/cancel-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/cancel-button.spec.tsx} +2 -2
- package/src/scripts/{datalad → refactor_2021/dataset}/fragments/__tests__/dataset-citation.spec.jsx +0 -0
- package/src/scripts/{datalad/fragments/__tests__/edit-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/edit-button.spec.tsx} +2 -2
- package/src/scripts/refactor_2021/dataset/fragments/__tests__/edit-list.spec.jsx +27 -0
- package/src/scripts/{datalad/fragments/__tests__/save-button.spec.jsx → refactor_2021/dataset/fragments/__tests__/save-button.spec.tsx} +2 -2
- package/src/scripts/{datalad/fragments/__tests__/select-input.spec.jsx → refactor_2021/dataset/fragments/__tests__/select-input.spec.tsx} +0 -0
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +50 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/__snapshots__/description.spec.jsx.snap +0 -0
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +27 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/cache-id.spec.js +0 -0
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/delete.spec.jsx +8 -8
- package/src/scripts/{datalad → refactor_2021/dataset}/mutations/__tests__/description.spec.jsx +0 -0
- package/src/scripts/{datalad/mutations/__tests__/remove-permissions.spec.jsx → refactor_2021/dataset/mutations/__tests__/remove-permissions.spec.tsx} +1 -1
- package/src/scripts/refactor_2021/dataset/mutations/__tests__/update-permissions.spec.jsx +28 -0
- package/src/scripts/refactor_2021/dataset/mutations/dataset-relations.tsx +1 -1
- package/src/scripts/refactor_2021/dataset/mutations/update-file.jsx +2 -2
- package/src/scripts/refactor_2021/dataset/routes/download-dataset.tsx +76 -0
- package/src/scripts/refactor_2021/dataset/snapshot-container.tsx +10 -4
- package/src/scripts/refactor_2021/routes.tsx +1 -1
- package/src/scripts/refactor_2021/search/__tests__/search-params-ctx.spec.tsx +20 -0
- package/src/scripts/refactor_2021/search/initial-search-params.tsx +7 -7
- package/src/scripts/refactor_2021/search/inputs/__tests__/sort-by-select.spec.tsx +83 -0
- package/src/scripts/refactor_2021/search/inputs/index.ts +2 -2
- package/src/scripts/refactor_2021/search/inputs/{gender-radios.tsx → sex-radios.tsx} +10 -10
- package/src/scripts/refactor_2021/search/inputs/sort-by-select.tsx +38 -8
- package/src/scripts/refactor_2021/search/search-container.tsx +3 -3
- package/src/scripts/refactor_2021/search/search-params-ctx.tsx +3 -3
- package/src/scripts/refactor_2021/search/use-search-results.tsx +4 -3
- package/src/scripts/refactor_2021/uploader/upload-disclaimer.jsx +4 -3
- package/src/scripts/refactor_2021/user/api.jsx +11 -6
- package/src/server.jsx +1 -5
- package/src/ssr.ts +0 -1
- package/src/sass/_bootstrap-compass.scss +0 -9
- package/src/sass/_bootstrap-mincer.scss +0 -19
- package/src/sass/_bootstrap-sprockets.scss +0 -9
- package/src/sass/_bootstrap.scss +0 -50
- package/src/sass/animate/_attention-seekers/_bounce.scss +0 -15
- package/src/sass/animate/_attention-seekers/_flash.scss +0 -14
- package/src/sass/animate/_attention-seekers/_pulse.scss +0 -17
- package/src/sass/animate/_attention-seekers/_rubberBand.scss +0 -19
- package/src/sass/animate/_attention-seekers/_shake.scss +0 -15
- package/src/sass/animate/_attention-seekers/_swing.scss +0 -19
- package/src/sass/animate/_attention-seekers/_tada.scss +0 -17
- package/src/sass/animate/_attention-seekers/_wobble.scss +0 -21
- package/src/sass/animate/_attention-seekers/attention-seekers.scss +0 -12
- package/src/sass/animate/_bouncing-entrances/_bounceIn.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInDown.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInLeft.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInRight.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/_bounceInUp.scss +0 -26
- package/src/sass/animate/_bouncing-entrances/bouncing-entrances.scss +0 -9
- package/src/sass/animate/_bouncing-exits/_bounceOut.scss +0 -26
- package/src/sass/animate/_bouncing-exits/_bounceOutDown.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutLeft.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutRight.scss +0 -23
- package/src/sass/animate/_bouncing-exits/_bounceOutUp.scss +0 -23
- package/src/sass/animate/_bouncing-exits/bouncing-exits.scss +0 -4
- package/src/sass/animate/_fading-entrances/_fadeIn.scss +0 -14
- package/src/sass/animate/_fading-entrances/_fadeInDown.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInDownBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInLeft.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInLeftBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInRight.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInRightBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/_fadeInUp.scss +0 -19
- package/src/sass/animate/_fading-entrances/_fadeInUpBig.scss +0 -20
- package/src/sass/animate/_fading-entrances/fading-entrances.scss +0 -5
- package/src/sass/animate/_fading-exits/_fadeOut.scss +0 -14
- package/src/sass/animate/_fading-exits/_fadeOutDown.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutDownBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutLeft.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutLeftBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutRight.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutRightBig.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutUp.scss +0 -20
- package/src/sass/animate/_fading-exits/_fadeOutUpBig.scss +0 -20
- package/src/sass/animate/_fading-exits/fading-exits.scss +0 -5
- package/src/sass/animate/_flippers/_flip.scss +0 -33
- package/src/sass/animate/_flippers/_flipInX.scss +0 -26
- package/src/sass/animate/_flippers/_flipInY.scss +0 -26
- package/src/sass/animate/_flippers/_flipOutX.scss +0 -20
- package/src/sass/animate/_flippers/_flipOutY.scss +0 -20
- package/src/sass/animate/_flippers/flippers.scss +0 -8
- package/src/sass/animate/_lightspeed/_lightSpeedIn.scss +0 -29
- package/src/sass/animate/_lightspeed/_lightSpeedOut.scss +0 -21
- package/src/sass/animate/_lightspeed/lightspeed.scss +0 -3
- package/src/sass/animate/_properties.scss +0 -119
- package/src/sass/animate/_rotating-entrances/_rotateIn.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInDownLeft.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInDownRight.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInUpLeft.scss +0 -22
- package/src/sass/animate/_rotating-entrances/_rotateInUpRight.scss +0 -22
- package/src/sass/animate/_rotating-entrances/rotating-entrances.scss +0 -8
- package/src/sass/animate/_rotating-exits/_rotateOut.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutDownLeft.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutDownRight.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutUpLeft.scss +0 -22
- package/src/sass/animate/_rotating-exits/_rotateOutUpRight.scss +0 -22
- package/src/sass/animate/_rotating-exits/rotating-exits.scss +0 -8
- package/src/sass/animate/_sliding-entrances/_slideInDown.scss +0 -19
- package/src/sass/animate/_sliding-entrances/_slideInLeft.scss +0 -19
- package/src/sass/animate/_sliding-entrances/_slideInRight.scss +0 -42
- package/src/sass/animate/_sliding-entrances/_slideInUp.scss +0 -19
- package/src/sass/animate/_sliding-entrances/sliding-entrances.scss +0 -7
- package/src/sass/animate/_sliding-exits/_slideOutDown.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutLeft.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutRight.scss +0 -19
- package/src/sass/animate/_sliding-exits/_slideOutUp.scss +0 -19
- package/src/sass/animate/_sliding-exits/sliding-exits.scss +0 -7
- package/src/sass/animate/_specials/_hinge.scss +0 -37
- package/src/sass/animate/_specials/_rollIn.scss +0 -20
- package/src/sass/animate/_specials/_rollOut.scss +0 -22
- package/src/sass/animate/_specials/specials.scss +0 -6
- package/src/sass/animate/_zooming-entrances/_zoomIn.scss +0 -19
- package/src/sass/animate/_zooming-entrances/_zoomInDown.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInLeft.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInRight.scss +0 -22
- package/src/sass/animate/_zooming-entrances/_zoomInUp.scss +0 -22
- package/src/sass/animate/_zooming-entrances/zooming-entrances.scss +0 -4
- package/src/sass/animate/_zooming-exits/_zoomOut.scss +0 -22
- package/src/sass/animate/_zooming-exits/_zoomOutDown.scss +0 -23
- package/src/sass/animate/_zooming-exits/_zoomOutLeft.scss +0 -21
- package/src/sass/animate/_zooming-exits/_zoomOutRight.scss +0 -21
- package/src/sass/animate/_zooming-exits/_zoomOutUp.scss +0 -23
- package/src/sass/animate/_zooming-exits/zooming-exits.scss +0 -4
- package/src/sass/animate/animate.css +0 -7497
- package/src/sass/animate/animate.css.map +0 -7
- package/src/sass/animate/animate.min.css +0 -2
- package/src/sass/animate/animate.min.css.map +0 -7
- package/src/sass/animate/animate.scss +0 -30
- package/src/sass/animate/bower.json +0 -22
- package/src/sass/bootstrap/_alerts.scss +0 -70
- package/src/sass/bootstrap/_badges.scss +0 -68
- package/src/sass/bootstrap/_breadcrumbs.scss +0 -26
- package/src/sass/bootstrap/_button-groups.scss +0 -243
- package/src/sass/bootstrap/_buttons.scss +0 -160
- package/src/sass/bootstrap/_carousel.scss +0 -269
- package/src/sass/bootstrap/_close.scss +0 -36
- package/src/sass/bootstrap/_code.scss +0 -69
- package/src/sass/bootstrap/_component-animations.scss +0 -37
- package/src/sass/bootstrap/_dropdowns.scss +0 -223
- package/src/sass/bootstrap/_forms.scss +0 -613
- package/src/sass/bootstrap/_grid.scss +0 -84
- package/src/sass/bootstrap/_input-groups.scss +0 -166
- package/src/sass/bootstrap/_jumbotron.scss +0 -50
- package/src/sass/bootstrap/_labels.scss +0 -66
- package/src/sass/bootstrap/_list-group.scss +0 -124
- package/src/sass/bootstrap/_media.scss +0 -61
- package/src/sass/bootstrap/_mixins.scss +0 -39
- package/src/sass/bootstrap/_modals.scss +0 -150
- package/src/sass/bootstrap/_navbar.scss +0 -647
- package/src/sass/bootstrap/_navs.scss +0 -243
- package/src/sass/bootstrap/_normalize.scss +0 -427
- package/src/sass/bootstrap/_pager.scss +0 -54
- package/src/sass/bootstrap/_pagination.scss +0 -88
- package/src/sass/bootstrap/_panels.scss +0 -265
- package/src/sass/bootstrap/_popovers.scss +0 -135
- package/src/sass/bootstrap/_print.scss +0 -107
- package/src/sass/bootstrap/_progress-bars.scss +0 -87
- package/src/sass/bootstrap/_responsive-embed.scss +0 -35
- package/src/sass/bootstrap/_responsive-utilities.scss +0 -177
- package/src/sass/bootstrap/_scaffolding.scss +0 -162
- package/src/sass/bootstrap/_tables.scss +0 -234
- package/src/sass/bootstrap/_theme.scss +0 -273
- package/src/sass/bootstrap/_thumbnails.scss +0 -38
- package/src/sass/bootstrap/_tooltip.scss +0 -102
- package/src/sass/bootstrap/_type.scss +0 -298
- package/src/sass/bootstrap/_utilities.scss +0 -55
- package/src/sass/bootstrap/_variables.scss +0 -866
- package/src/sass/bootstrap/_wells.scss +0 -29
- package/src/sass/bootstrap/float-label.scss +0 -70
- package/src/sass/bootstrap/mixins/_alerts.scss +0 -14
- package/src/sass/bootstrap/mixins/_background-variant.scss +0 -11
- package/src/sass/bootstrap/mixins/_border-radius.scss +0 -18
- package/src/sass/bootstrap/mixins/_buttons.scss +0 -52
- package/src/sass/bootstrap/mixins/_center-block.scss +0 -7
- package/src/sass/bootstrap/mixins/_clearfix.scss +0 -22
- package/src/sass/bootstrap/mixins/_forms.scss +0 -88
- package/src/sass/bootstrap/mixins/_gradients.scss +0 -58
- package/src/sass/bootstrap/mixins/_grid-framework.scss +0 -81
- package/src/sass/bootstrap/mixins/_grid.scss +0 -122
- package/src/sass/bootstrap/mixins/_hide-text.scss +0 -21
- package/src/sass/bootstrap/mixins/_image.scss +0 -33
- package/src/sass/bootstrap/mixins/_labels.scss +0 -12
- package/src/sass/bootstrap/mixins/_list-group.scss +0 -31
- package/src/sass/bootstrap/mixins/_nav-divider.scss +0 -10
- package/src/sass/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- package/src/sass/bootstrap/mixins/_opacity.scss +0 -8
- package/src/sass/bootstrap/mixins/_pagination.scss +0 -23
- package/src/sass/bootstrap/mixins/_panels.scss +0 -24
- package/src/sass/bootstrap/mixins/_progress-bar.scss +0 -10
- package/src/sass/bootstrap/mixins/_reset-filter.scss +0 -8
- package/src/sass/bootstrap/mixins/_resize.scss +0 -6
- package/src/sass/bootstrap/mixins/_responsive-visibility.scss +0 -21
- package/src/sass/bootstrap/mixins/_size.scss +0 -10
- package/src/sass/bootstrap/mixins/_tab-focus.scss +0 -9
- package/src/sass/bootstrap/mixins/_table-row.scss +0 -28
- package/src/sass/bootstrap/mixins/_text-emphasis.scss +0 -11
- package/src/sass/bootstrap/mixins/_text-overflow.scss +0 -8
- package/src/sass/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- package/src/sass/crn_app/_admin.admin.scss +0 -205
- package/src/sass/crn_app/_admin.graphs.scss +0 -51
- package/src/sass/crn_app/_admin.tools.scss +0 -24
- package/src/sass/crn_app/_api.scss +0 -65
- package/src/sass/crn_app/_bootstrap.overrides.scss +0 -54
- package/src/sass/crn_app/_colors.scss +0 -88
- package/src/sass/crn_app/_common.click-to-edit.scss +0 -187
- package/src/sass/crn_app/_common.modals.scss +0 -686
- package/src/sass/crn_app/_common.pagination.scss +0 -41
- package/src/sass/crn_app/_common.papaya.scss +0 -348
- package/src/sass/crn_app/_common.progress-bar.scss +0 -26
- package/src/sass/crn_app/_common.spinner.scss +0 -63
- package/src/sass/crn_app/_common.status.scss +0 -103
- package/src/sass/crn_app/_common.tooltip.scss +0 -22
- package/src/sass/crn_app/_common.typeahead.scss +0 -31
- package/src/sass/crn_app/_common.variables.scss +0 -16
- package/src/sass/crn_app/_dashboard.datasets.scss +0 -588
- package/src/sass/crn_app/_dataset.comments.scss +0 -201
- package/src/sass/crn_app/_dataset.dataset.scss +0 -161
- package/src/sass/crn_app/_dataset.file-tree.scss +0 -277
- package/src/sass/crn_app/_dataset.jobs.scss +0 -701
- package/src/sass/crn_app/_dataset.sidebar.scss +0 -265
- package/src/sass/crn_app/_dataset.tools.scss +0 -118
- package/src/sass/crn_app/_elements-wrappers.scss +0 -870
- package/src/sass/crn_app/_faq.scss +0 -37
- package/src/sass/crn_app/_frontPage.scss +0 -569
- package/src/sass/crn_app/_nav.navbar.scss +0 -387
- package/src/sass/crn_app/_theme.scss +0 -87
- package/src/sass/crn_app/_upload.upload.scss +0 -393
- package/src/sass/crn_app/_upload.validation.scss +0 -210
- package/src/sass/draft/draft.scss +0 -11
- package/src/sass/draft/rich-editor.scss +0 -73
- package/src/sass/font-awesome/_animated.scss +0 -34
- package/src/sass/font-awesome/_bordered-pulled.scss +0 -25
- package/src/sass/font-awesome/_core.scss +0 -12
- package/src/sass/font-awesome/_fixed-width.scss +0 -6
- package/src/sass/font-awesome/_font-awesome.scss +0 -17
- package/src/sass/font-awesome/_icons.scss +0 -697
- package/src/sass/font-awesome/_larger.scss +0 -13
- package/src/sass/font-awesome/_list.scss +0 -19
- package/src/sass/font-awesome/_mixins.scss +0 -26
- package/src/sass/font-awesome/_path.scss +0 -15
- package/src/sass/font-awesome/_rotated-flipped.scss +0 -20
- package/src/sass/font-awesome/_stacked.scss +0 -20
- package/src/sass/font-awesome/_variables.scss +0 -713
- package/src/sass/main.scss +0 -317
- package/src/sass/pre-refactor-with-wrapper-main.scss +0 -1549
- package/src/scripts/admin/__tests__/__snapshots__/exports.spec.jsx.snap +0 -112
- package/src/scripts/admin/__tests__/exports.spec.jsx +0 -15
- package/src/scripts/admin/__tests__/users.spec.jsx +0 -15
- package/src/scripts/admin/admin.jsx +0 -53
- package/src/scripts/admin/flagged-files.jsx +0 -178
- package/src/scripts/admin/user-fragment.ts +0 -14
- package/src/scripts/admin/user-tools.tsx +0 -83
- package/src/scripts/admin/users.jsx +0 -224
- package/src/scripts/authentication/admin-user.jsx +0 -23
- package/src/scripts/authentication/buttons.jsx +0 -26
- package/src/scripts/authentication/globus-button.jsx +0 -39
- package/src/scripts/authentication/google-button.jsx +0 -32
- package/src/scripts/authentication/logged-in.jsx +0 -12
- package/src/scripts/authentication/logged-out.jsx +0 -12
- package/src/scripts/authentication/loginCheck.js +0 -7
- package/src/scripts/authentication/orcid-button.jsx +0 -32
- package/src/scripts/authentication/withProfile.jsx +0 -22
- package/src/scripts/classic.tsx +0 -18
- package/src/scripts/common/forms/file-select.tsx +0 -71
- package/src/scripts/common/partials/__tests__/__snapshots__/footer.spec.jsx.snap +0 -42
- package/src/scripts/common/partials/__tests__/__snapshots__/metric.spec.jsx.snap +0 -101
- package/src/scripts/common/partials/__tests__/footer.spec.jsx +0 -10
- package/src/scripts/common/partials/__tests__/metric.spec.jsx +0 -31
- package/src/scripts/common/partials/footer.jsx +0 -40
- package/src/scripts/common/partials/login.jsx +0 -99
- package/src/scripts/common/partials/metric.jsx +0 -73
- package/src/scripts/common/partials/spinner.jsx +0 -34
- package/src/scripts/common/partials/status.jsx +0 -96
- package/src/scripts/common/partials/timeout.jsx +0 -47
- package/src/scripts/common/partials/tooltip.jsx +0 -36
- package/src/scripts/components/__tests__/dropdown-button.spec.tsx +0 -49
- package/src/scripts/components/dropdown-button.tsx +0 -42
- package/src/scripts/components/feature-toggle.tsx +0 -19
- package/src/scripts/components/panel-group.tsx +0 -24
- package/src/scripts/components/panel.tsx +0 -42
- package/src/scripts/datalad/__tests__/snapshotVersion.spec.js +0 -21
- package/src/scripts/datalad/comments/__tests__/comment-editor.spec.jsx +0 -19
- package/src/scripts/datalad/comments/block-style-controls.jsx +0 -46
- package/src/scripts/datalad/comments/comment-editor.jsx +0 -79
- package/src/scripts/datalad/comments/inline-style-controls.jsx +0 -34
- package/src/scripts/datalad/comments/style-button.jsx +0 -28
- package/src/scripts/datalad/dashboard/__tests__/__snapshots__/dashboard.spec.jsx.snap +0 -163
- package/src/scripts/datalad/dashboard/__tests__/dashboard.spec.jsx +0 -21
- package/src/scripts/datalad/dashboard/dashboard.jsx +0 -54
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-filter.spec.jsx.snap +0 -20
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-row-skeleton.spec.jsx.snap +0 -13
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-row.spec.jsx.snap +0 -65
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-sorter.spec.jsx.snap +0 -14
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/dataset-virtual-scroller.spec.jsx.snap +0 -17
- package/src/scripts/datalad/dashboard/datasets/__tests__/__snapshots__/uploaded.spec.jsx.snap +0 -27
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-filter.spec.jsx +0 -67
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-query.spec.jsx +0 -72
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-row-skeleton.spec.jsx +0 -9
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-row.spec.jsx +0 -53
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-sorter.spec.jsx +0 -69
- package/src/scripts/datalad/dashboard/datasets/__tests__/dataset-virtual-scroller.spec.jsx +0 -65
- package/src/scripts/datalad/dashboard/datasets/__tests__/uploaded.spec.jsx +0 -17
- package/src/scripts/datalad/dashboard/datasets/dataset-filter.jsx +0 -78
- package/src/scripts/datalad/dashboard/datasets/dataset-query.jsx +0 -102
- package/src/scripts/datalad/dashboard/datasets/dataset-row-error-boundary.jsx +0 -52
- package/src/scripts/datalad/dashboard/datasets/dataset-row-skeleton.jsx +0 -10
- package/src/scripts/datalad/dashboard/datasets/dataset-row.jsx +0 -58
- package/src/scripts/datalad/dashboard/datasets/dataset-sorter.jsx +0 -148
- package/src/scripts/datalad/dashboard/datasets/dataset-statuses.jsx +0 -44
- package/src/scripts/datalad/dashboard/datasets/dataset-tab.jsx +0 -192
- package/src/scripts/datalad/dashboard/datasets/dataset-virtual-scroller.jsx +0 -126
- package/src/scripts/datalad/dashboard/datasets/row-height.jsx +0 -7
- package/src/scripts/datalad/dashboard/datasets/uploaded.jsx +0 -33
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/comments.spec.jsx.snap +0 -137
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/dataset-page.spec.jsx.snap +0 -69
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/dataset-query.spec.jsx.snap +0 -15
- package/src/scripts/datalad/dataset/__tests__/__snapshots__/left-siderbar.spec.jsx.snap +0 -85
- package/src/scripts/datalad/dataset/__tests__/dataset-page.spec.jsx +0 -33
- package/src/scripts/datalad/dataset/__tests__/dataset-query.spec.jsx +0 -20
- package/src/scripts/datalad/dataset/__tests__/left-siderbar.spec.jsx +0 -106
- package/src/scripts/datalad/dataset/comment.jsx +0 -90
- package/src/scripts/datalad/dataset/comments.jsx +0 -83
- package/src/scripts/datalad/dataset/dataset-description.jsx +0 -111
- package/src/scripts/datalad/dataset/dataset-main.jsx +0 -29
- package/src/scripts/datalad/dataset/dataset-page.jsx +0 -63
- package/src/scripts/datalad/dataset/dataset-query.jsx +0 -192
- package/src/scripts/datalad/dataset/dataset.jsx +0 -22
- package/src/scripts/datalad/dataset/delete-page.tsx +0 -92
- package/src/scripts/datalad/dataset/left-sidebar.jsx +0 -109
- package/src/scripts/datalad/download/__tests__/__snapshots__/download-dataset.spec.jsx.snap +0 -7
- package/src/scripts/datalad/download/__tests__/__snapshots__/download-tool.spec.jsx.snap +0 -26
- package/src/scripts/datalad/download/__tests__/download-dataset.spec.jsx +0 -19
- package/src/scripts/datalad/download/__tests__/download-tool.spec.jsx +0 -19
- package/src/scripts/datalad/download/download-command-line.jsx +0 -43
- package/src/scripts/datalad/download/download-datalad.jsx +0 -58
- package/src/scripts/datalad/download/download-dataset.jsx +0 -61
- package/src/scripts/datalad/download/download-link.jsx +0 -41
- package/src/scripts/datalad/download/download-native.js +0 -118
- package/src/scripts/datalad/download/download-query.js +0 -22
- package/src/scripts/datalad/download/download-s3.jsx +0 -46
- package/src/scripts/datalad/download/download-tool.jsx +0 -44
- package/src/scripts/datalad/download/native-file-toast.jsx +0 -90
- package/src/scripts/datalad/download/shell-example.jsx +0 -9
- package/src/scripts/datalad/download/track-download.js +0 -15
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/cancel-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-analytics.spec.jsx.snap +0 -41
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-authors.spec.jsx.snap +0 -13
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-readme.spec.jsx.snap +0 -49
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-title.spec.jsx.snap +0 -7
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-tools.spec.jsx.snap +0 -346
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/dataset-uploaded.spec.jsx.snap +0 -7
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-list.spec.jsx.snap +0 -34
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/edit-readme.spec.jsx.snap +0 -3
- package/src/scripts/datalad/fragments/__tests__/__snapshots__/save-button.spec.jsx.snap +0 -21
- package/src/scripts/datalad/fragments/__tests__/dataset-analytics.spec.jsx +0 -16
- package/src/scripts/datalad/fragments/__tests__/dataset-authors.spec.jsx +0 -22
- package/src/scripts/datalad/fragments/__tests__/dataset-prominent-links.spec.jsx +0 -32
- package/src/scripts/datalad/fragments/__tests__/dataset-readme.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/__tests__/dataset-summary.spec.jsx +0 -55
- package/src/scripts/datalad/fragments/__tests__/dataset-title.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/__tests__/dataset-tools.spec.jsx +0 -55
- package/src/scripts/datalad/fragments/__tests__/dataset-uploaded.spec.jsx +0 -16
- package/src/scripts/datalad/fragments/__tests__/edit-list.spec.jsx +0 -25
- package/src/scripts/datalad/fragments/__tests__/edit-readme.spec.jsx +0 -10
- package/src/scripts/datalad/fragments/cancel-button.jsx +0 -24
- package/src/scripts/datalad/fragments/copyable-tooltip.jsx +0 -82
- package/src/scripts/datalad/fragments/dataset-analytics.jsx +0 -27
- package/src/scripts/datalad/fragments/dataset-authors.jsx +0 -16
- package/src/scripts/datalad/fragments/dataset-citation.jsx +0 -77
- package/src/scripts/datalad/fragments/dataset-files.jsx +0 -50
- package/src/scripts/datalad/fragments/dataset-git-access.jsx +0 -56
- package/src/scripts/datalad/fragments/dataset-git-hash.jsx +0 -27
- package/src/scripts/datalad/fragments/dataset-history.jsx +0 -95
- package/src/scripts/datalad/fragments/dataset-modified.jsx +0 -17
- package/src/scripts/datalad/fragments/dataset-prominent-links.jsx +0 -129
- package/src/scripts/datalad/fragments/dataset-readme.jsx +0 -42
- package/src/scripts/datalad/fragments/dataset-summary.jsx +0 -230
- package/src/scripts/datalad/fragments/dataset-title.jsx +0 -10
- package/src/scripts/datalad/fragments/dataset-tools.jsx +0 -190
- package/src/scripts/datalad/fragments/dataset-uploaded.jsx +0 -25
- package/src/scripts/datalad/fragments/edit-button.jsx +0 -24
- package/src/scripts/datalad/fragments/edit-description-field.jsx +0 -54
- package/src/scripts/datalad/fragments/edit-description-list.jsx +0 -49
- package/src/scripts/datalad/fragments/edit-list.jsx +0 -82
- package/src/scripts/datalad/fragments/edit-readme.jsx +0 -44
- package/src/scripts/datalad/fragments/incomplete-dataset.jsx +0 -23
- package/src/scripts/datalad/fragments/metadata-tool.jsx +0 -34
- package/src/scripts/datalad/fragments/number-input.tsx +0 -126
- package/src/scripts/datalad/fragments/save-button.jsx +0 -24
- package/src/scripts/datalad/fragments/select-input.tsx +0 -247
- package/src/scripts/datalad/fragments/share-dataset-button.jsx +0 -32
- package/src/scripts/datalad/fragments/text-array-input.tsx +0 -119
- package/src/scripts/datalad/fragments/text-input.tsx +0 -206
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/comment.spec.jsx.snap +0 -5
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/delete.spec.jsx.snap +0 -181
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/manage-permissions.spec.jsx.snap +0 -361
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/subscribe-to-newsletter.spec.jsx.snap +0 -83
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/update-file.spec.jsx.snap +0 -25
- package/src/scripts/datalad/mutations/__tests__/__snapshots__/update-permissions.spec.jsx.snap +0 -361
- package/src/scripts/datalad/mutations/__tests__/comment.spec.jsx +0 -154
- package/src/scripts/datalad/mutations/__tests__/manage-permissions.spec.jsx +0 -21
- package/src/scripts/datalad/mutations/__tests__/subscribe-to-newsletter.spec.jsx +0 -10
- package/src/scripts/datalad/mutations/__tests__/update-file.spec.jsx +0 -15
- package/src/scripts/datalad/mutations/__tests__/update-permissions.spec.jsx +0 -21
- package/src/scripts/datalad/mutations/add-metadata.jsx +0 -164
- package/src/scripts/datalad/mutations/comment.jsx +0 -164
- package/src/scripts/datalad/mutations/delete-dataset-form.jsx +0 -82
- package/src/scripts/datalad/mutations/description.jsx +0 -129
- package/src/scripts/datalad/mutations/flag-annex-object.jsx +0 -62
- package/src/scripts/datalad/mutations/metadata-form.jsx +0 -388
- package/src/scripts/datalad/mutations/readme.jsx +0 -53
- package/src/scripts/datalad/mutations/remove-annex-object.jsx +0 -71
- package/src/scripts/datalad/mutations/subscribe-to-newsletter.jsx +0 -26
- package/src/scripts/datalad/mutations/update-file.jsx +0 -51
- package/src/scripts/datalad/routes/__tests__/__snapshots__/manage-permissions.spec.jsx.snap +0 -159
- package/src/scripts/datalad/routes/__tests__/__snapshots__/snapshot.spec.jsx.snap +0 -31
- package/src/scripts/datalad/routes/__tests__/dataset-content.spec.jsx +0 -108
- package/src/scripts/datalad/routes/__tests__/file-display.spec.jsx +0 -22
- package/src/scripts/datalad/routes/__tests__/manage-permissions.spec.jsx +0 -101
- package/src/scripts/datalad/routes/__tests__/snapshot.spec.jsx +0 -49
- package/src/scripts/datalad/routes/admin-datalad.jsx +0 -45
- package/src/scripts/datalad/routes/admin-exports.jsx +0 -125
- package/src/scripts/datalad/routes/dataset-content.jsx +0 -198
- package/src/scripts/datalad/routes/dataset-routes.jsx +0 -162
- package/src/scripts/datalad/routes/file-display.jsx +0 -84
- package/src/scripts/datalad/routes/manage-permissions.jsx +0 -128
- package/src/scripts/datalad/routes/snapshot-content.jsx +0 -135
- package/src/scripts/datalad/routes/snapshot.jsx +0 -131
- package/src/scripts/datalad/snapshotVersion.js +0 -7
- package/src/scripts/datalad/validation/validation-panel.jsx +0 -48
- package/src/scripts/datalad/validation/validation-status.jsx +0 -120
- package/src/scripts/datalad/validation/validation.jsx +0 -40
- package/src/scripts/dataset/dataset.metrics.jsx +0 -61
- package/src/scripts/file-tree/__tests__/__snapshots__/file-tree-unloaded-directory.spec.jsx.snap +0 -26
- package/src/scripts/file-tree/__tests__/__snapshots__/file-tree.spec.jsx.snap +0 -18
- package/src/scripts/file-tree/__tests__/__snapshots__/file.spec.jsx.snap +0 -81
- package/src/scripts/file-tree/__tests__/file-tree-loading.spec.jsx +0 -18
- package/src/scripts/file-tree/__tests__/file-tree-unloaded-directory.spec.jsx +0 -74
- package/src/scripts/file-tree/__tests__/file-tree.spec.jsx +0 -94
- package/src/scripts/file-tree/__tests__/file-viewer-type.spec.jsx +0 -15
- package/src/scripts/file-tree/__tests__/file.spec.jsx +0 -44
- package/src/scripts/file-tree/__tests__/flat-to-tree.spec.js +0 -55
- package/src/scripts/file-tree/file-tree-loading.jsx +0 -64
- package/src/scripts/file-tree/file-tree-unloaded-directory.jsx +0 -108
- package/src/scripts/file-tree/file-tree.jsx +0 -133
- package/src/scripts/file-tree/file-view.jsx +0 -31
- package/src/scripts/file-tree/file-viewer-type.jsx +0 -45
- package/src/scripts/file-tree/file.jsx +0 -123
- package/src/scripts/file-tree/files.jsx +0 -126
- package/src/scripts/file-tree/flat-to-tree.js +0 -49
- package/src/scripts/file-tree/viewers/__tests__/__snapshots__/file-viewer-json.spec.jsx.snap +0 -51
- package/src/scripts/file-tree/viewers/__tests__/file-viewer-json.spec.jsx +0 -15
- package/src/scripts/file-tree/viewers/__tests__/parse-tabular.spec.js +0 -24
- package/src/scripts/file-tree/viewers/file-viewer-csv.jsx +0 -16
- package/src/scripts/file-tree/viewers/file-viewer-html.jsx +0 -20
- package/src/scripts/file-tree/viewers/file-viewer-json.jsx +0 -50
- package/src/scripts/file-tree/viewers/file-viewer-nifti.jsx +0 -11
- package/src/scripts/file-tree/viewers/file-viewer-table.jsx +0 -34
- package/src/scripts/file-tree/viewers/file-viewer-text.jsx +0 -13
- package/src/scripts/file-tree/viewers/file-viewer-tsv.jsx +0 -16
- package/src/scripts/file-tree/viewers/parse-tabular.js +0 -18
- package/src/scripts/front-page/__tests__/__snapshots__/email-subscription-box.spec.jsx.snap +0 -190
- package/src/scripts/front-page/__tests__/__snapshots__/front-page-stats.spec.jsx.snap +0 -29
- package/src/scripts/front-page/__tests__/__snapshots__/front-page-top-datasets.spec.jsx.snap +0 -464
- package/src/scripts/front-page/__tests__/dataset-count.spec.jsx +0 -33
- package/src/scripts/front-page/__tests__/email-subscription-box.spec.jsx +0 -57
- package/src/scripts/front-page/__tests__/front-page-stats.spec.jsx +0 -10
- package/src/scripts/front-page/__tests__/front-page-top-datasets.spec.jsx +0 -27
- package/src/scripts/front-page/__tests__/participant-count.spec.jsx +0 -31
- package/src/scripts/front-page/dataset-count.jsx +0 -29
- package/src/scripts/front-page/email-subscription-box.jsx +0 -131
- package/src/scripts/front-page/front-page-additional-info.jsx +0 -15
- package/src/scripts/front-page/front-page-collaborators.jsx +0 -117
- package/src/scripts/front-page/front-page-stats.jsx +0 -71
- package/src/scripts/front-page/front-page-support.jsx +0 -30
- package/src/scripts/front-page/front-page-tabs.jsx +0 -166
- package/src/scripts/front-page/front-page-top-datasets.jsx +0 -203
- package/src/scripts/front-page/front-page.jsx +0 -95
- package/src/scripts/front-page/participant-count.jsx +0 -25
- package/src/scripts/hooks/use-measure.js +0 -15
- package/src/scripts/hooks/use-previous.js +0 -7
- package/src/scripts/index.jsx +0 -16
- package/src/scripts/nav/assets/brand_mark.png +0 -0
- package/src/scripts/nav/assets/favicon-upload.png +0 -0
- package/src/scripts/nav/assets/logo_app.png +0 -0
- package/src/scripts/nav/navbar.jsx +0 -144
- package/src/scripts/nav/navbar.navmenu.jsx +0 -106
- package/src/scripts/nav/navbar.usermenu.jsx +0 -52
- package/src/scripts/pages/citation-page.jsx +0 -43
- package/src/scripts/pet/__tests__/__snapshots__/dummy.spec.jsx.snap +0 -70
- package/src/scripts/pet/__tests__/dummy.spec.jsx +0 -10
- package/src/scripts/pet/dummy.jsx +0 -61
- package/src/scripts/refactor_2021/dataset/dataset-pre-refactor-container.tsx +0 -12
- package/src/scripts/refactor_2021/dataset/routes/download-dataset.jsx +0 -70
- package/src/scripts/refactor_2021/redesign-form.jsx +0 -427
- package/src/scripts/routes.tsx +0 -36
- package/src/scripts/search/search-input.tsx +0 -42
- package/src/scripts/search/search-results.tsx +0 -114
- package/src/scripts/styles/capitalized.jsx +0 -6
- package/src/scripts/styles/uppercase.jsx +0 -6
- package/src/scripts/uploader/__tests__/add-path-to-files.spec.js +0 -29
- package/src/scripts/uploader/__tests__/file-upload.spec.js +0 -116
- package/src/scripts/uploader/__tests__/upload-disclaimer.spec.jsx +0 -67
- package/src/scripts/uploader/__tests__/upload-mutation.spec.js +0 -57
- package/src/scripts/uploader/__tests__/uploader.spec.js +0 -31
- package/src/scripts/uploader/add-path-to-files.js +0 -19
- package/src/scripts/uploader/file-upload.js +0 -88
- package/src/scripts/uploader/upload-button.jsx +0 -18
- package/src/scripts/uploader/upload-disclaimer.jsx +0 -91
- package/src/scripts/uploader/upload-file-status.jsx +0 -20
- package/src/scripts/uploader/upload-issues.jsx +0 -131
- package/src/scripts/uploader/upload-metadata.jsx +0 -59
- package/src/scripts/uploader/upload-mutation.js +0 -111
- package/src/scripts/uploader/upload-progress-button.jsx +0 -20
- package/src/scripts/uploader/upload-progress-class.js +0 -36
- package/src/scripts/uploader/upload-progress.jsx +0 -15
- package/src/scripts/uploader/upload-rename.jsx +0 -33
- package/src/scripts/uploader/upload-resume.jsx +0 -35
- package/src/scripts/uploader/upload-select.jsx +0 -29
- package/src/scripts/uploader/upload-status.jsx +0 -23
- package/src/scripts/uploader/upload-step.jsx +0 -48
- package/src/scripts/uploader/uploader-context.js +0 -6
- package/src/scripts/uploader/uploader-location.js +0 -5
- package/src/scripts/uploader/uploader-modal.jsx +0 -27
- package/src/scripts/uploader/uploader-setup-routes.jsx +0 -52
- package/src/scripts/uploader/uploader-status-routes.jsx +0 -30
- package/src/scripts/uploader/uploader-view.jsx +0 -45
- package/src/scripts/uploader/uploader.jsx +0 -388
- package/src/scripts/user/__mocks__/user.store.js +0 -1
- package/src/scripts/user/api.jsx +0 -132
- package/src/scripts/user/avatar.jsx +0 -40
- package/src/scripts/utils/crn.js +0 -15
- package/src/scripts/utils/request.js +0 -107
- package/src/scripts/utils/user.js +0 -18
- package/src/scripts/validation/validation-results.issues.issue.jsx +0 -90
- package/src/scripts/validation/validation-results.issues.jsx +0 -79
- package/src/scripts/validation/validation-results.jsx +0 -96
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Dashboard my datasets renders successfully 1`] = `
|
|
4
|
-
<ApolloProvider
|
|
5
|
-
client={Object {}}
|
|
6
|
-
>
|
|
7
|
-
<AdminExports>
|
|
8
|
-
<HelmetWrapper
|
|
9
|
-
defer={true}
|
|
10
|
-
encodeSpecialCharacters={true}
|
|
11
|
-
>
|
|
12
|
-
<SideEffect(NullComponent)
|
|
13
|
-
defer={true}
|
|
14
|
-
encodeSpecialCharacters={true}
|
|
15
|
-
title={
|
|
16
|
-
Array [
|
|
17
|
-
"Admin Dashboard - ",
|
|
18
|
-
"OpenNeuro",
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
titleAttributes={Object {}}
|
|
22
|
-
>
|
|
23
|
-
<NullComponent
|
|
24
|
-
defer={true}
|
|
25
|
-
encodeSpecialCharacters={true}
|
|
26
|
-
title={
|
|
27
|
-
Array [
|
|
28
|
-
"Admin Dashboard - ",
|
|
29
|
-
"OpenNeuro",
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
titleAttributes={Object {}}
|
|
33
|
-
/>
|
|
34
|
-
</SideEffect(NullComponent)>
|
|
35
|
-
</HelmetWrapper>
|
|
36
|
-
<div
|
|
37
|
-
className="dataset-form"
|
|
38
|
-
>
|
|
39
|
-
<div
|
|
40
|
-
className="col-lg-12 dataset-form-header"
|
|
41
|
-
>
|
|
42
|
-
<div
|
|
43
|
-
className="form-group"
|
|
44
|
-
>
|
|
45
|
-
<label>
|
|
46
|
-
Admin: Remote Exports
|
|
47
|
-
</label>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div
|
|
51
|
-
className="col-xs-4"
|
|
52
|
-
>
|
|
53
|
-
<Styled(div)>
|
|
54
|
-
<div
|
|
55
|
-
className="css-1dh3mm"
|
|
56
|
-
>
|
|
57
|
-
<Styled(button)
|
|
58
|
-
className="btn-modal-action"
|
|
59
|
-
onClick={[Function]}
|
|
60
|
-
>
|
|
61
|
-
<button
|
|
62
|
-
className="btn-modal-action css-j2kih8"
|
|
63
|
-
onClick={[Function]}
|
|
64
|
-
>
|
|
65
|
-
Run Export
|
|
66
|
-
</button>
|
|
67
|
-
</Styled(button)>
|
|
68
|
-
<Divider
|
|
69
|
-
text="or"
|
|
70
|
-
>
|
|
71
|
-
<Styled(div)>
|
|
72
|
-
<div
|
|
73
|
-
className="css-1pxgmwj"
|
|
74
|
-
>
|
|
75
|
-
<Styled(div)>
|
|
76
|
-
<div
|
|
77
|
-
className="css-1ugzf6a"
|
|
78
|
-
/>
|
|
79
|
-
</Styled(div)>
|
|
80
|
-
<Styled(p)>
|
|
81
|
-
<p
|
|
82
|
-
className="css-1ti3dpn"
|
|
83
|
-
>
|
|
84
|
-
or
|
|
85
|
-
</p>
|
|
86
|
-
</Styled(p)>
|
|
87
|
-
<Styled(div)>
|
|
88
|
-
<div
|
|
89
|
-
className="css-1ugzf6a"
|
|
90
|
-
/>
|
|
91
|
-
</Styled(div)>
|
|
92
|
-
</div>
|
|
93
|
-
</Styled(div)>
|
|
94
|
-
</Divider>
|
|
95
|
-
<Styled(button)
|
|
96
|
-
className="btn-blue"
|
|
97
|
-
onClick={[Function]}
|
|
98
|
-
>
|
|
99
|
-
<button
|
|
100
|
-
className="btn-blue css-j2kih8"
|
|
101
|
-
onClick={[Function]}
|
|
102
|
-
>
|
|
103
|
-
View Export Logs
|
|
104
|
-
</button>
|
|
105
|
-
</Styled(button)>
|
|
106
|
-
</div>
|
|
107
|
-
</Styled(div)>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</AdminExports>
|
|
111
|
-
</ApolloProvider>
|
|
112
|
-
`;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { mount } from 'enzyme'
|
|
3
|
-
import { ApolloProvider } from '@apollo/client'
|
|
4
|
-
import Exports from '../../datalad/routes/admin-exports.jsx'
|
|
5
|
-
|
|
6
|
-
describe('Dashboard', () => {
|
|
7
|
-
it('my datasets renders successfully', () => {
|
|
8
|
-
const wrapper = mount(
|
|
9
|
-
<ApolloProvider client={{}}>
|
|
10
|
-
<Exports />
|
|
11
|
-
</ApolloProvider>,
|
|
12
|
-
)
|
|
13
|
-
expect(wrapper).toMatchSnapshot()
|
|
14
|
-
})
|
|
15
|
-
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { shallow } from 'enzyme'
|
|
3
|
-
import { UsersQueryResult } from '../users.jsx'
|
|
4
|
-
|
|
5
|
-
describe('Admin users tab', () => {
|
|
6
|
-
describe('UsersQueryResult component', () => {
|
|
7
|
-
it('should not crash in a loading state', () => {
|
|
8
|
-
expect(() => {
|
|
9
|
-
shallow(
|
|
10
|
-
<UsersQueryResult loading={true} data={null} refetch={jest.fn()} />,
|
|
11
|
-
)
|
|
12
|
-
}).not.toThrowError()
|
|
13
|
-
})
|
|
14
|
-
})
|
|
15
|
-
})
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// dependencies -------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { Redirect, Switch, Route, NavLink } from 'react-router-dom'
|
|
5
|
-
import Users from './users.jsx'
|
|
6
|
-
import FlaggedFiles from './flagged-files.jsx'
|
|
7
|
-
import LoggedIn from '../authentication/logged-in.jsx'
|
|
8
|
-
|
|
9
|
-
class Dashboard extends React.Component {
|
|
10
|
-
// life cycle events --------------------------------------------------
|
|
11
|
-
|
|
12
|
-
render() {
|
|
13
|
-
return (
|
|
14
|
-
<LoggedIn>
|
|
15
|
-
<div className="admin route-wrapper">
|
|
16
|
-
<div className="inner-route clearfix">
|
|
17
|
-
<div className="col-xs-12">
|
|
18
|
-
<ul className="nav nav-pills tabs">
|
|
19
|
-
<li>
|
|
20
|
-
<NavLink to="/admin/users" className="btn-tab">
|
|
21
|
-
Users
|
|
22
|
-
</NavLink>
|
|
23
|
-
</li>
|
|
24
|
-
<li>
|
|
25
|
-
<NavLink to="/admin/flagged-files" className="btn-tab">
|
|
26
|
-
Flagged Files
|
|
27
|
-
</NavLink>
|
|
28
|
-
</li>
|
|
29
|
-
</ul>
|
|
30
|
-
<Switch>
|
|
31
|
-
<Redirect path="/admin" to="/admin/users" exact />
|
|
32
|
-
<Route
|
|
33
|
-
name="users"
|
|
34
|
-
path="/admin/users"
|
|
35
|
-
exact
|
|
36
|
-
component={Users}
|
|
37
|
-
/>
|
|
38
|
-
<Route
|
|
39
|
-
name="flaggedFiles"
|
|
40
|
-
path="/admin/flagged-files"
|
|
41
|
-
exact
|
|
42
|
-
component={FlaggedFiles}
|
|
43
|
-
/>
|
|
44
|
-
</Switch>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</LoggedIn>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export default Dashboard
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
// dependencies -------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
import React, { useState } from 'react'
|
|
4
|
-
import PropTypes from 'prop-types'
|
|
5
|
-
import { useQuery } from '@apollo/client'
|
|
6
|
-
import { gql } from '@apollo/client'
|
|
7
|
-
import Helmet from 'react-helmet'
|
|
8
|
-
import Spinner from '../common/partials/spinner.jsx'
|
|
9
|
-
import { Link } from 'react-router-dom'
|
|
10
|
-
import { pageTitle } from '../resources/strings.js'
|
|
11
|
-
import { unescapePath } from '../file-tree/file-tree.jsx'
|
|
12
|
-
|
|
13
|
-
export const FLAGGED_FILES = gql`
|
|
14
|
-
query flaggedFiles($flagged: Boolean, $deleted: Boolean) {
|
|
15
|
-
flaggedFiles(flagged: $flagged, deleted: $deleted) {
|
|
16
|
-
datasetId
|
|
17
|
-
snapshot
|
|
18
|
-
filepath
|
|
19
|
-
flagger {
|
|
20
|
-
name
|
|
21
|
-
email
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
const FlaggedFilesContainer = () => {
|
|
28
|
-
const [includeFlagged, setIncludeFlagged] = useState(true)
|
|
29
|
-
const [includeDeleted, setIncludeDeleted] = useState(false)
|
|
30
|
-
const { data, loading, error } = useQuery(FLAGGED_FILES, {
|
|
31
|
-
variables: { flagged: includeFlagged, deleted: includeDeleted },
|
|
32
|
-
errorPolicy: 'all',
|
|
33
|
-
})
|
|
34
|
-
return (
|
|
35
|
-
<FlaggedFiles
|
|
36
|
-
{...{
|
|
37
|
-
includeFlagged,
|
|
38
|
-
setIncludeFlagged,
|
|
39
|
-
includeDeleted,
|
|
40
|
-
setIncludeDeleted,
|
|
41
|
-
loading,
|
|
42
|
-
data,
|
|
43
|
-
}}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const FlaggedFiles = ({
|
|
49
|
-
includeFlagged,
|
|
50
|
-
setIncludeFlagged,
|
|
51
|
-
includeDeleted,
|
|
52
|
-
setIncludeDeleted,
|
|
53
|
-
loading,
|
|
54
|
-
data,
|
|
55
|
-
}) => (
|
|
56
|
-
<>
|
|
57
|
-
<Helmet>
|
|
58
|
-
<title>Admin Dashboard - {pageTitle}</title>
|
|
59
|
-
</Helmet>
|
|
60
|
-
<div className="dashboard-dataset-teasers fade-in admin-users clearfix">
|
|
61
|
-
<div className="header-wrap clearfix">
|
|
62
|
-
<div className="col-sm-12">
|
|
63
|
-
<h2>Flagged Annexed Files</h2>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div className="filters-sort-wrap clearfix">
|
|
68
|
-
<span>
|
|
69
|
-
<div className="filters">
|
|
70
|
-
<label>Filter By:</label>
|
|
71
|
-
<button
|
|
72
|
-
className={includeFlagged ? 'active' : null}
|
|
73
|
-
onClick={() => setIncludeFlagged(prev => !prev)}>
|
|
74
|
-
<span className="filter-flagged">
|
|
75
|
-
<i
|
|
76
|
-
className={
|
|
77
|
-
includeFlagged ? 'fa fa-check-square-o' : 'fa fa-square-o'
|
|
78
|
-
}
|
|
79
|
-
/>{' '}
|
|
80
|
-
Flagged
|
|
81
|
-
</span>
|
|
82
|
-
</button>
|
|
83
|
-
<button
|
|
84
|
-
className={includeDeleted ? 'active' : null}
|
|
85
|
-
onClick={() => setIncludeDeleted(prev => !prev)}>
|
|
86
|
-
<span className="filter-deleted">
|
|
87
|
-
<i
|
|
88
|
-
className={
|
|
89
|
-
includeDeleted ? 'fa fa-check-square-o' : 'fa fa-square-o'
|
|
90
|
-
}
|
|
91
|
-
/>{' '}
|
|
92
|
-
Deleted
|
|
93
|
-
</span>
|
|
94
|
-
</button>
|
|
95
|
-
</div>
|
|
96
|
-
</span>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<div>
|
|
100
|
-
<div className="col-xs-12 users-panel-wrap">
|
|
101
|
-
<div className="fade-in user-panel-header clearfix">
|
|
102
|
-
<div className="col-xs-2 user-col">
|
|
103
|
-
<label>Dataset : Snapshot</label>
|
|
104
|
-
</div>
|
|
105
|
-
<div className="col-xs-7 user-col">
|
|
106
|
-
<label>File</label>
|
|
107
|
-
</div>
|
|
108
|
-
<div className="col-xs-3 user-col">
|
|
109
|
-
<label>Flagged By</label>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
{loading && <Spinner active message="Loading..." />}
|
|
113
|
-
{data &&
|
|
114
|
-
(data.flaggedFiles.length ? (
|
|
115
|
-
data.flaggedFiles.map((flaggedFile, key) => (
|
|
116
|
-
<FlaggedItem {...flaggedFile} key={key} />
|
|
117
|
-
))
|
|
118
|
-
) : (
|
|
119
|
-
<h4>No Results Found</h4>
|
|
120
|
-
))}
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</>
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
FlaggedFiles.propTypes = {
|
|
128
|
-
includeFlagged: PropTypes.bool,
|
|
129
|
-
setIncludeFlagged: PropTypes.func,
|
|
130
|
-
includeDeleted: PropTypes.bool,
|
|
131
|
-
setIncludeDeleted: PropTypes.func,
|
|
132
|
-
loading: PropTypes.bool,
|
|
133
|
-
data: PropTypes.object,
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const datasetUrlPath = (datasetId, snapshot) =>
|
|
137
|
-
`/datasets/${datasetId}${snapshot === 'HEAD' ? '' : `/versions/${snapshot}`}`
|
|
138
|
-
|
|
139
|
-
const FlaggedItem = ({
|
|
140
|
-
datasetId,
|
|
141
|
-
snapshot,
|
|
142
|
-
filepath,
|
|
143
|
-
flagger: { name, email },
|
|
144
|
-
}) => {
|
|
145
|
-
return (
|
|
146
|
-
<div className="fade-in user-panel clearfix panel panel-default">
|
|
147
|
-
<div className="col-xs-2 user-col">
|
|
148
|
-
<h3>
|
|
149
|
-
<Link to={datasetUrlPath(datasetId, snapshot)}>
|
|
150
|
-
<i className="fa fa-link" aria-hidden="true" /> {datasetId}
|
|
151
|
-
{' : '}
|
|
152
|
-
{snapshot}
|
|
153
|
-
</Link>
|
|
154
|
-
</h3>
|
|
155
|
-
</div>
|
|
156
|
-
<div className="col-xs-7 user-col middle">
|
|
157
|
-
<h3>
|
|
158
|
-
<div className="filepath">
|
|
159
|
-
<span>{unescapePath(filepath)}</span>
|
|
160
|
-
</div>
|
|
161
|
-
</h3>
|
|
162
|
-
</div>
|
|
163
|
-
<div className="col-xs-3 user-col middle">
|
|
164
|
-
<h3 className="user-name">{name}</h3>
|
|
165
|
-
<h3 className="user-email">{email}</h3>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
)
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
FlaggedItem.propTypes = {
|
|
172
|
-
datasetId: PropTypes.string,
|
|
173
|
-
snapshot: PropTypes.string,
|
|
174
|
-
filepath: PropTypes.string,
|
|
175
|
-
flagger: PropTypes.object,
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export default FlaggedFilesContainer
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import React, { FC, ReactElement } from 'react'
|
|
2
|
-
import { gql } from '@apollo/client'
|
|
3
|
-
import { Mutation } from '@apollo/client/react/components'
|
|
4
|
-
import WarnButton from '../common/forms/warn-button.jsx'
|
|
5
|
-
import { getProfile } from '../refactor_2021/authentication/profile.js'
|
|
6
|
-
import { useCookies } from 'react-cookie'
|
|
7
|
-
import { USER_FRAGMENT } from './user-fragment'
|
|
8
|
-
|
|
9
|
-
interface UserToolsProps {
|
|
10
|
-
user: Record<string, unknown>
|
|
11
|
-
refetch: () => Record<string, unknown>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const SET_ADMIN = gql`
|
|
15
|
-
mutation ($id: ID!, $admin: Boolean!) {
|
|
16
|
-
setAdmin(id: $id, admin: $admin) {
|
|
17
|
-
...userFields
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
${USER_FRAGMENT}
|
|
21
|
-
`
|
|
22
|
-
|
|
23
|
-
export const SET_BLOCKED = gql`
|
|
24
|
-
mutation ($id: ID!, $blocked: Boolean!) {
|
|
25
|
-
setBlocked(id: $id, blocked: $blocked) {
|
|
26
|
-
...userFields
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
${USER_FRAGMENT}
|
|
30
|
-
`
|
|
31
|
-
|
|
32
|
-
export const UserTools: FC<UserToolsProps> = ({ user, refetch }) => {
|
|
33
|
-
const [cookies] = useCookies()
|
|
34
|
-
const adminIcon = user.admin ? 'fa-check-square-o' : 'fa-square-o'
|
|
35
|
-
const blacklistIcon = user.blocked ? 'fa-check-square-o' : 'fa-square-o'
|
|
36
|
-
|
|
37
|
-
if (user.id !== getProfile(cookies).sub) {
|
|
38
|
-
return (
|
|
39
|
-
<div className="col-xs-3 last dataset-tools-wrap-admin">
|
|
40
|
-
<div className="tools clearfix">
|
|
41
|
-
<div className="tool">
|
|
42
|
-
<Mutation
|
|
43
|
-
mutation={SET_ADMIN}
|
|
44
|
-
variables={{ id: user.id, admin: !user.admin }}>
|
|
45
|
-
{(setAdmin): ReactElement => (
|
|
46
|
-
<WarnButton
|
|
47
|
-
message="Admin"
|
|
48
|
-
icon={adminIcon}
|
|
49
|
-
action={(cb): void => {
|
|
50
|
-
setAdmin().then(() => {
|
|
51
|
-
refetch()
|
|
52
|
-
cb()
|
|
53
|
-
})
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
)}
|
|
57
|
-
</Mutation>
|
|
58
|
-
</div>
|
|
59
|
-
<div className="tool">
|
|
60
|
-
<Mutation
|
|
61
|
-
mutation={SET_BLOCKED}
|
|
62
|
-
variables={{ id: user.id, blocked: !user.blocked }}>
|
|
63
|
-
{(setBlocked): ReactElement => (
|
|
64
|
-
<WarnButton
|
|
65
|
-
message="Block"
|
|
66
|
-
icon={blacklistIcon}
|
|
67
|
-
action={(cb): void => {
|
|
68
|
-
setBlocked().then(() => {
|
|
69
|
-
refetch()
|
|
70
|
-
cb()
|
|
71
|
-
})
|
|
72
|
-
}}
|
|
73
|
-
/>
|
|
74
|
-
)}
|
|
75
|
-
</Mutation>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
)
|
|
80
|
-
} else {
|
|
81
|
-
return null
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
// dependencies -------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import PropTypes from 'prop-types'
|
|
5
|
-
import { Query } from '@apollo/client/react/components'
|
|
6
|
-
import { gql } from '@apollo/client'
|
|
7
|
-
import parseISO from 'date-fns/parseISO'
|
|
8
|
-
import formatDistanceToNow from 'date-fns/formatDistanceToNow'
|
|
9
|
-
import Input from '../common/forms/input.jsx'
|
|
10
|
-
import Spinner from '../common/partials/spinner.jsx'
|
|
11
|
-
import { formatDate } from '../utils/date.js'
|
|
12
|
-
import Helmet from 'react-helmet'
|
|
13
|
-
import { pageTitle } from '../resources/strings.js'
|
|
14
|
-
import { UserTools } from './user-tools'
|
|
15
|
-
import { USER_FRAGMENT } from './user-fragment'
|
|
16
|
-
|
|
17
|
-
export const GET_USERS = gql`
|
|
18
|
-
query {
|
|
19
|
-
users {
|
|
20
|
-
...userFields
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
${USER_FRAGMENT}
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
export const UsersQueryResult = ({ loading, data, refetch }) => {
|
|
27
|
-
if (loading) {
|
|
28
|
-
return <Spinner active message="Loading users" />
|
|
29
|
-
} else {
|
|
30
|
-
return (
|
|
31
|
-
<Users loading={loading} users={data.users || []} refetch={refetch} />
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const UsersQuery = () => (
|
|
37
|
-
<Query query={GET_USERS}>{UsersQueryResult}</Query>
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
UsersQueryResult.propTypes = {
|
|
41
|
-
loading: PropTypes.bool,
|
|
42
|
-
data: PropTypes.object,
|
|
43
|
-
refetch: PropTypes.func,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
class Users extends React.Component {
|
|
47
|
-
constructor(props) {
|
|
48
|
-
super(props)
|
|
49
|
-
this.state = {
|
|
50
|
-
stringFilter: null,
|
|
51
|
-
adminFilter: false,
|
|
52
|
-
blacklistFilter: false,
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// life cycle events --------------------------------------------------
|
|
57
|
-
render() {
|
|
58
|
-
const users = this.props.users.map((user, index) => {
|
|
59
|
-
const adminBadge = user.admin ? 'Admin' : null
|
|
60
|
-
const userEmail = user.hasOwnProperty('email') ? user.email : user.id
|
|
61
|
-
if (this.state.adminFilter && !user.admin) {
|
|
62
|
-
return null
|
|
63
|
-
}
|
|
64
|
-
if (this.state.stringFilter) {
|
|
65
|
-
const stringFilter = this.state.stringFilter.toLowerCase()
|
|
66
|
-
if (
|
|
67
|
-
!(
|
|
68
|
-
user.email.toLowerCase().includes(stringFilter) ||
|
|
69
|
-
user.name.toLowerCase().includes(stringFilter)
|
|
70
|
-
)
|
|
71
|
-
) {
|
|
72
|
-
return null
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return (
|
|
76
|
-
<div
|
|
77
|
-
className="fade-in user-panel clearfix panel panel-default"
|
|
78
|
-
key={index}>
|
|
79
|
-
<div className="col-xs-4 user-col">
|
|
80
|
-
<h3>
|
|
81
|
-
<div className="userName">
|
|
82
|
-
<span>{user.name}</span>
|
|
83
|
-
<div className="badge">{adminBadge}</div>
|
|
84
|
-
</div>
|
|
85
|
-
</h3>
|
|
86
|
-
</div>
|
|
87
|
-
<div className="col-xs-3 user-col middle">
|
|
88
|
-
<h3 className="user-email">{userEmail}</h3>
|
|
89
|
-
</div>
|
|
90
|
-
<div className="col-xs-2 user-col middle">
|
|
91
|
-
<h3 className="user-provider">{user.provider}</h3>
|
|
92
|
-
</div>
|
|
93
|
-
<UserTools user={user} refetch={this.props.refetch} />
|
|
94
|
-
{this._userSummary(user)}
|
|
95
|
-
</div>
|
|
96
|
-
)
|
|
97
|
-
})
|
|
98
|
-
return (
|
|
99
|
-
<>
|
|
100
|
-
<Helmet>
|
|
101
|
-
<title>Admin Dashboard - {pageTitle}</title>
|
|
102
|
-
</Helmet>
|
|
103
|
-
<div className="dashboard-dataset-teasers fade-in admin-users clearfix">
|
|
104
|
-
<div className="header-wrap clearfix">
|
|
105
|
-
<div className="col-sm-9">
|
|
106
|
-
<h2>Current Users</h2>
|
|
107
|
-
</div>
|
|
108
|
-
<div className="col-sm-3">
|
|
109
|
-
<Input
|
|
110
|
-
className="pull-right"
|
|
111
|
-
placeholder="Search Name or Email"
|
|
112
|
-
onChange={e => this.setState({ stringFilter: e.target.value })}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<div className="filters-sort-wrap clearfix">
|
|
118
|
-
<span>
|
|
119
|
-
<div className="filters">
|
|
120
|
-
<label>Filter By:</label>
|
|
121
|
-
<button
|
|
122
|
-
className={this.state.adminFilter ? 'active' : null}
|
|
123
|
-
onClick={() =>
|
|
124
|
-
this.setState({ adminFilter: !this.state.adminFilter })
|
|
125
|
-
}>
|
|
126
|
-
<span className="filter-admin">
|
|
127
|
-
<i
|
|
128
|
-
className={
|
|
129
|
-
this.state.adminFilter
|
|
130
|
-
? 'fa fa-check-square-o'
|
|
131
|
-
: 'fa fa-square-o'
|
|
132
|
-
}
|
|
133
|
-
/>{' '}
|
|
134
|
-
Admin
|
|
135
|
-
</span>
|
|
136
|
-
</button>
|
|
137
|
-
<button
|
|
138
|
-
className={this.state.blacklistFilter ? 'active' : null}
|
|
139
|
-
onClick={() =>
|
|
140
|
-
this.setState({
|
|
141
|
-
blacklistFilter: !this.state.blacklistFilter,
|
|
142
|
-
})
|
|
143
|
-
}>
|
|
144
|
-
<span className="filter-admin">
|
|
145
|
-
<i
|
|
146
|
-
className={
|
|
147
|
-
this.state.blacklistFilter
|
|
148
|
-
? 'fa fa-check-square-o'
|
|
149
|
-
: 'fa fa-square-o'
|
|
150
|
-
}
|
|
151
|
-
/>{' '}
|
|
152
|
-
Blocked
|
|
153
|
-
</span>
|
|
154
|
-
</button>
|
|
155
|
-
</div>
|
|
156
|
-
</span>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<div>
|
|
160
|
-
<div className="col-xs-12 users-panel-wrap">
|
|
161
|
-
<div className="fade-in user-panel-header clearfix">
|
|
162
|
-
<div className="col-xs-4 user-col">
|
|
163
|
-
<label>User</label>
|
|
164
|
-
</div>
|
|
165
|
-
<div className="col-xs-3 user-col">
|
|
166
|
-
<label>Email</label>
|
|
167
|
-
</div>
|
|
168
|
-
<div className="col-xs-2 user-col">
|
|
169
|
-
<label>Provider</label>
|
|
170
|
-
</div>
|
|
171
|
-
<div className="col-xs-3 user-col">
|
|
172
|
-
<label>Actions</label>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
|
|
176
|
-
{users.filter(u => u !== null).length ? users : this._noResults()}
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</>
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// custom methods -----------------------------------------------------
|
|
185
|
-
|
|
186
|
-
_noResults() {
|
|
187
|
-
return this.state.loading ? (
|
|
188
|
-
<Spinner active message="Loading users" />
|
|
189
|
-
) : (
|
|
190
|
-
<h4>No Results Found</h4>
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
_userSummary(user) {
|
|
195
|
-
const lastLogin = user.lastlogin ? user.lastlogin : user.created
|
|
196
|
-
const created = user.created
|
|
197
|
-
return (
|
|
198
|
-
<div className="panel-heading">
|
|
199
|
-
<div className="minimal-summary">
|
|
200
|
-
<div className="summary-data">
|
|
201
|
-
<span>
|
|
202
|
-
<b>Signed Up:</b> {formatDate(created)} -{' '}
|
|
203
|
-
{formatDistanceToNow(parseISO(created))} ago
|
|
204
|
-
</span>
|
|
205
|
-
</div>
|
|
206
|
-
<div className="summary-data">
|
|
207
|
-
<span>
|
|
208
|
-
<b>Last Signed In:</b> {formatDate(lastLogin)} -{' '}
|
|
209
|
-
{formatDistanceToNow(parseISO(lastLogin))} ago
|
|
210
|
-
</span>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
)
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
Users.propTypes = {
|
|
219
|
-
users: PropTypes.array,
|
|
220
|
-
loading: PropTypes.bool,
|
|
221
|
-
refetch: PropTypes.func,
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export default UsersQuery
|