-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Collections project into master (#7752)
* Entity pages (courtesy @kdoh) * Add collection_id to Dashboards & Pulses (#7358) * add search to top nav * flip homepage, updated collections * make recent views self contained, add to home * recent items style, add some new colors * adjust default text color * add js colors to style guide * add copy color * segment loader * move to landings * landing nav * segment list + loader * clean up landing nav * metric + segment listing * mucking around with selectable stuff * layout tweaks * other loaders * stronger left sidebar * left sidebar * fix landing * layout port * more tweaks * nav tweaks * explore * collection wrap * Add collection_id to Dashboards & Pulses * GET /api/collection/:id default to returning everything. Wow! * colleciton items loader * dashboard move modal + cleanup * currentCollection and items * Add GET /api/collection/root endpoint * pulse move modal * MASSIVE ALERTS/PULSES/NOTIFICATIONS OVERHAUL * move activity feed * all items, cards * link * Filter out stuff you're not allowed to see from the so-called "Root" Collection * Tests for GET /api/collection/root * fix query builder and login layout * lint + test fixes * filter collection landing * create dash modal * new collection modal * Tests for Dashboard + Collection permissions * Tests for Pulse + Collection permissions * Add new Pulse/Alert perms tests & lots of cleanup 🚿 * Test fixes 🔧 * tweak grid, add system to icon * truncate long titles * remove duplicate file * add collection to create dashboard * add collection selection to pulse edit * icon spacing * use site name for landing * clean up routes * include required pulse card keys * fix entity menu action / link and add to collection landing * update jest snapshots changed by icon * use entity loader for collections * use object loader for collection items * fix colleciton edit and permissions * remove unused file * add key to collection grid items * link to pulse edit * use named list for collections * Increase nav z-index Fixes #7523 * tweak z-index level * fix filters * fitViewport component and application * add fitViewport to setup and post setup * add root collection to dashboard move modal * move to id for loading collections * fix permission editor * fix other instances of collection slug * fix unit tests * flow fixes * dep flow fixes * Fix admin routes not loading currentUser before checking auth * Add id: root to Root Collection * root collection items * temporary archive links * fix up question archive route * redirect to collection on pulse creation * use fitClasses on /explore * Fix NavBar popover and modal interactions * Fix comments about when migrations were added * fix lint * style updates * fix recent views * collection empty state * Make FitViewPort more robust * Fix side bar link states * fix snapshot * Fix alerts * update link and landing nav style * add archive collection route / modal * add modal * Disable onboarding integration test * Fix disabling of dashbaord tests * Update snapshots and lint error * Fix collection archiving * lint * revert text color * Reload collection list each time it's shown to ensure it's in the correct state: * fix empty state image * only show permissions edit option for the root collection * nav * simple layout * fix grid * grid component * fix translation * fitClassNames > fitClasses * fix up collection items loader * remove unused files * remove type filter * qb lives * default to qb * collection landing and components * hoverable card * placeholder search bar * flip collection / content order on landing * fix padding * dashboards first in the list * Merge master into collections-project * only show sidebar if exists * Add collection_position column to Card/Dashboard/Notification (#7675) * add first version of pins * Fix memory leak found using RedShift JDBC Metadata methods Running sync calls several JDBC metadata methods that return `ResultSet` objects. According to the JDBC spec, when the connection associated to the JDBC ResultSet has been closed, it should free the resources used by the ResultSets that were left open in that connection. That doesn't look to be happening in RedShift. Closing the ResutSet instance ourselves before the connection closes will ensure that these resources are freed and doesn't allow the RedShift bug to occur. * use entity update instead of raw api * Fix tests 🔧😒 * Unified archive, search, schema data browsing, and refactor of entities * Fix create dashboard modal * Collections overworld (#7687) * add overworld * layout tweaks * remove navbar browsing link * table item cards * search page layout and item icon colors * search bar active style * Remove Label & CardLabel models & endpoints * DO NOT RUN TESTS ON SHUTDOWN! EVER! * remove navbar browsing link * table item cards * search page layout and item icon colors * search bar active style * archive page changes * Merge master into collections-project 😳 * activity style updates * match search bar width to content * schema grid * greet with name * type sync * pin icon * be round now * search spacing and entitiy item last child border * collection text color * collection pinned item size / text * better root collection name * something styled * init search empty state * lint fix * fix colleciton links. fixes #7716 (#7720) * Merge master into collections-project 😳 * database card styling * tweak hex value * prettier * fix overlap (#7737) * Reload collections list in question save modal, and collections items list as stopgap until it's more automatic (#7731) * Fix public question layout (#7732) * Change Urls.collection() to take an ID, default to 'root', and use when creating pulse * Collections project bg sync (#7740) * default to bg-slate-extra-light color * admin routes * fix question archive redirect and archived message (#7730)
- Loading branch information
Showing
180 changed files
with
7,600 additions
and
5,979 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
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 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 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 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,84 @@ | ||
import React from "react"; | ||
import { Route } from "metabase/hoc/Title"; | ||
import { IndexRoute, IndexRedirect } from "react-router"; | ||
import { t } from "c-3po"; | ||
|
||
// Settings | ||
import SettingsEditorApp from "metabase/admin/settings/containers/SettingsEditorApp.jsx"; | ||
|
||
// DB Add / list | ||
import DatabaseListApp from "metabase/admin/databases/containers/DatabaseListApp.jsx"; | ||
import DatabaseEditApp from "metabase/admin/databases/containers/DatabaseEditApp.jsx"; | ||
|
||
// Metadata / Data model | ||
import MetadataEditorApp from "metabase/admin/datamodel/containers/MetadataEditorApp.jsx"; | ||
import MetricApp from "metabase/admin/datamodel/containers/MetricApp.jsx"; | ||
import SegmentApp from "metabase/admin/datamodel/containers/SegmentApp.jsx"; | ||
import RevisionHistoryApp from "metabase/admin/datamodel/containers/RevisionHistoryApp.jsx"; | ||
import AdminPeopleApp from "metabase/admin/people/containers/AdminPeopleApp.jsx"; | ||
import FieldApp from "metabase/admin/datamodel/containers/FieldApp.jsx"; | ||
import TableSettingsApp from "metabase/admin/datamodel/containers/TableSettingsApp.jsx"; | ||
|
||
// People | ||
import PeopleListingApp from "metabase/admin/people/containers/PeopleListingApp.jsx"; | ||
import GroupsListingApp from "metabase/admin/people/containers/GroupsListingApp.jsx"; | ||
import GroupDetailApp from "metabase/admin/people/containers/GroupDetailApp.jsx"; | ||
|
||
import getAdminPermissionsRoutes from "metabase/admin/permissions/routes.jsx"; | ||
|
||
const getRoutes = (store, IsAdmin) => ( | ||
<Route path="/admin" title={t`Admin`} component={IsAdmin}> | ||
<IndexRedirect to="/admin/settings" /> | ||
|
||
<Route path="databases" title={t`Databases`}> | ||
<IndexRoute component={DatabaseListApp} /> | ||
<Route path="create" component={DatabaseEditApp} /> | ||
<Route path=":databaseId" component={DatabaseEditApp} /> | ||
</Route> | ||
|
||
<Route path="datamodel" title={t`Data Model`}> | ||
<IndexRedirect to="database" /> | ||
<Route path="database" component={MetadataEditorApp} /> | ||
<Route path="database/:databaseId" component={MetadataEditorApp} /> | ||
<Route path="database/:databaseId/:mode" component={MetadataEditorApp} /> | ||
<Route | ||
path="database/:databaseId/:mode/:tableId" | ||
component={MetadataEditorApp} | ||
/> | ||
<Route | ||
path="database/:databaseId/:mode/:tableId/settings" | ||
component={TableSettingsApp} | ||
/> | ||
<Route | ||
path="database/:databaseId/:mode/:tableId/:fieldId" | ||
component={FieldApp} | ||
/> | ||
<Route path="metric/create" component={MetricApp} /> | ||
<Route path="metric/:id" component={MetricApp} /> | ||
<Route path="segment/create" component={SegmentApp} /> | ||
<Route path="segment/:id" component={SegmentApp} /> | ||
<Route path=":entity/:id/revisions" component={RevisionHistoryApp} /> | ||
</Route> | ||
|
||
{/* PEOPLE */} | ||
<Route path="people" title={t`People`} component={AdminPeopleApp}> | ||
<IndexRoute component={PeopleListingApp} /> | ||
<Route path="groups" title={t`Groups`}> | ||
<IndexRoute component={GroupsListingApp} /> | ||
<Route path=":groupId" component={GroupDetailApp} /> | ||
</Route> | ||
</Route> | ||
|
||
{/* SETTINGS */} | ||
<Route path="settings" title={t`Settings`}> | ||
<IndexRedirect to="/admin/settings/setup" /> | ||
{/* <IndexRoute component={SettingsEditorApp} /> */} | ||
<Route path=":section/:authType" component={SettingsEditorApp} /> | ||
<Route path=":section" component={SettingsEditorApp} /> | ||
</Route> | ||
|
||
{getAdminPermissionsRoutes(store)} | ||
</Route> | ||
); | ||
|
||
export default getRoutes; |
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 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,10 @@ | ||
import React from "react"; | ||
import HomepageApp from "metabase/home/containers/HomepageApp"; | ||
|
||
class ActivityFeed extends React.Component { | ||
render() { | ||
return <HomepageApp />; | ||
} | ||
} | ||
|
||
export default ActivityFeed; |
49 changes: 49 additions & 0 deletions
49
frontend/src/metabase/components/ArchiveCollectionModal.jsx
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,49 @@ | ||
import React from "react"; | ||
import { connect } from "react-redux"; | ||
import { Box, Flex, Text } from "rebass"; | ||
import { withRouter } from "react-router"; | ||
import { push } from "react-router-redux"; | ||
import { t } from "c-3po"; | ||
|
||
import Button from "metabase/components/Button"; | ||
import ModalContent from "metabase/components/ModalContent.jsx"; | ||
|
||
import Collections from "metabase/entities/collections"; | ||
|
||
const mapDispatchToProps = { | ||
setCollectionArchived: Collections.actions.setArchived, | ||
push, | ||
}; | ||
|
||
@connect(null, mapDispatchToProps) | ||
@withRouter | ||
class ArchiveCollectionModal extends React.Component { | ||
async _archive() { | ||
await this.props.setCollectionArchived( | ||
{ id: this.props.params.collectionId }, | ||
true, | ||
); | ||
this.props.push("/"); | ||
} | ||
render() { | ||
return ( | ||
<ModalContent | ||
title={t`Archive this collection?`} | ||
onClose={() => this.props.onClose()} | ||
> | ||
<Box px={3}> | ||
<Text> | ||
{t`The dashboards, collections, and pulses in this collection will also be archived.`} | ||
</Text> | ||
<Flex py={3}> | ||
<Button warning ml="auto" onClick={() => this._archive()}> | ||
{t`Archive`} | ||
</Button> | ||
</Flex> | ||
</Box> | ||
</ModalContent> | ||
); | ||
} | ||
} | ||
|
||
export default ArchiveCollectionModal; |
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.