From 6b0b12d6ff3b8d8f3f295796c96f22735e1a9c1d Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Thu, 12 Aug 2021 16:02:18 +1000 Subject: [PATCH 01/53] frontend modification (started) --- app.json | 2 +- .../CacheFieldValuesScheduleWidget.jsx | 2 +- .../admin/datamodel/containers/FieldApp.jsx | 4 +- .../datamodel/containers/TableSettingsApp.jsx | 2 +- .../admin/people/components/GroupDetail.jsx | 6 +-- .../metabase/admin/permissions/selectors.js | 6 +-- .../SettingsCloudStoreLink.jsx | 2 +- .../components/SettingsGoogleForm.jsx | 4 +- .../settings/components/SettingsSetupList.jsx | 2 +- .../settings/components/SettingsSlackForm.jsx | 4 +- .../components/widgets/EmbeddingLegalese.jsx | 2 +- .../widgets/GroupMappingsWidget.jsx | 2 +- .../src/metabase/admin/settings/selectors.js | 4 +- .../admin/tasks/containers/TasksApp.jsx | 2 +- .../auth/containers/ForgotPasswordApp.jsx | 2 +- .../src/metabase/auth/containers/LoginApp.jsx | 2 +- frontend/src/metabase/components/LogoIcon.jsx | 8 ++-- .../metabase/components/SchedulePicker.jsx | 2 +- frontend/src/metabase/css/core/base.css | 2 +- frontend/src/metabase/css/core/colors.css | 4 +- frontend/src/metabase/css/core/overflow.css | 2 +- frontend/src/metabase/css/pulse.css | 2 +- .../src/metabase/home/components/Activity.jsx | 4 +- .../src/metabase/lib/ace/theme-metabase.js | 2 +- frontend/src/metabase/lib/analytics.js | 38 ------------------- frontend/src/metabase/lib/colors.js | 4 +- 26 files changed, 38 insertions(+), 78 deletions(-) diff --git a/app.json b/app.json index bfe4a4301f15..17528e4d0657 100644 --- a/app.json +++ b/app.json @@ -1,5 +1,5 @@ { - "name": "Metabase", + "name": "Report Builder", "description": "Metabase report server", "keywords": [ "business intelligence", diff --git a/frontend/src/metabase/admin/databases/components/widgets/CacheFieldValuesScheduleWidget.jsx b/frontend/src/metabase/admin/databases/components/widgets/CacheFieldValuesScheduleWidget.jsx index 00ac84c5a828..4cef9ef7acb0 100644 --- a/frontend/src/metabase/admin/databases/components/widgets/CacheFieldValuesScheduleWidget.jsx +++ b/frontend/src/metabase/admin/databases/components/widgets/CacheFieldValuesScheduleWidget.jsx @@ -52,7 +52,7 @@ export default function CacheFieldValuesScheduleWidget({ select={() => setIsFullSyncIsOnDemand(false, true)} >

- {t`When a user adds a new filter to a dashboard or a SQL question, Metabase will + {t`When a user adds a new filter to a dashboard or a SQL question, Report Builder will scan the field(s) mapped to that filter in order to show the list of selectable values.`}

diff --git a/frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx b/frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx index 3c4b63c6512e..b2df25fc8b4a 100644 --- a/frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx +++ b/frontend/src/metabase/admin/datamodel/containers/FieldApp.jsx @@ -298,7 +298,7 @@ const FieldGeneralPane = ({
rescanFieldValues(field.id)} diff --git a/frontend/src/metabase/admin/datamodel/containers/TableSettingsApp.jsx b/frontend/src/metabase/admin/datamodel/containers/TableSettingsApp.jsx index 9787b266ce85..f10f3d253ec4 100644 --- a/frontend/src/metabase/admin/datamodel/containers/TableSettingsApp.jsx +++ b/frontend/src/metabase/admin/datamodel/containers/TableSettingsApp.jsx @@ -82,7 +82,7 @@ class UpdateFieldValues extends Component {
{t`All users belong to the ${getGroupNameLocalized( group, )} group and can't be removed from it. Setting permissions for this group is a great way to - make sure you know what new Metabase users will be able to see.`} + make sure you know what new Report Builder users will be able to see.`}

) : isAdminGroup(group) ? (

- {t`This is a special group whose members can see everything in the Metabase instance, and who can access and make changes to the + {t`This is a special group whose members can see everything in the Report Builder instance, and who can access and make changes to the settings in the Admin Panel, including changing permissions! So, add people to this group with care.`}

- {t`To make sure you don't get locked out of Metabase, there always has to be at least one user in this group.`} + {t`To make sure you don't get locked out of Report Builder, there always has to be at least one user in this group.`}

) : null; diff --git a/frontend/src/metabase/admin/permissions/selectors.js b/frontend/src/metabase/admin/permissions/selectors.js index 34ea0a42622d..ca6cc42e3742 100644 --- a/frontend/src/metabase/admin/permissions/selectors.js +++ b/frontend/src/metabase/admin/permissions/selectors.js @@ -65,11 +65,11 @@ const SPECIAL_GROUP_FILTERS = [ function getTooltipForGroup(group) { if (isAdminGroup(group)) { - return t`Administrators always have the highest level of access to everything in Metabase.`; + return t`Administrators always have the highest level of access to everything in Report Builder.`; } else if (isDefaultGroup(group)) { - return t`Every Metabase user belongs to the All Users group. If you want to limit or restrict a group's access to something, make sure the All Users group has an equal or lower level of access.`; + return t`Every Report Builder user belongs to the All Users group. If you want to limit or restrict a group's access to something, make sure the All Users group has an equal or lower level of access.`; } else if (isMetaBotGroup(group)) { - return t`MetaBot is Metabase's Slack bot. You can choose what it has access to here.`; + return t`MetaBot is Report Builder's Slack bot. You can choose what it has access to here.`; } return null; } diff --git a/frontend/src/metabase/admin/settings/components/SettingsCloudStoreLink/SettingsCloudStoreLink.jsx b/frontend/src/metabase/admin/settings/components/SettingsCloudStoreLink/SettingsCloudStoreLink.jsx index 5cc2230510c5..4034afe58bdd 100644 --- a/frontend/src/metabase/admin/settings/components/SettingsCloudStoreLink/SettingsCloudStoreLink.jsx +++ b/frontend/src/metabase/admin/settings/components/SettingsCloudStoreLink/SettingsCloudStoreLink.jsx @@ -7,7 +7,7 @@ export function SettingsCloudStoreLink() { const url = MetabaseSettings.storeUrl(); return (
- {t`Manage your Cloud account, including billing preferences and technical settings about this instance in your Metabase Store account.`} + {t`Manage your Cloud account, including billing preferences and technical settings about this instance in your Report Builder Store account.`} {t`Go to the Metabase Store`} diff --git a/frontend/src/metabase/admin/settings/components/SettingsGoogleForm.jsx b/frontend/src/metabase/admin/settings/components/SettingsGoogleForm.jsx index b805663c78ee..3149cedc6344 100644 --- a/frontend/src/metabase/admin/settings/components/SettingsGoogleForm.jsx +++ b/frontend/src/metabase/admin/settings/components/SettingsGoogleForm.jsx @@ -51,10 +51,10 @@ export default class SettingsGoogleForm extends Component { />

{t`Sign in with Google`}

- {t`Allows users with existing Metabase accounts to login with a Google account that matches their email address in addition to their Metabase username and password.`} + {t`Allows users with existing Report Builder accounts to login with a Google account that matches their email address in addition to their Report Builder username and password.`}

- {jt`To allow users to sign in with Google you'll need to give Metabase a Google Developers console application client ID. It only takes a few steps and instructions on how to create a key can be found ${( + {jt`To allow users to sign in with Google you'll need to give Report Builder a Google Developers console application client ID. It only takes a few steps and instructions on how to create a key can be found ${(

{t`Getting set up`}

-

{t`A few things you can do to get the most out of Metabase.`}

+

{t`A few things you can do to get the most out of Report Builder.`}

- {t`Metabase`} + {t`Report Builder`} {jt`Once you're there, give it a name and click ${( "{t`Add bot integration`}" - )}. Then copy and paste the Bot API Token into the field below. Once you are done, create a "metabase_files" channel in Slack. Metabase needs this to upload graphs.`} + )}. Then copy and paste the Bot API Token into the field below. Once you are done, create a "metabase_files" channel in Slack. Report Builder needs this to upload graphs.`}

    diff --git a/frontend/src/metabase/admin/settings/components/widgets/EmbeddingLegalese.jsx b/frontend/src/metabase/admin/settings/components/widgets/EmbeddingLegalese.jsx index d77f8ef4af01..b39288c4fd99 100644 --- a/frontend/src/metabase/admin/settings/components/widgets/EmbeddingLegalese.jsx +++ b/frontend/src/metabase/admin/settings/components/widgets/EmbeddingLegalese.jsx @@ -18,7 +18,7 @@ const EmbeddingLegalese = ({ onChange }) => ( .

    - {t`In plain English, when you embed charts or dashboards from Metabase in your own application, that application isn't subject to the Affero General Public License that covers the rest of Metabase, provided you keep the Metabase logo and the "Powered by Metabase" visible on those embeds. You should, however, read the license text linked above as that is the actual license that you will be agreeing to by enabling this feature.`} + {t`In plain English, when you embed charts or dashboards from Report Builder in your own application, that application isn't subject to the Affero General Public License that covers the rest of Metabase, provided you keep the Metabase logo and the "Powered by Metabase" visible on those embeds. You should, however, read the license text linked above as that is the actual license that you will be agreeing to by enabling this feature.`}

    - {t`Mappings allow Metabase to automatically add and remove users from groups based on the membership information provided by the + {t`Mappings allow Report Builder to automatically add and remove users from groups based on the membership information provided by the directory server. Membership to the Admin group can be granted through mappings, but will not be automatically removed as a failsafe measure.`}

    diff --git a/frontend/src/metabase/admin/settings/selectors.js b/frontend/src/metabase/admin/settings/selectors.js index 2594e071f2a5..bd2919f13972 100644 --- a/frontend/src/metabase/admin/settings/selectors.js +++ b/frontend/src/metabase/admin/settings/selectors.js @@ -213,7 +213,7 @@ const SECTIONS = updateSectionsWithPlugins({ { key: "map-tile-server-url", display_name: t`Map tile server URL`, - note: t`Metabase uses OpenStreetMaps by default.`, + note: t`Report Builder uses OpenStreetMaps by default.`, type: "string", }, { @@ -331,7 +331,7 @@ const SECTIONS = updateSectionsWithPlugins({ }, { key: "enable-embedding", - display_name: t`Enable Embedding Metabase in other Applications`, + display_name: t`Enable Embedding Report Builder in other Applications`, type: "boolean", getHidden: settings => !settings["enable-embedding"], }, diff --git a/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx b/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx index f266650f1569..36b5f9d60fef 100644 --- a/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx +++ b/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx @@ -41,7 +41,7 @@ class TasksApp extends React.Component { -

    {t`Sign in to Metabase`}

    +

    {t`Administrator login`}

    {visibleProviders.length === 1 && visibleProviders[0].Panel ? ( this.renderPanel(visibleProviders[0]) ) : ( diff --git a/frontend/src/metabase/components/LogoIcon.jsx b/frontend/src/metabase/components/LogoIcon.jsx index 1023c470f0f7..c88140fc5b67 100644 --- a/frontend/src/metabase/components/LogoIcon.jsx +++ b/frontend/src/metabase/components/LogoIcon.jsx @@ -6,7 +6,7 @@ import { PLUGIN_LOGO_ICON_COMPONENTS } from "metabase/plugins"; class DefaultLogoIcon extends Component { static defaultProps = { - height: 32, + height: 48, }; static propTypes = { width: PropTypes.number, @@ -19,16 +19,14 @@ class DefaultLogoIcon extends Component { return ( - ); } diff --git a/frontend/src/metabase/components/SchedulePicker.jsx b/frontend/src/metabase/components/SchedulePicker.jsx index b286ff7b4c86..ce6e4bfb9521 100644 --- a/frontend/src/metabase/components/SchedulePicker.jsx +++ b/frontend/src/metabase/components/SchedulePicker.jsx @@ -249,7 +249,7 @@ export default class SchedulePicker extends Component { {textBeforeSendTime && (
    {textBeforeSendTime} {hour === 0 ? 12 : hour}:00{" "} - {amPm ? "PM" : "AM"} {timezone}, {t`your Metabase timezone`}. + {amPm ? "PM" : "AM"} {timezone}, {t`your Report Builder timezone`}.
    )}
    diff --git a/frontend/src/metabase/css/core/base.css b/frontend/src/metabase/css/core/base.css index 010b91e3c71e..bdb86f84cd54 100644 --- a/frontend/src/metabase/css/core/base.css +++ b/frontend/src/metabase/css/core/base.css @@ -55,7 +55,7 @@ } :root { - --default-font-family: "Lato"; + --default-font-family: "Roboto"; --default-font-size: 0.875em; --default-font-color: var(--color-text-dark); --default-bg-color: var(--color-bg-light); diff --git a/frontend/src/metabase/css/core/colors.css b/frontend/src/metabase/css/core/colors.css index 6606f29abc53..1e2ab39f56dd 100644 --- a/frontend/src/metabase/css/core/colors.css +++ b/frontend/src/metabase/css/core/colors.css @@ -2,7 +2,7 @@ * NOTE: KEEP SYNCRONIZED WITH COLORS.JS */ :root { - --color-brand: #509ee3; + --color-brand: #004b8d; --color-brand-light: #ddecfa; --color-accent1: #88bf4d; --color-accent2: #a989c5; @@ -24,7 +24,7 @@ --color-bg-black: #2e353b; --color-bg-dark: #93a1ab; --color-bg-medium: #edf2f5; - --color-bg-light: #f9fbfc; + --color-bg-light: #fdfdfd; --color-bg-white: #ffffff; --color-bg-yellow: #fffcf2; --color-shadow: rgba(0, 0, 0, 0.13); diff --git a/frontend/src/metabase/css/core/overflow.css b/frontend/src/metabase/css/core/overflow.css index 0c5a81ec11a0..5407c549090f 100644 --- a/frontend/src/metabase/css/core/overflow.css +++ b/frontend/src/metabase/css/core/overflow.css @@ -7,7 +7,7 @@ } .overflow-hidden { - overflow: hidden; + overflow: hidden !important; } .overflow-x-hidden { diff --git a/frontend/src/metabase/css/pulse.css b/frontend/src/metabase/css/pulse.css index d258aebab509..cae19d03faf9 100644 --- a/frontend/src/metabase/css/pulse.css +++ b/frontend/src/metabase/css/pulse.css @@ -38,7 +38,7 @@ } .PulseListItem button { - font-family: "Lato", Helvetica, sans-serif; + font-family: "Roboto", Helvetica, sans-serif; } .PulseEditButton { diff --git a/frontend/src/metabase/home/components/Activity.jsx b/frontend/src/metabase/home/components/Activity.jsx index 5ab18a651248..fe9fdeefcaac 100644 --- a/frontend/src/metabase/home/components/Activity.jsx +++ b/frontend/src/metabase/home/components/Activity.jsx @@ -84,7 +84,7 @@ export default class Activity extends Component { } else if (user) { return user.first_name; } else { - return t`Metabase`; + return t`Report Builder`; } } @@ -258,7 +258,7 @@ export default class Activity extends Component { break; case "install": description.userName = t`Hello World!`; - description.summary = t`Metabase is up and running.`; + description.summary = t`Report Builder is up and running.`; break; case "metric-create": if (item.model_exists) { diff --git a/frontend/src/metabase/lib/ace/theme-metabase.js b/frontend/src/metabase/lib/ace/theme-metabase.js index d757f3eff83b..f87b23ee26a1 100644 --- a/frontend/src/metabase/lib/ace/theme-metabase.js +++ b/frontend/src/metabase/lib/ace/theme-metabase.js @@ -11,7 +11,7 @@ ace.define( '\ .ace-metabase .ace_gutter {\ background: rgb(220,236,249);\ -color: #509EE3;\ +color: #004b8d;\ font-weight: bold;\ }\ .ace-metabase {\ diff --git a/frontend/src/metabase/lib/analytics.js b/frontend/src/metabase/lib/analytics.js index c9eb17974561..49f148876336 100644 --- a/frontend/src/metabase/lib/analytics.js +++ b/frontend/src/metabase/lib/analytics.js @@ -8,18 +8,7 @@ import { DEBUG } from "metabase/lib/debug"; const MetabaseAnalytics = { // track a pageview (a.k.a. route change) trackPageView: function(url: string) { - if (url) { - // scrub query builder urls to remove serialized json queries from path - url = url.lastIndexOf("/q/", 0) === 0 ? "/q/" : url; - const { tag } = MetabaseSettings.get("version") || {}; - - if (typeof ga === "function") { - ga("set", "dimension1", tag); - ga("set", "page", url); - ga("send", "pageview", url); - } - } }, // track an event @@ -29,39 +18,12 @@ const MetabaseAnalytics = { label?: ?(string | number | boolean), value?: ?number, ) { - const { tag } = MetabaseSettings.get("version") || {}; - // category & action are required, rest are optional - if (typeof ga === "function" && category && action) { - ga("set", "dimension1", tag); - ga("send", "event", category, action, label, value); - } - if (DEBUG) { - console.log("trackEvent", { category, action, label, value }); - } }, }; export default MetabaseAnalytics; export function registerAnalyticsClickListener() { - document.body.addEventListener( - "click", - function(e) { - let node = e.target; - // check the target and all parent elements - while (node) { - if (node.dataset && node.dataset.metabaseEvent) { - // we expect our event to be a semicolon delimited string - const parts = node.dataset.metabaseEvent - .split(";") - .map(p => p.trim()); - MetabaseAnalytics.trackEvent(...parts); - } - node = node.parentNode; - } - }, - true, - ); } diff --git a/frontend/src/metabase/lib/colors.js b/frontend/src/metabase/lib/colors.js index 8183a25a731f..f13ee72b0e45 100644 --- a/frontend/src/metabase/lib/colors.js +++ b/frontend/src/metabase/lib/colors.js @@ -12,7 +12,7 @@ export type ColorFamily = { [name: ColorName]: ColorString }; // NOTE: KEEP SYNCRONIZED WITH COLORS.CSS /* eslint-disable no-color-literals */ const colors = { - brand: "#509EE3", + brand: "#004b8d", "brand-light": "#DDECFA", accent1: "#88BF4D", accent2: "#A989C5", @@ -34,7 +34,7 @@ const colors = { "bg-black": "#2E353B", "bg-dark": "#93A1AB", "bg-medium": "#EDF2F5", - "bg-light": "#F9FBFC", + "bg-light": "#FDFDFD", "bg-white": "#FFFFFF", "bg-yellow": "#FFFCF2", shadow: "rgba(0,0,0,0.08)", From 2b68431c4a5cbfaf01fea580f0da94e75241a21d Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 09:55:14 +1000 Subject: [PATCH 02/53] frontend modifications --- .../metabase/nav/components/ProfileLink.jsx | 48 +++++++----------- .../src/metabase/nav/containers/Navbar.jsx | 10 +--- .../metabase/public/components/LogoBadge.jsx | 2 +- .../public/components/widgets/SharingPane.jsx | 2 +- .../pulse/components/PulseCardPreview.jsx | 4 +- .../databases/NoDatabasesEmptyState.jsx | 2 +- .../setup/containers/PostSetupApp.jsx | 2 +- .../components/LineAreaBarChart.css | 2 +- .../components/TableInteractive.jsx | 2 +- resources/frontend_client/favicon.ico | Bin 1473 -> 0 bytes resources/frontend_client/index_template.html | 16 +++++- resources/frontend_client/init.html | 7 ++- src/metabase/api/session.clj | 5 -- src/metabase/config.clj | 4 +- src/metabase/public_settings.clj | 6 +-- src/metabase/util/embed.clj | 2 +- src/metabase/util/stats.clj | 2 +- 17 files changed, 52 insertions(+), 64 deletions(-) delete mode 100644 resources/frontend_client/favicon.ico diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index e2370bea3961..17d0a7d0737c 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -39,12 +39,14 @@ export default class ProfileLink extends Component { const admin = this.props.user.is_superuser; const adminContext = this.props.context === "admin"; return [ - { - title: t`Account settings`, - icon: null, - link: Urls.accountSettings(), - event: `Navbar;Profile Dropdown;Edit Profile`, - }, + ...(admin && [ + { + title: t`Account settings`, + icon: null, + link: Urls.accountSettings(), + event: `Navbar;Profile Dropdown;Edit Profile`, + }, + ]), ...(MetabaseSettings.isHosted() && admin && [ { @@ -77,18 +79,14 @@ export default class ProfileLink extends Component { externalLink: true, event: `Navbar;Profile Dropdown;About ${tag}`, }, - { - title: t`About Metabase`, - icon: null, - action: () => this.openModal("about"), - event: `Navbar;Profile Dropdown;About ${tag}`, - }, - { - title: t`Sign out`, - icon: null, - link: "auth/logout", - event: `Navbar;Profile Dropdown;Logout`, - }, + ...(admin && [ + { + title: t`Sign out`, + icon: null, + link: "auth/logout", + event: `Navbar;Profile Dropdown;Logout`, + }, + ]), ]; }; @@ -122,7 +120,7 @@ export default class ProfileLink extends Component {

    {t`Thanks for using Metabase!`}

    + >{t`Thanks for using Report Builder!`}

    {t`You're on version`} {tag} @@ -141,18 +139,6 @@ export default class ProfileLink extends Component { )}

- {showTrademark && ( -
- - Metabase{" "} - {t`is a Trademark of`} Metabase, Inc - - {t`and is built with care in San Francisco, CA`} -
- )} ) : null} diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index cc3bd4d8dc01..4a4019af4e0b 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -106,7 +106,7 @@ export default class Navbar extends Component {
- {t`Metabase Admin`} + {t`Report Builder Admin`}
    @@ -269,13 +269,7 @@ export default class Navbar extends Component { icon: `dashboard`, action: () => this.setModal(MODAL_NEW_DASHBOARD), event: `NavBar;New Dashboard Click;`, - }, - { - title: t`New pulse`, - icon: `pulse`, - link: Urls.newPulse(), - event: `NavBar;New Pulse Click;`, - }, + } ]} /> {hasNativeWrite && ( diff --git a/frontend/src/metabase/public/components/LogoBadge.jsx b/frontend/src/metabase/public/components/LogoBadge.jsx index e773287326ac..12434c388713 100644 --- a/frontend/src/metabase/public/components/LogoBadge.jsx +++ b/frontend/src/metabase/public/components/LogoBadge.jsx @@ -18,7 +18,7 @@ const LogoBadge = ({ dark }: Props) => ( {jt`Powered by ${( - {t`Metabase`} + {t`Report Builder`} )}`} diff --git a/frontend/src/metabase/public/components/widgets/SharingPane.jsx b/frontend/src/metabase/public/components/widgets/SharingPane.jsx index 525a5bda74a4..5f1ba4668bf0 100644 --- a/frontend/src/metabase/public/components/widgets/SharingPane.jsx +++ b/frontend/src/metabase/public/components/widgets/SharingPane.jsx @@ -111,7 +111,7 @@ export default class SharingPane extends Component {

{t`Public link`}

-
{t`Share this ${resourceType} with people who don't have a Metabase account using the URL below:`}
+
{t`Share this ${resourceType} with people who don't have a Report Builder account using the URL below:`}
{extensions && extensions.length > 0 && (
diff --git a/frontend/src/metabase/pulse/components/PulseCardPreview.jsx b/frontend/src/metabase/pulse/components/PulseCardPreview.jsx index cdaab7000e7e..c21a15ab1665 100644 --- a/frontend/src/metabase/pulse/components/PulseCardPreview.jsx +++ b/frontend/src/metabase/pulse/components/PulseCardPreview.jsx @@ -151,7 +151,7 @@ const RenderedPulseCardPreview = ({ href, children }) => ( ( ( )} diff --git a/frontend/src/metabase/visualizations/components/LineAreaBarChart.css b/frontend/src/metabase/visualizations/components/LineAreaBarChart.css index ecd3baea4918..93d2ff63547b 100644 --- a/frontend/src/metabase/visualizations/components/LineAreaBarChart.css +++ b/frontend/src/metabase/visualizations/components/LineAreaBarChart.css @@ -17,7 +17,7 @@ .LineAreaBarChart .dc-chart .axis text { font-size: 12px; - font-family: "Lato", sans-serif; + font-family: "Roboto", sans-serif; font-weight: 900; } diff --git a/frontend/src/metabase/visualizations/components/TableInteractive.jsx b/frontend/src/metabase/visualizations/components/TableInteractive.jsx index 6c9ed57e1fed..330f9c2c6074 100644 --- a/frontend/src/metabase/visualizations/components/TableInteractive.jsx +++ b/frontend/src/metabase/visualizations/components/TableInteractive.jsx @@ -816,7 +816,7 @@ export default class TableInteractive extends Component { position: "absolute", overflow: "hidden", }} - className="TableInteractive-header scroll-hide-all" + className="TableInteractive-header scroll-hide-all overflow-hidden" width={width || 0} height={headerHeight} rowCount={1} diff --git a/resources/frontend_client/favicon.ico b/resources/frontend_client/favicon.ico deleted file mode 100644 index 4c9bf6b68804ccf0919e7c007bfc71304068ed7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1473 zcmex=6gCzgIWv~dy$S=t+&d4uNFxE3*uyFG9WdWH01You*m?>~Yw&!L) z!zPxO4V*LH{BWxKe}F-dgF%2nfSFN{fk}{&S&;Gn5e9jn&8$H8ft&~hj7-cdtZeKY zoLt;M1zQCem>8LvnOK-vSwYq?)&k`jSOi&x6b&8OgaZ@Vl?p|S8YeE~Pwh=DOELf4NWZ*Q!{f5ODks=S2uSLPp{yR(6I1`$f)F$)U@=B%&g*) z(z5c3%Btp;*0%PJ&aO$5r%atTea6gLixw|gx@`H1m8&*w-m-Pu_8mKS9XfpE=&|D` zPM*4S`O4L6*Kgds_3+W-Cr_U}fAR9w$4{TXeEs(Q$Io9Ne=#yJL%ap|8JfR3M&~ka)>xhT)6Qdr?PR-2hpUWi(FzVCJ$9V zg1iRy8F3zKBFkrRk0JbZo52~Bm?#4Ofre0I07&!yyTD}0^#2wE4>Kb$F)<4=*fadQ zx#d4YZ{VGZ@5ki%_qf(Sd~dm@e9aH-Lt;_!ZFL&bE8l+E-xgKhr~kIbcXezklQJRZo3B!z)v+b#lYZZJFW1GYXz> zZuuzV9Iw7GSpU%FGpYU4WKW4?T1o6NDco>m)z;TR%NwR>yFXr8sFFS_P0~+qo$$C3 zDlPE1JFleQR#A7(ws}U&R4*L~Tx`QMH&e7?lHpmSKg&78+0ShDv5W3s9?w2k^O)!- zuboRJ60#37>!_@@I5agpTrf@|BJuB1t*Oa91%L`64ko*&9rU%gl4XNV|H-WO)pac z?RVPgJJ{V@rm<-)Ggm+GFf%FhQ4!Cyd2$u6EZ?ciOL#3&w@kaD>a&J#C2dVRH1iE+=h(#I_;rvx56SG8&^c9r?eu;OFZaW|8VJNI!5d-MA9AO30TV`I2= z^Bp_8fL6~d%XJp@WH@cfymnggysO5;mBAsFNme`k46i)g-jcUWT<7S8m2st?=Uft9 k+Om8~_`zdEEeVfjUYnYEdCJPiPZkEx3Vr1j8u|Yw08nv2WdHyG diff --git a/resources/frontend_client/index_template.html b/resources/frontend_client/index_template.html index a14625620210..def4f06b9d7e 100644 --- a/resources/frontend_client/index_template.html +++ b/resources/frontend_client/index_template.html @@ -23,6 +23,20 @@ + + + @@ -46,7 +60,7 @@ {{#enableAnonTracking}} - + {{/enableAnonTracking}} diff --git a/resources/frontend_client/init.html b/resources/frontend_client/init.html index c3f66e027a1d..b6801fc090ae 100644 --- a/resources/frontend_client/init.html +++ b/resources/frontend_client/init.html @@ -119,9 +119,8 @@
@@ -131,7 +130,7 @@
diff --git a/src/metabase/api/session.clj b/src/metabase/api/session.clj index 1006b2467e8f..6bb0058fa962 100644 --- a/src/metabase/api/session.clj +++ b/src/metabase/api/session.clj @@ -70,11 +70,6 @@ ;;; ## API Endpoints -(def ^:private login-throttlers - {:username (throttle/make-throttler :username) - ;; IP Address doesn't have an actual UI field so just show error by username - :ip-address (throttle/make-throttler :username, :attempts-threshold 50)}) - (def ^:private password-fail-message (deferred-tru "Password did not match stored password.")) (def ^:private password-fail-snippet (deferred-tru "did not match stored password")) diff --git a/src/metabase/config.clj b/src/metabase/config.clj index 7baff9c5f6c6..21aa4489a408 100644 --- a/src/metabase/config.clj +++ b/src/metabase/config.clj @@ -23,7 +23,7 @@ {:mb-run-mode "prod" ;; DB Settings :mb-db-type "h2" - :mb-db-file "metabase.db" + :mb-db-file "tesasfdsa.db" :mb-db-automigrate "true" :mb-db-logging "true" ;; Jetty Settings. Full list of options is available here: https://github.com/ring-clojure/ring/blob/master/ring-jetty-adapter/src/ring/adapter/jetty.clj @@ -34,7 +34,7 @@ :mb-version-info-url "http://static.metabase.com/version-info.json" :mb-version-info-ee-url "http://static.metabase.com/version-info-ee.json" :mb-ns-trace "" ; comma-separated namespaces to trace - :max-session-age "20160" ; session length in minutes (14 days) + :max-session-age "720" ; session length in minutes (12 hours) :mb-colorize-logs (str (not is-windows?)) ; since PowerShell and cmd.exe don't support ANSI color escape codes or emoji, :mb-emoji-in-logs (str (not is-windows?)) ; disable them by default when running on Windows. Otherwise they're enabled :mb-qp-cache-backend "db"}) diff --git a/src/metabase/public_settings.clj b/src/metabase/public_settings.clj index c960606c5b6d..5b4597a991ca 100644 --- a/src/metabase/public_settings.clj +++ b/src/metabase/public_settings.clj @@ -54,7 +54,7 @@ (defsetting site-name (deferred-tru "The name used for this instance of Metabase.") - :default "Metabase") + :default "Report Builder") (defsetting site-uuid ;; Don't i18n this docstring because it's not user-facing! :) @@ -216,7 +216,7 @@ (deferred-tru "This will replace the word \"Metabase\" wherever it appears.") :visibility :public :type :string - :default "Metabase") + :default "Report Builder") (defsetting application-colors (deferred-tru "These are the primary colors used in charts and throughout Metabase. You might need to refresh your browser to see your changes take effect.") @@ -227,7 +227,7 @@ (defn application-color "The primary color, a.k.a. brand color" [] - (or (:brand (setting/get-json :application-colors)) "#509EE3")) + (or (:brand (setting/get-json :application-colors)) "#004b8d")) (defn secondary-chart-color "The first 'Additional chart color'" diff --git a/src/metabase/util/embed.clj b/src/metabase/util/embed.clj index 90ea5e3c124a..0bbcc481ffd3 100644 --- a/src/metabase/util/embed.clj +++ b/src/metabase/util/embed.clj @@ -30,7 +30,7 @@ (html [:link {:rel "alternate" :type "application/json+oembed" :href (oembed-url url) - :title "Metabase"}])) + :title "Report Builder"}])) (def ^:private ^:const ^String embedly-meta "A `` tag for `Embed.ly` support." diff --git a/src/metabase/util/stats.clj b/src/metabase/util/stats.clj index e2eabc74a12e..fe4c9ca94b81 100644 --- a/src/metabase/util/stats.clj +++ b/src/metabase/util/stats.clj @@ -112,7 +112,7 @@ :running_on (environment-type) :application_database (config/config-str :mb-db-type) :check_for_updates (public-settings/check-for-updates) - :site_name (not= (public-settings/site-name) "Metabase") + :site_name (not= (public-settings/site-name) "Report Builder") :report_timezone (driver/report-timezone) ; We deprecated advanced humanization but have this here anyways :friendly_names (= (humanization/humanization-strategy) "advanced") From 5ec274be53ce447b2f1cceea5874e811d26b8d56 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 10:17:37 +1000 Subject: [PATCH 03/53] session.clj fix --- src/metabase/api/session.clj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/metabase/api/session.clj b/src/metabase/api/session.clj index 6bb0058fa962..7f3afd12c7c9 100644 --- a/src/metabase/api/session.clj +++ b/src/metabase/api/session.clj @@ -165,8 +165,7 @@ (if throttling-disabled? (do-login) (http-401-on-error - (throttle/with-throttling [(login-throttlers :ip-address) ip-address - (login-throttlers :username) username] + (throttle/with-throttling [] (do-login)))))) From 8fee0332601ad87b6b38a10e473eac9cda77a696 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 10:55:01 +1000 Subject: [PATCH 04/53] session.clj fix --- src/metabase/api/session.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metabase/api/session.clj b/src/metabase/api/session.clj index 7f3afd12c7c9..359a1b1e049a 100644 --- a/src/metabase/api/session.clj +++ b/src/metabase/api/session.clj @@ -272,7 +272,7 @@ (if throttling-disabled? (google/do-google-auth request) (http-401-on-error - (throttle/with-throttling [(login-throttlers :ip-address) (request.u/ip-address request)] + (throttle/with-throttling [() (request.u/ip-address request)] (let [user (google/do-google-auth request) {session-uuid :id, :as session} (create-session! :sso user (request.u/device-info request)) response {:id (str session-uuid)} From e11d41fe982f7959aa8810740252b84160d62af7 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 11:08:03 +1000 Subject: [PATCH 05/53] LogoIcon fix --- frontend/src/metabase/components/LogoIcon.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/metabase/components/LogoIcon.jsx b/frontend/src/metabase/components/LogoIcon.jsx index c88140fc5b67..7f1c7446aaa0 100644 --- a/frontend/src/metabase/components/LogoIcon.jsx +++ b/frontend/src/metabase/components/LogoIcon.jsx @@ -24,9 +24,7 @@ class DefaultLogoIcon extends Component { height={height} fill="currentcolor" > - + ); } From d49ea414c970988d086cdd95cc78ef9b32f1dbfb Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 12:02:09 +1000 Subject: [PATCH 06/53] warnings fix --- frontend/src/metabase/lib/analytics.js | 6 ------ .../metabase/nav/components/ProfileLink.jsx | 18 +++++++++--------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/frontend/src/metabase/lib/analytics.js b/frontend/src/metabase/lib/analytics.js index 49f148876336..f1aca9c3116b 100644 --- a/frontend/src/metabase/lib/analytics.js +++ b/frontend/src/metabase/lib/analytics.js @@ -1,9 +1,3 @@ -/*global ga*/ - -import MetabaseSettings from "metabase/lib/settings"; - -import { DEBUG } from "metabase/lib/debug"; - // Simple module for in-app analytics. Currently sends data to GA but could be extended to anything else. const MetabaseAnalytics = { // track a pageview (a.k.a. route change) diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index 17d0a7d0737c..04285b354511 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -39,14 +39,6 @@ export default class ProfileLink extends Component { const admin = this.props.user.is_superuser; const adminContext = this.props.context === "admin"; return [ - ...(admin && [ - { - title: t`Account settings`, - icon: null, - link: Urls.accountSettings(), - event: `Navbar;Profile Dropdown;Edit Profile`, - }, - ]), ...(MetabaseSettings.isHosted() && admin && [ { @@ -66,6 +58,14 @@ export default class ProfileLink extends Component { }`, }, ]), + ...(admin && [ + { + title: t`Account settings`, + icon: null, + link: Urls.accountSettings(), + event: `Navbar;Profile Dropdown;Edit Profile`, + }, + ]), { title: t`Activity`, icon: null, @@ -95,7 +95,7 @@ export default class ProfileLink extends Component { const adminContext = this.props.context === "admin"; const { tag, date, ...versionExtra } = MetabaseSettings.get("version"); // don't show trademark if application name is whitelabeled - const showTrademark = t`Metabase` === "Metabase"; + //const showTrademark = t`Metabase` === "Metabase"; return ( Date: Fri, 13 Aug 2021 12:29:14 +1000 Subject: [PATCH 07/53] formatting --- frontend/src/metabase/lib/analytics.js | 18 ++++++------------ .../src/metabase/nav/containers/Navbar.jsx | 7 ++----- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/frontend/src/metabase/lib/analytics.js b/frontend/src/metabase/lib/analytics.js index f1aca9c3116b..53ebe89d83d1 100644 --- a/frontend/src/metabase/lib/analytics.js +++ b/frontend/src/metabase/lib/analytics.js @@ -1,23 +1,17 @@ // Simple module for in-app analytics. Currently sends data to GA but could be extended to anything else. const MetabaseAnalytics = { // track a pageview (a.k.a. route change) - trackPageView: function(url: string) { - - }, + trackPageView: function (url: string) {}, // track an event - trackEvent: function( + trackEvent: function ( category: string, action?: ?string, - label?: ?(string | number | boolean), - value?: ?number, - ) { - - }, + label?: ?(string | number | boolean), + value?: ?number +) {}, }; export default MetabaseAnalytics; -export function registerAnalyticsClickListener() { - -} +export function registerAnalyticsClickListener() {} diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index 4a4019af4e0b..3485329eba9e 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -73,10 +73,7 @@ const MODAL_NEW_DASHBOARD = "MODAL_NEW_DASHBOARD"; // set this to false to prevent a potential spinner on the main nav loadingAndErrorWrapper: false, }) -@connect( - mapStateToProps, - mapDispatchToProps, -) +@connect(mapStateToProps, mapDispatchToProps) export default class Navbar extends Component { state = { modal: null, @@ -269,7 +266,7 @@ export default class Navbar extends Component { icon: `dashboard`, action: () => this.setModal(MODAL_NEW_DASHBOARD), event: `NavBar;New Dashboard Click;`, - } + }, ]} /> {hasNativeWrite && ( From 23dc328b4fc6e74e9c9723794c72869bce235b49 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 14:56:03 +1000 Subject: [PATCH 08/53] frontend changes, Jenkinsfile --- Jenkinsfile | 34 ++++++ .../src/metabase/containers/Overworld.jsx | 105 +----------------- .../src/metabase/nav/containers/Navbar.jsx | 2 + src/metabase/email/_footer.mustache | 8 -- src/metabase/email/_footer_pulse.mustache | 8 -- 5 files changed, 39 insertions(+), 118 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000000..04c87e00d718 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent { + docker { + image 'metabasepackage' + args '-v /.npm:/.npm -v /.cache:/.cache -v /.yarn:/.yarn' + } + } + environment { + HOME = "/.cache + } + stages { + stage("print env variables") { + steps { + script { + echo sh(script: 'env|sort', returnStdout: true) + } + } + } + stage("run build") { + steps { + sh './bin/build no-translations' + } + } + } + post { + success { + archiveArtifacts artifacts: 'target/uberjar/metabase.jar' + slackSend color: 'good', channel: '#jenkins-metabasepackage', message: "*SUCCESSED* - Packaged metabase. Download jar file from Jenkins: <${env.BUILD_URL}|build ${env.BUILD_NUMBER}>" + } + failure { + slackSend color: 'danger', channel: '#jenkins-metabasepackage', message: "*FAILED* - Metabase build failed (<${env.BUILD_URL}|build ${env.BUILD_NUMBER}>) - <${env.BUILD_URL}console|click here to see the console output>" + } + } +} diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx index 0b9d37b5a3ff..b9b7b673dd08 100644 --- a/frontend/src/metabase/containers/Overworld.jsx +++ b/frontend/src/metabase/containers/Overworld.jsx @@ -238,104 +238,6 @@ class Overworld extends React.Component { - {showHomepageData && ( - - {({ databases }) => { - if (databases.length === 0) { - return null; - } - return ( - - - - {t`Our data`} - {user.is_superuser && ( - - - - } - title={t`Remove this section?`} - footer={ - - } - > - - {t`"Our Data" won’t show up on the homepage for any of your users anymore, but you can always browse through your databases and tables by clicking Browse Data in the main navigation.`} - - - )} - - - - - {databases.map(database => ( - - - - - -

{database.name}

- - - - - - - - - -
-
- -
- ))} -
-
-
- ); - }} -
- )} ); } @@ -398,12 +300,11 @@ export class AdminPinMessage extends React.Component { const SectionHeading = ({ children }) => ( -
{children} -
+
); diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index 3485329eba9e..b058cca2ec36 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -32,6 +32,7 @@ import { getPlainNativeQuery, } from "metabase/new_query/selectors"; import Database from "metabase/entities/databases"; +import {getMetadata} from "metabase/selectors/metadata"; const mapStateToProps = (state, props) => ({ path: getPath(state, props), @@ -40,6 +41,7 @@ const mapStateToProps = (state, props) => ({ plainNativeQuery: getPlainNativeQuery(state), hasDataAccess: getHasDataAccess(state), hasNativeWrite: getHasNativeWrite(state), + metadata: getMetadata(state) }); import { DefaultSearchColor } from "metabase/nav/constants"; diff --git a/src/metabase/email/_footer.mustache b/src/metabase/email/_footer.mustache index 11a29275d21c..f5471aad90d5 100644 --- a/src/metabase/email/_footer.mustache +++ b/src/metabase/email/_footer.mustache @@ -1,11 +1,3 @@
- {{#quotation}} -
"{{quotation}}"
- {{quotationAuthor}}
- {{/quotation}} - {{#logoFooter}} -
- {{> metabase/email/_logo }} -
- {{/logoFooter}} diff --git a/src/metabase/email/_footer_pulse.mustache b/src/metabase/email/_footer_pulse.mustache index 0e062d0007e9..f5471aad90d5 100644 --- a/src/metabase/email/_footer_pulse.mustache +++ b/src/metabase/email/_footer_pulse.mustache @@ -1,11 +1,3 @@
- {{#quotation}} -
"{{quotation}}"
- {{quotationAuthor}}
- {{/quotation}} - {{#logoFooter}} -
- {{> metabase/email/_logo }} -
- {{/logoFooter}} From 9ca44503ecbda02ab35f2ca5b94a4b68a809be82 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 15:30:34 +1000 Subject: [PATCH 09/53] frontend changes --- frontend/src/metabase/containers/Overworld.jsx | 2 -- .../src/metabase/nav/components/ProfileLink.jsx | 14 ++++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx index b9b7b673dd08..7eaf7348b310 100644 --- a/frontend/src/metabase/containers/Overworld.jsx +++ b/frontend/src/metabase/containers/Overworld.jsx @@ -24,7 +24,6 @@ import * as Urls from "metabase/lib/urls"; import { color } from "metabase/lib/colors"; import Greeting from "metabase/lib/greeting"; -import Database from "metabase/entities/databases"; import Search from "metabase/entities/search"; import { ROOT_COLLECTION } from "metabase/entities/collections"; @@ -67,7 +66,6 @@ class Overworld extends React.Component { const { greeting, user, - showHomepageData, showHomepageXrays, updateSetting, } = this.props; diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index 04285b354511..a4bdcc911e8c 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -58,14 +58,12 @@ export default class ProfileLink extends Component { }`, }, ]), - ...(admin && [ - { - title: t`Account settings`, - icon: null, - link: Urls.accountSettings(), - event: `Navbar;Profile Dropdown;Edit Profile`, - }, - ]), + { + title: t`Account settings`, + icon: null, + link: Urls.accountSettings(), + event: `Navbar;Profile Dropdown;Edit Profile`, + }, { title: t`Activity`, icon: null, From 709e0c9573acf9936ec54387774b8616fdf81a3e Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 15:45:38 +1000 Subject: [PATCH 10/53] revert ProfileLink --- frontend/src/metabase/nav/components/ProfileLink.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index a4bdcc911e8c..91c5bcb66222 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -77,6 +77,12 @@ export default class ProfileLink extends Component { externalLink: true, event: `Navbar;Profile Dropdown;About ${tag}`, }, + { + title: t`About Metabase`, + icon: null, + action: () => this.openModal("about"), + event: `Navbar;Profile Dropdown;About ${tag}`, + }, ...(admin && [ { title: t`Sign out`, From 10b07315477d8b0b5c405947ba49acb3b7902c0a Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 15:54:17 +1000 Subject: [PATCH 11/53] revert ProfileLink --- .../src/metabase/nav/components/ProfileLink.jsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index 91c5bcb66222..058079d514c8 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -83,14 +83,12 @@ export default class ProfileLink extends Component { action: () => this.openModal("about"), event: `Navbar;Profile Dropdown;About ${tag}`, }, - ...(admin && [ - { - title: t`Sign out`, - icon: null, - link: "auth/logout", - event: `Navbar;Profile Dropdown;Logout`, - }, - ]), + { + title: t`Sign out`, + icon: null, + link: "auth/logout", + event: `Navbar;Profile Dropdown;Logout`, + }, ]; }; From e0739dd1326e604e2d01451c233556c9697ab7bc Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Fri, 13 Aug 2021 16:08:48 +1000 Subject: [PATCH 12/53] formatting --- .../src/metabase/containers/Overworld.jsx | 26 ++++++------------- frontend/src/metabase/lib/analytics.js | 8 +++--- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx index 7eaf7348b310..684788f40afb 100644 --- a/frontend/src/metabase/containers/Overworld.jsx +++ b/frontend/src/metabase/containers/Overworld.jsx @@ -38,9 +38,8 @@ import { const PAGE_PADDING = [1, 2, 4]; const ROOT_COLLECTIONS_LOAD_LIMIT = 500; -const getGreeting = createSelector( - [getUser], - user => Greeting.sayHello(user.first_name), +const getGreeting = createSelector([getUser], (user) => + Greeting.sayHello(user.first_name) ); //class Overworld extends Zelda @@ -59,16 +58,11 @@ const getGreeting = createSelector( showHomepageXrays: getShowHomepageXrays(state), greeting: getGreeting(state, props), }), - { updateSetting }, + { updateSetting } ) class Overworld extends React.Component { render() { - const { - greeting, - user, - showHomepageXrays, - updateSetting, - } = this.props; + const { greeting, user, showHomepageXrays, updateSetting } = this.props; return ( @@ -116,7 +110,7 @@ class Overworld extends React.Component { footer={

- {t`Mappings allow Report Builder to automatically add and remove users from groups based on the membership information provided by the + {t`Mappings allow BI Reporting to automatically add and remove users from groups based on the membership information provided by the directory server. Membership to the Admin group can be granted through mappings, but will not be automatically removed as a failsafe measure.`}

diff --git a/frontend/src/metabase/admin/settings/selectors.js b/frontend/src/metabase/admin/settings/selectors.js index bd2919f13972..62f43b2bbc24 100644 --- a/frontend/src/metabase/admin/settings/selectors.js +++ b/frontend/src/metabase/admin/settings/selectors.js @@ -213,7 +213,7 @@ const SECTIONS = updateSectionsWithPlugins({ { key: "map-tile-server-url", display_name: t`Map tile server URL`, - note: t`Report Builder uses OpenStreetMaps by default.`, + note: t`BI Reporting uses OpenStreetMaps by default.`, type: "string", }, { @@ -331,7 +331,7 @@ const SECTIONS = updateSectionsWithPlugins({ }, { key: "enable-embedding", - display_name: t`Enable Embedding Report Builder in other Applications`, + display_name: t`Enable Embedding BI Reporting in other Applications`, type: "boolean", getHidden: settings => !settings["enable-embedding"], }, diff --git a/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx b/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx index 36b5f9d60fef..9da8a4b27c7f 100644 --- a/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx +++ b/frontend/src/metabase/admin/tasks/containers/TasksApp.jsx @@ -41,7 +41,7 @@ class TasksApp extends React.Component { {textBeforeSendTime} {hour === 0 ? 12 : hour}:00{" "} - {amPm ? "PM" : "AM"} {timezone}, {t`your Report Builder timezone`}. + {amPm ? "PM" : "AM"} {timezone}, {t`your BI Reporting timezone`}. )} diff --git a/frontend/src/metabase/home/components/Activity.jsx b/frontend/src/metabase/home/components/Activity.jsx index fe9fdeefcaac..fe8471960370 100644 --- a/frontend/src/metabase/home/components/Activity.jsx +++ b/frontend/src/metabase/home/components/Activity.jsx @@ -84,7 +84,7 @@ export default class Activity extends Component { } else if (user) { return user.first_name; } else { - return t`Report Builder`; + return t`BI Reporting`; } } @@ -258,7 +258,7 @@ export default class Activity extends Component { break; case "install": description.userName = t`Hello World!`; - description.summary = t`Report Builder is up and running.`; + description.summary = t`BI Reporting is up and running.`; break; case "metric-create": if (item.model_exists) { diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index 058079d514c8..a2f5aa211d1f 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -122,7 +122,7 @@ export default class ProfileLink extends Component {

{t`Thanks for using Report Builder!`}

+ >{t`Thanks for using BI Reporting!`}

{t`You're on version`} {tag} diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index b058cca2ec36..ff6c60154a30 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -105,7 +105,7 @@ export default class Navbar extends Component {
- {t`Report Builder Admin`} + {t`BI Reporting Admin`}
    diff --git a/frontend/src/metabase/public/components/LogoBadge.jsx b/frontend/src/metabase/public/components/LogoBadge.jsx index 12434c388713..b99e9799f062 100644 --- a/frontend/src/metabase/public/components/LogoBadge.jsx +++ b/frontend/src/metabase/public/components/LogoBadge.jsx @@ -18,7 +18,7 @@ const LogoBadge = ({ dark }: Props) => ( {jt`Powered by ${( - {t`Report Builder`} + {t`BI Reporting`} )}`} diff --git a/frontend/src/metabase/public/components/widgets/SharingPane.jsx b/frontend/src/metabase/public/components/widgets/SharingPane.jsx index 5f1ba4668bf0..9658a99328b2 100644 --- a/frontend/src/metabase/public/components/widgets/SharingPane.jsx +++ b/frontend/src/metabase/public/components/widgets/SharingPane.jsx @@ -111,7 +111,7 @@ export default class SharingPane extends Component {

{t`Public link`}

-
{t`Share this ${resourceType} with people who don't have a Report Builder account using the URL below:`}
+
{t`Share this ${resourceType} with people who don't have a BI Reporting account using the URL below:`}
{extensions && extensions.length > 0 && (
diff --git a/frontend/src/metabase/pulse/components/WhatsAPulse.jsx b/frontend/src/metabase/pulse/components/WhatsAPulse.jsx index 9aac006af765..1a55d5848522 100644 --- a/frontend/src/metabase/pulse/components/WhatsAPulse.jsx +++ b/frontend/src/metabase/pulse/components/WhatsAPulse.jsx @@ -29,7 +29,7 @@ export default class WhatsAPulse extends Component { className="h3 my3 text-centered text-light text-bold" style={{ maxWidth: "500px" }} > - {t`Pulses let you send data from Metabase to email or Slack on the schedule of your choice.`} + {t`Pulses let you send data from BI Reporting to email or Slack on the schedule of your choice.`}
{this.props.button}
diff --git a/frontend/src/metabase/reference/databases/NoDatabasesEmptyState.jsx b/frontend/src/metabase/reference/databases/NoDatabasesEmptyState.jsx index 62a14b08b880..e477c3ce43ea 100644 --- a/frontend/src/metabase/reference/databases/NoDatabasesEmptyState.jsx +++ b/frontend/src/metabase/reference/databases/NoDatabasesEmptyState.jsx @@ -5,7 +5,7 @@ import AdminAwareEmptyState from "metabase/components/AdminAwareEmptyState"; const NoDatabasesEmptyState = user => ( ( - + {/* SETUP */} )} diff --git a/resources/frontend_client/init.html b/resources/frontend_client/init.html index b6801fc090ae..65ac8230b551 100644 --- a/resources/frontend_client/init.html +++ b/resources/frontend_client/init.html @@ -130,7 +130,7 @@

diff --git a/src/metabase/public_settings.clj b/src/metabase/public_settings.clj index 5b4597a991ca..87a979275ecd 100644 --- a/src/metabase/public_settings.clj +++ b/src/metabase/public_settings.clj @@ -54,7 +54,7 @@ (defsetting site-name (deferred-tru "The name used for this instance of Metabase.") - :default "Report Builder") + :default "BI Reporting") (defsetting site-uuid ;; Don't i18n this docstring because it's not user-facing! :) @@ -216,7 +216,7 @@ (deferred-tru "This will replace the word \"Metabase\" wherever it appears.") :visibility :public :type :string - :default "Report Builder") + :default "BI Reporting") (defsetting application-colors (deferred-tru "These are the primary colors used in charts and throughout Metabase. You might need to refresh your browser to see your changes take effect.") diff --git a/src/metabase/util/embed.clj b/src/metabase/util/embed.clj index 0bbcc481ffd3..dac040274aef 100644 --- a/src/metabase/util/embed.clj +++ b/src/metabase/util/embed.clj @@ -30,7 +30,7 @@ (html [:link {:rel "alternate" :type "application/json+oembed" :href (oembed-url url) - :title "Report Builder"}])) + :title "BI Reporting"}])) (def ^:private ^:const ^String embedly-meta "A `` tag for `Embed.ly` support." From 466fe7fe6d8772d7f0097ae3112b8fa4c24f7b45 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Tue, 17 Aug 2021 09:24:11 +1000 Subject: [PATCH 18/53] Report builder changed to BI reporting --- frontend/src/metabase/nav/containers/Navbar.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index ff6c60154a30..bc708c42f9e0 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -32,7 +32,7 @@ import { getPlainNativeQuery, } from "metabase/new_query/selectors"; import Database from "metabase/entities/databases"; -import {getMetadata} from "metabase/selectors/metadata"; +import { getMetadata } from "metabase/selectors/metadata"; const mapStateToProps = (state, props) => ({ path: getPath(state, props), @@ -41,7 +41,7 @@ const mapStateToProps = (state, props) => ({ plainNativeQuery: getPlainNativeQuery(state), hasDataAccess: getHasDataAccess(state), hasNativeWrite: getHasNativeWrite(state), - metadata: getMetadata(state) + metadata: getMetadata(state), }); import { DefaultSearchColor } from "metabase/nav/constants"; @@ -75,7 +75,10 @@ const MODAL_NEW_DASHBOARD = "MODAL_NEW_DASHBOARD"; // set this to false to prevent a potential spinner on the main nav loadingAndErrorWrapper: false, }) -@connect(mapStateToProps, mapDispatchToProps) +@connect( + mapStateToProps, + mapDispatchToProps, +) export default class Navbar extends Component { state = { modal: null, From b59cbc8340fe1fd40e8e4d087ea1c273f72f4a07 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Tue, 17 Aug 2021 09:38:43 +1000 Subject: [PATCH 19/53] removed welcome text --- frontend/src/metabase/containers/Overworld.jsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx index 684788f40afb..2a192f1f389b 100644 --- a/frontend/src/metabase/containers/Overworld.jsx +++ b/frontend/src/metabase/containers/Overworld.jsx @@ -9,7 +9,6 @@ import CollectionItemsLoader from "metabase/containers/CollectionItemsLoader"; import CandidateListLoader from "metabase/containers/CandidateListLoader"; import ExplorePane from "metabase/components/ExplorePane"; import Tooltip from "metabase/components/Tooltip"; -import MetabotLogo from "metabase/components/MetabotLogo"; import CollectionList from "metabase/components/CollectionList"; import ModalWithTrigger from "metabase/components/ModalWithTrigger"; import Button from "metabase/components/Button"; @@ -18,7 +17,6 @@ import Card from "metabase/components/Card"; import { Grid, GridItem } from "metabase/components/Grid"; import Icon from "metabase/components/Icon"; import Link from "metabase/components/Link"; -import Subhead from "metabase/components/type/Subhead"; import * as Urls from "metabase/lib/urls"; import { color } from "metabase/lib/colors"; @@ -62,17 +60,9 @@ const getGreeting = createSelector([getUser], (user) => ) class Overworld extends React.Component { render() { - const { greeting, user, showHomepageXrays, updateSetting } = this.props; + const { user, showHomepageXrays, updateSetting } = this.props; return ( - - - - - - {greeting} - - {({ items }) => { if (showHomepageXrays && !items.length > 0) { From 73b0c05163dcb086a24a98584cb05c9f01af50a6 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Tue, 17 Aug 2021 09:43:45 +1000 Subject: [PATCH 20/53] removed welcome text --- frontend/src/metabase/containers/Overworld.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/metabase/containers/Overworld.jsx b/frontend/src/metabase/containers/Overworld.jsx index 2a192f1f389b..ca889c620a1b 100644 --- a/frontend/src/metabase/containers/Overworld.jsx +++ b/frontend/src/metabase/containers/Overworld.jsx @@ -36,8 +36,9 @@ import { const PAGE_PADDING = [1, 2, 4]; const ROOT_COLLECTIONS_LOAD_LIMIT = 500; -const getGreeting = createSelector([getUser], (user) => - Greeting.sayHello(user.first_name) +const getGreeting = createSelector( + [getUser], + user => Greeting.sayHello(user.first_name), ); //class Overworld extends Zelda @@ -56,7 +57,7 @@ const getGreeting = createSelector([getUser], (user) => showHomepageXrays: getShowHomepageXrays(state), greeting: getGreeting(state, props), }), - { updateSetting } + { updateSetting }, ) class Overworld extends React.Component { render() { @@ -100,7 +101,7 @@ class Overworld extends React.Component { footer={