Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
handeer committed Feb 24, 2021
1 parent 2ba770c commit e0d9fbd
Show file tree
Hide file tree
Showing 280 changed files with 31,666 additions and 22,626 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ FROM python:3.7-slim
EXPOSE 5000

# Controls whether to install extra dependencies needed for all data sources.
ARG skip_ds_deps
ARG skip_ds_deps=false
# Controls whether to install dev dependencies.
ARG skip_dev_deps

RUN useradd --create-home redash

# Ubuntu 阿里云镜像
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update

# Ubuntu packages
RUN apt-get update && \
apt-get install -y \
Expand Down Expand Up @@ -65,20 +70,22 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ARG databricks_odbc_driver_url=https://databricks.com/wp-content/uploads/2.6.10.1010-2/SimbaSparkODBC-2.6.10.1010-2-Debian-64bit.zip
ADD $databricks_odbc_driver_url /tmp/simba_odbc.zip
RUN unzip /tmp/simba_odbc.zip -d /tmp/ \
&& dpkg -i /tmp/SimbaSparkODBC-*/*.deb \
&& echo "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \
&& rm /tmp/simba_odbc.zip \
&& rm -rf /tmp/SimbaSparkODBC*
#ARG databricks_odbc_driver_url=https://databricks.com/wp-content/uploads/2.6.10.1010-2/SimbaSparkODBC-2.6.10.1010-2-Debian-64bit.zip
#ADD $databricks_odbc_driver_url /tmp/simba_odbc.zip
#RUN unzip /tmp/simba_odbc.zip -d /tmp/ \
# && dpkg -i /tmp/SimbaSparkODBC-*/*.deb \
# && echo "[Simba]\nDriver = /opt/simba/spark/lib/64/libsparkodbc_sb64.so" >> /etc/odbcinst.ini \
# && rm /tmp/simba_odbc.zip \
# && rm -rf /tmp/SimbaSparkODBC*

WORKDIR /app

# Disalbe PIP Cache and Version Check
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_NO_CACHE_DIR=1

#pip国内源
COPY pip.conf /etc/pip.conf
# Use legacy resolver to work around broken build due to resolver changes in pip
ENV PIP_USE_DEPRECATED=legacy-resolver

Expand Down
99 changes: 7 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,12 @@
<p align="center">
<img title="Redash" src='https://redash.io/assets/images/logo.png' width="200px"/>
<img title="Redash" src='http://www.dazdata.com/wp-content/uploads/2020/06/logo.png' width="200px"/>
</p>
Redash是全球最受欢迎的开源实时数据可视化和商业智能(BI)软件,基于新一代云计算和数据分析技术,架构最先进、支持云部署、大并发、定时主动获取等特征;支持数据源种类最全、分析统计图最专业;操作简单易用、响应快捷、拥有成本低;广泛应用于企事业单位、政府机关等需要数据驱动、数据决策、数字化和数智化建设等领域。

[![Documentation](https://img.shields.io/badge/docs-redash.io/help-brightgreen.svg)](https://redash.io/help/)
[![Datree](https://s3.amazonaws.com/catalog.static.datree.io/datree-badge-20px.svg)](https://datree.io/?src=badge)
[![Build Status](https://circleci.com/gh/getredash/redash.png?style=shield&circle-token=8a695aa5ec2cbfa89b48c275aea298318016f040)](https://circleci.com/gh/getredash/redash/tree/master)

Redash is designed to enable anyone, regardless of the level of technical sophistication, to harness the power of data big and small. SQL users leverage Redash to explore, query, visualize, and share data from any data sources. Their work in turn enables anybody in their organization to use the data. Every day, millions of users at thousands of organizations around the world use Redash to develop insights and make data-driven decisions.

Redash features:

1. **Browser-based**: Everything in your browser, with a shareable URL.
2. **Ease-of-use**: Become immediately productive with data without the need to master complex software.
3. **Query editor**: Quickly compose SQL and NoSQL queries with a schema browser and auto-complete.
4. **Visualization and dashboards**: Create [beautiful visualizations](https://redash.io/help/user-guide/visualizations/visualization-types) with drag and drop, and combine them into a single dashboard.
5. **Sharing**: Collaborate easily by sharing visualizations and their associated queries, enabling peer review of reports and queries.
6. **Schedule refreshes**: Automatically update your charts and dashboards at regular intervals you define.
7. **Alerts**: Define conditions and be alerted instantly when your data changes.
8. **REST API**: Everything that can be done in the UI is also available through REST API.
9. **Broad support for data sources**: Extensible data source API with native support for a long list of common databases and platforms.

<img src="https://raw.githubusercontent.com/getredash/website/8e820cd02c73a8ddf4f946a9d293c54fd3fb08b9/website/_assets/images/redash-anim.gif" width="80%"/>

## Getting Started

* [Setting up Redash instance](https://redash.io/help/open-source/setup) (includes links to ready-made AWS/GCE images).
* [Documentation](https://redash.io/help/).

## Supported Data Sources

Redash supports more than 35 SQL and NoSQL [data sources](https://redash.io/help/data-sources/supported-data-sources). It can also be extended to support more. Below is a list of built-in sources:

- Amazon Athena
- Amazon DynamoDB
- Amazon Redshift
- Axibase Time Series Database
- Cassandra
- ClickHouse
- CockroachDB
- CSV
- Databricks (Apache Spark)
- DB2 by IBM
- Druid
- Elasticsearch
- Google Analytics
- Google BigQuery
- Google Spreadsheets
- Graphite
- Greenplum
- Hive
- Impala
- InfluxDB
- JIRA
- JSON
- Apache Kylin
- OmniSciDB (Formerly MapD)
- MemSQL
- Microsoft Azure Data Warehouse / Synapse
- Microsoft Azure SQL Database
- Microsoft SQL Server
- MongoDB
- MySQL
- Oracle
- PostgreSQL
- Presto
- Prometheus
- Python
- Qubole
- Rockset
- Salesforce
- ScyllaDB
- Shell Scripts
- Snowflake
- SQLite
- TreasureData
- Vertica
- Yandex AppMetrrica
- Yandex Metrica

## Getting Help

* Issues: https://github.com/getredash/redash/issues
* Discussion Forum: https://discuss.redash.io/

## Reporting Bugs and Contributing Code

* Want to report a bug or request a feature? Please open [an issue](https://github.com/getredash/redash/issues/new).
* Want to help us build **_Redash_**? Fork the project, edit in a [dev environment](https://redash.io/help-onpremise/dev/guide.html) and make a pull request. We need all the help we can get!

## Security

Please email security@redash.io to report any security vulnerabilities. We will acknowledge receipt of your vulnerability and strive to send you regular updates about our progress. If you're curious about the status of your disclosure please feel free to email us again. If you want to encrypt your disclosure email, you can use [this PGP key](https://keybase.io/arikfr/key.asc).

## License
Redash系统架构
<p align="center">
<img title="Redash" src='http://www.dazdata.com/wp-content/uploads/2020/06/tech.jpg' width="960px"/>
</p>

BSD-2-Clause.
达之数据推出的Redash中文版,秉承开源精神,为广大企业提供优秀的免费开源软件,并提供专业的Redash技术支持和服务,研发本地化应用插件和基于Redash技术架构的Dazdata数据分析与预测平台。
Binary file added client/app/assets/images/db-logos/excel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/gravatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ function useNavbarActiveState() {
return useMemo(
() => ({
dashboards: includes(
[
"Dashboards.List",
"Dashboards.Favorites",
"Dashboards.My",
"Dashboards.ViewOrEdit",
"Dashboards.LegacyViewOrEdit",
],
["Dashboards.List", "Dashboards.Favorites", "Dashboards.ViewOrEdit", "Dashboards.LegacyViewOrEdit"],
currentRoute.id
),
queries: includes(
Expand Down Expand Up @@ -85,23 +79,23 @@ export default function DesktopNavbar() {
<Menu.Item key="dashboards" className={activeState.dashboards ? "navbar-active-item" : null}>
<Link href="dashboards">
<DesktopOutlinedIcon />
<span className="desktop-navbar-label">Dashboards</span>
<span className="desktop-navbar-label">报表</span>
</Link>
</Menu.Item>
)}
{currentUser.hasPermission("view_query") && (
<Menu.Item key="queries" className={activeState.queries ? "navbar-active-item" : null}>
<Link href="queries">
<CodeOutlinedIcon />
<span className="desktop-navbar-label">Queries</span>
<span className="desktop-navbar-label">查询</span>
</Link>
</Menu.Item>
)}
{currentUser.hasPermission("list_alerts") && (
<Menu.Item key="alerts" className={activeState.alerts ? "navbar-active-item" : null}>
<Link href="alerts">
<AlertOutlinedIcon />
<span className="desktop-navbar-label">Alerts</span>
<span className="desktop-navbar-label">提醒</span>
</Link>
</Menu.Item>
)}
Expand All @@ -116,27 +110,27 @@ export default function DesktopNavbar() {
title={
<React.Fragment>
<PlusOutlinedIcon />
<span className="desktop-navbar-label">Create</span>
<span className="desktop-navbar-label">新建</span>
</React.Fragment>
}>
{canCreateQuery && (
<Menu.Item key="new-query">
<Link href="queries/new" data-test="CreateQueryMenuItem">
New Query
新建查询
</Link>
</Menu.Item>
)}
{canCreateDashboard && (
<Menu.Item key="new-dashboard">
<a data-test="CreateDashboardMenuItem" onMouseUp={() => CreateDashboardDialog.showModal()}>
New Dashboard
新建报表
</a>
</Menu.Item>
)}
{canCreateAlert && (
<Menu.Item key="new-alert">
<Link data-test="CreateAlertMenuItem" href="alerts/new">
New Alert
新建提醒
</Link>
</Menu.Item>
)}
Expand All @@ -148,14 +142,14 @@ export default function DesktopNavbar() {
<Menu.Item key="help">
<HelpTrigger showTooltip={false} type="HOME">
<QuestionCircleOutlinedIcon />
<span className="desktop-navbar-label">Help</span>
<span className="desktop-navbar-label">帮助</span>
</HelpTrigger>
</Menu.Item>
{firstSettingsTab && (
<Menu.Item key="settings" className={activeState.dataSources ? "navbar-active-item" : null}>
<Link href={firstSettingsTab.path} data-test="SettingsLink">
<SettingOutlinedIcon />
<span className="desktop-navbar-label">Settings</span>
<span className="desktop-navbar-label">设置</span>
</Link>
</Menu.Item>
)}
Expand All @@ -171,17 +165,17 @@ export default function DesktopNavbar() {
</span>
}>
<Menu.Item key="profile">
<Link href="users/me">Profile</Link>
<Link href="users/me">个人设置</Link>
</Menu.Item>
{currentUser.hasPermission("super_admin") && (
<Menu.Item key="status">
<Link href="admin/status">System Status</Link>
<Link href="admin/status">系统状态</Link>
</Menu.Item>
)}
<Menu.Divider />
<Menu.Item key="logout">
<a data-test="LogOutButton" onClick={() => Auth.logout()}>
Log out
退出
</a>
</Menu.Item>
<Menu.Divider />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,42 @@ export default function MobileNavbar({ getPopupContainer }) {
<Menu mode="vertical" theme="dark" selectable={false} className="mobile-navbar-menu">
{currentUser.hasPermission("list_dashboards") && (
<Menu.Item key="dashboards">
<Link href="dashboards">Dashboards</Link>
<Link href="dashboards">报表</Link>
</Menu.Item>
)}
{currentUser.hasPermission("view_query") && (
<Menu.Item key="queries">
<Link href="queries">Queries</Link>
<Link href="queries">查询</Link>
</Menu.Item>
)}
{currentUser.hasPermission("list_alerts") && (
<Menu.Item key="alerts">
<Link href="alerts">Alerts</Link>
<Link href="alerts">提醒</Link>
</Menu.Item>
)}
<Menu.Item key="profile">
<Link href="users/me">Edit Profile</Link>
<Link href="users/me">个人设置</Link>
</Menu.Item>
<Menu.Divider />
{firstSettingsTab && (
<Menu.Item key="settings">
<Link href={firstSettingsTab.path}>Settings</Link>
<Link href={firstSettingsTab.path}>设置</Link>
</Menu.Item>
)}
{currentUser.hasPermission("super_admin") && (
<Menu.Item key="status">
<Link href="admin/status">System Status</Link>
<Link href="admin/status">系统状态</Link>
</Menu.Item>
)}
{currentUser.hasPermission("super_admin") && <Menu.Divider />}
<Menu.Item key="help">
{/* eslint-disable-next-line react/jsx-no-target-blank */}
<Link href="https://redash.io/help" target="_blank" rel="noopener">
Help
帮助
</Link>
</Menu.Item>
<Menu.Item key="logout" onClick={() => Auth.logout()}>
Log out
退出
</Menu.Item>
</Menu>
}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function VersionInfo() {
return (
<React.Fragment>
<div>
Version: {clientConfig.version}
版本: {clientConfig.version}
{frontendVersion !== clientConfig.version && ` (${frontendVersion.substring(0, 8)})`}
</div>
{clientConfig.newVersionAvailable && currentUser.hasPermission("super_admin") && (
Expand Down
6 changes: 3 additions & 3 deletions client/app/components/ApplicationArea/ErrorMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import { ErrorMessageDetails } from "@/components/ApplicationArea/ErrorMessageDe
function getErrorMessageByStatus(status, defaultMessage) {
switch (status) {
case 404:
return "It seems like the page you're looking for cannot be found.";
return "网页不存在。";
case 401:
case 403:
return "It seems like you don’t have permission to see this page.";
return "没有权限。";
default:
return defaultMessage;
}
}

function getErrorMessage(error) {
const message = "It seems like we encountered an error. Try refreshing this page or contact your administrator.";
const message = "系统出错,请刷新重试或者联系系统管理员!";
if (isObject(error)) {
// HTTP errors
if (error.isAxiosError && isObject(error.response)) {
Expand Down
6 changes: 3 additions & 3 deletions client/app/components/ApplicationArea/ErrorMessage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { mount } from "enzyme";
import ErrorMessage from "./ErrorMessage";

const ErrorMessages = {
UNAUTHORIZED: "It seems like you don’t have permission to see this page.",
NOT_FOUND: "It seems like the page you're looking for cannot be found.",
GENERIC: "It seems like we encountered an error. Try refreshing this page or contact your administrator.",
UNAUTHORIZED: "没有权限",
NOT_FOUND: "网页不存在",
GENERIC: "系统出错,请联系管理员。",
};

function mockAxiosError(status = 500, response = {}) {
Expand Down
12 changes: 11 additions & 1 deletion client/app/components/ApplicationArea/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import routes from "@/services/routes";
import Router from "./Router";
import handleNavigationIntent from "./handleNavigationIntent";
import ErrorMessage from "./ErrorMessage";
import ConfigProvider from 'antd/lib/config-provider';
import zh_CN from 'antd/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';

export default function ApplicationArea() {
const [currentRoute, setCurrentRoute] = useState(null);
Expand Down Expand Up @@ -33,5 +37,11 @@ export default function ApplicationArea() {
return <ErrorMessage error={unhandledError} />;
}

return <Router routes={routes.items} onRouteChange={setCurrentRoute} />;
moment.locale('zh-cn')

return (
<ConfigProvider locale={zh_CN}>
<Router routes={routes.items} onRouteChange={setCurrentRoute} />
</ConfigProvider>
);
}
Loading

0 comments on commit e0d9fbd

Please sign in to comment.