Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getredash/redash
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: careem/redash
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 19 commits
  • 25 files changed
  • 5 contributors

Commits on Nov 14, 2022

  1. hotfix redash (#1)

    * disable shortcut to execute query
    
    * updating trino
    
    * fix
    
    Co-authored-by: Karl christian <Karlchristian@Karls-MacBook-Pro.local>
    careemkarl and Karl christian authored Nov 14, 2022
    Copy the full SHA
    045c8fc View commit details

Commits on Nov 16, 2022

  1. fix deploy

    Karl christian authored and Karl christian committed Nov 16, 2022
    Copy the full SHA
    cd47c35 View commit details
  2. fix

    Karl christian authored and Karl christian committed Nov 16, 2022
    Copy the full SHA
    93470cc View commit details
  3. fix

    Karl christian authored and Karl christian committed Nov 16, 2022
    Copy the full SHA
    8d8acb7 View commit details

Commits on Nov 17, 2022

  1. add make

    Karl christian authored and Karl christian committed Nov 17, 2022
    Copy the full SHA
    0bf4e13 View commit details

Commits on Dec 30, 2022

  1. enable Auto limit (#4)

    * enable auto limit on trino, presto and druid
    
    * add presto
    
    Co-authored-by: Karl christian <Karlchristian@Karls-MacBook-Pro.local>
    careemkarl and Karl christian authored Dec 30, 2022
    Copy the full SHA
    6a177dc View commit details
  2. enable autocomplete (#5)

    Co-authored-by: Karl christian <Karlchristian@Karls-MacBook-Pro.local>
    careemkarl and Karl christian authored Dec 30, 2022
    Copy the full SHA
    d720a36 View commit details

Commits on Mar 26, 2024

  1. add cd

    Karl christian authored and Karl christian committed Mar 26, 2024
    Copy the full SHA
    59fb1e8 View commit details
  2. add cd

    Karl christian authored and Karl christian committed Mar 26, 2024
    Copy the full SHA
    5ad7f2e View commit details

Commits on May 21, 2024

  1. Copy the full SHA
    c2a8edb View commit details
  2. Copy the full SHA
    a46fff3 View commit details
  3. Copy the full SHA
    38b9775 View commit details
  4. Revert "Reapply "[DNA-10871]: Add query source header for redash quer…

    …ies""
    
    This reverts commit 38b9775.
    puneet-bdp committed May 21, 2024
    Copy the full SHA
    4dca853 View commit details

Commits on May 22, 2024

  1. [DNA-10871]: Add query source header for redash queries (#9)

    * [DNA-10871]: Add query source header for redash queries
    puneet-bdp authored May 22, 2024
    Copy the full SHA
    aef91d1 View commit details

Commits on May 27, 2024

  1. Copy the full SHA
    d664401 View commit details

Commits on Jun 1, 2024

  1. Copy the full SHA
    f2ca720 View commit details

Commits on Aug 6, 2024

  1. [DNA-0000]: Add Trino original user header for impersonated users (#29)

    * [DNA-00000]: Fix dependencies version
    
    * [DNA-00000]: Add Trino original user header
    puneet-bdp authored Aug 6, 2024
    Copy the full SHA
    ba920a0 View commit details

Commits on Oct 24, 2024

  1. [DNA-21300]: Redash Deprecation Banner (#38)

    * feat: deprecation banner along with dismiss conditions implemented
    
    * feat: adding banner in list and specific components to be accessible by user via direct links
    SamraHanifCareem authored Oct 24, 2024
    Copy the full SHA
    2a4d29c View commit details

Commits on Feb 24, 2025

  1. [DNA-23181]: Disable Creation of dashboard on Redash (#43)

    * feat: new line for checking commit
    
    * feat: removing creation of dashboards from welcome page and updating banner content
    
    * fix: removed new line from redme
    SamraHanifCareem authored Feb 24, 2025
    Copy the full SHA
    9ab938e View commit details
22 changes: 22 additions & 0 deletions .github/workflows/redash-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: build and push Redash image

on:
push:
branches:
- master
workflow_dispatch:
inputs:
image-tag:
type: string
default: 'latest'
description: Which image-tag to use

jobs:
publish_to_ecr:
name: publish image to ECR
secrets: inherit
uses: careem/shared-workflows/.github/workflows/ecr-publish.yml@master
with:
tag: ${{ inputs.image-tag }}
ecr-name: careem-redash
docker-file: Dockerfile
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -19,13 +19,13 @@ COPY --chown=redash viz-lib /frontend/viz-lib
ARG code_coverage
ENV BABEL_ENV=${code_coverage:+test}

RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn --frozen-lockfile --network-concurrency 1; fi
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn install --network-timeout 1000000 && yarn cache clean && yarn --frozen-lockfile --network-concurrency 1; fi

COPY --chown=redash client /frontend/client
COPY --chown=redash webpack.config.js /frontend/
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn build; else mkdir -p /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi

FROM python:3.7-slim-buster
FROM --platform=linux/amd64 python:3.7-slim-buster

EXPOSE 5000

11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -55,3 +55,14 @@ redis-cli:

bash:
docker-compose run --rm server bash

build_stg:
docker build -t 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:latest . &&\
docker push 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:latest

build_prod:
docker build --network=host -t careem-redash . &&\
docker tag careem-redash 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:11.0.0 &&\
docker push 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:11.0.0 &&\
docker tag careem-redash 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:latest &&\
docker push 848569320300.dkr.ecr.eu-west-1.amazonaws.com/careem-redash:latest
48 changes: 48 additions & 0 deletions client/app/components/DeprecationBanner/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React, { useState, useEffect } from "react";
import ExclamationCircleFilled from "@ant-design/icons/ExclamationCircleFilled";
import CloseOutlined from "@ant-design/icons/CloseOutlined";

import "./index.less";

function DeprecationBanner() {
const [showBanner, setShowBanner] = useState(true);

useEffect(() => {
const dismissedTimestamp = localStorage.getItem('banner_dismissed');
if (dismissedTimestamp) {
const dismissedDate = new Date(parseInt(dismissedTimestamp, 10));
const currentDate = new Date();
if (dismissedDate.toDateString() === currentDate.toDateString()) {
setShowBanner(false);
}
}
}, []);

const handleDismiss = () => {
const currentTimestamp = new Date().getTime();
localStorage.setItem('banner_dismissed', currentTimestamp.toString());
setShowBanner(false);
};

if (!showBanner) {
return null;
}

return (
<div className="deprecation-banner">
<div className="banner-content">
<ExclamationCircleFilled className="warning-icon" />
<div className="banner-text">
Redash will be deprecated by {' '}<strong>June 2025.</strong>Creation of new dashboards has been disabled, and creation of alerts/queries will be disabled soon. Please migrate your assets to <strong>Careem Insights</strong> and for more queries: Please reach out to us on Slack at{' '}
<span className="support-channel">#careem-insights-support</span>
</div>
</div>
<CloseOutlined
className="close-button"
onClick={handleDismiss}
/>
</div>
);
}

export default DeprecationBanner;
59 changes: 59 additions & 0 deletions client/app/components/DeprecationBanner/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.deprecation-banner {
background-color: rgba(255, 77, 79, 0.1);
color: #cf1322;
padding: 8px;
font-size: 13px;
font-family: Inter, Helvetica, Arial;
margin: 9px 0 9px 0;
border-radius: 5px;
border: 1px solid #ff4d4f;
display: flex;
justify-content: space-between;
align-items: center;

.banner-content {
display: flex;
align-items: center;
}

.warning-icon {
font-size: 24px;
margin-right: 15px;
}

.banner-text {
text-align: left;
align-items: center;
}

strong {
font-weight: bold;
margin-right: 4px;
}

em {
font-style: italic;
font-weight: bold;
}

.support-channel {
color: #cf1322;
font-weight: bold;
}

.close-button {
cursor: pointer;
font-size: 18px;
color: #cf1322;
opacity: 0.7;
transition: opacity 0.3s ease;
padding: 5px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
}

.close-button:hover {
opacity: 1;
background-color: rgba(255, 255, 255, 0.4);
}
}
12 changes: 8 additions & 4 deletions client/app/components/PageHeader/index.jsx
Original file line number Diff line number Diff line change
@@ -2,13 +2,17 @@ import React from "react";
import PropTypes from "prop-types";

import "./index.less";
import DeprecationBanner from "../DeprecationBanner";

export default function PageHeader({ title, actions }) {
return (
<div className="page-header-wrapper">
<h3>{title}</h3>
{actions && <div className="page-header-actions">{actions}</div>}
</div>
<>
<DeprecationBanner />
<div className="page-header-wrapper">
<h3>{title}</h3>
{actions && <div className="page-header-actions">{actions}</div>}
</div>
</>
);
}

14 changes: 1 addition & 13 deletions client/app/components/empty-state/EmptyState.jsx
Original file line number Diff line number Diff line change
@@ -154,18 +154,6 @@ function EmptyState({
/>
),
},
{
key: "dashboards",
node: (
<Step
key="dashboards"
show={isAvailable.dashboard}
completed={isCompleted.dashboard}
onClick={showCreateDashboardDialog}
urlText="Create your first Dashboard"
/>
),
},
{
key: "users",
node: (
@@ -233,7 +221,7 @@ EmptyState.defaultProps = {
header: null,
helpMessage: null,
closable: false,
onClose: () => {},
onClose: () => { },

onboardingMode: false,
showAlertStep: false,
42 changes: 23 additions & 19 deletions client/app/pages/alert/components/Title.jsx
Original file line number Diff line number Diff line change
@@ -6,30 +6,34 @@ import { getDefaultName } from "../Alert";
import { Alert as AlertType } from "@/components/proptypes";

import "./Title.less";
import DeprecationBanner from "@/components/DeprecationBanner";

export default function Title({ alert, editMode, name, onChange, children }) {
const defaultName = getDefaultName(alert);
return (
<div className="alert-header">
<div className="alert-title">
<h3>
{editMode && alert.query ? (
// BUG: Input is not the same width as the container
// TODO: consider adding a label (not obvious for sighted users)
<Input
className="f-inherit"
placeholder={defaultName}
value={name}
aria-label="Alert title"
onChange={e => onChange(e.target.value)}
/>
) : (
name || defaultName
)}
</h3>
<>
<DeprecationBanner />
<div className="alert-header">
<div className="alert-title">
<h3>
{editMode && alert.query ? (
// BUG: Input is not the same width as the container
// TODO: consider adding a label (not obvious for sighted users)
<Input
className="f-inherit"
placeholder={defaultName}
value={name}
aria-label="Alert title"
onChange={e => onChange(e.target.value)}
/>
) : (
name || defaultName
)}
</h3>
</div>
<div className="alert-actions">{children}</div>
</div>
<div className="alert-actions">{children}</div>
</div>
</>
);
}

13 changes: 9 additions & 4 deletions client/app/pages/dashboards/components/DashboardHeader.jsx
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import { durationHumanize } from "@/lib/utils";
import { DashboardStatusEnum } from "../hooks/useDashboard";

import "./DashboardHeader.less";
import DeprecationBanner from "@/components/DeprecationBanner";

function getDashboardTags() {
return getTags("api/dashboards/tags").then(tags => map(tags, t => t.name));
@@ -286,10 +287,14 @@ export default function DashboardHeader({ dashboardConfiguration, headerExtra })
const DashboardControlComponent = editingLayout ? DashboardEditControl : DashboardControl;

return (
<div className="dashboard-header">
<DashboardPageTitle dashboardConfiguration={dashboardConfiguration} />
<DashboardControlComponent dashboardConfiguration={dashboardConfiguration} headerExtra={headerExtra} />
</div>
<>
<DeprecationBanner />
<div className="dashboard-header">
<DashboardPageTitle dashboardConfiguration={dashboardConfiguration} />
<DashboardControlComponent dashboardConfiguration={dashboardConfiguration} headerExtra={headerExtra} />
</div>
</>

);
}

4 changes: 4 additions & 0 deletions client/app/pages/home/Home.jsx
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ import notification from "@/services/notification";
import routes from "@/services/routes";

import { DashboardAndQueryFavoritesList } from "./components/FavoritesList";
import DeprecationBanner from "@/components/DeprecationBanner";

import "./Home.less";

@@ -74,6 +75,9 @@ export default function Home() {
return (
<div className="home-page">
<div className="container">
<div className="banner-margin">
<DeprecationBanner />
</div>
{includes(messages, "using-deprecated-embed-feature") && <DeprecatedEmbedFeatureAlert />}
{includes(messages, "email-not-verified") && <EmailNotVerifiedAlert />}
<DynamicComponent name="Home.EmptyState">
4 changes: 4 additions & 0 deletions client/app/pages/home/Home.less
Original file line number Diff line number Diff line change
@@ -5,3 +5,7 @@
.home-favorites-list {
margin-top: -20px;
}

.banner-margin {
margin-top: -15px
}
2 changes: 1 addition & 1 deletion client/app/pages/queries/QuerySource.jsx
Original file line number Diff line number Diff line change
@@ -298,7 +298,7 @@ function QuerySource(props) {
}
executeButtonProps={{
disabled: !queryFlags.canExecute || isQueryExecuting || areParametersDirty,
shortcut: "mod+enter, alt+enter, ctrl+enter, shift+enter",
// shortcut: "mod+enter, alt+enter, ctrl+enter, shift+enter",
onClick: doExecuteQuery,
text: (
<span className="hidden-xs">{selectedText === null ? "Execute" : "Execute Selected"}</span>
2 changes: 1 addition & 1 deletion client/app/pages/queries/QueryView.jsx
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ function QueryView(props) {
<QueryViewButton
className="m-r-5"
type="primary"
shortcut="mod+enter, alt+enter, ctrl+enter"
// shortcut="mod+enter, alt+enter, ctrl+enter"
disabled={!queryFlags.canExecute || isExecuting || areParametersDirty}
onClick={doExecuteQuery}>
Refresh
Loading