Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pyexasol datasource, ensure that integer dont overflow in javascript #1

Merged
merged 26 commits into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dda5a9d
Fix the DB migration so that the correct key is used for encrypting D…
Jakdaw Nov 11, 2019
c004107
Migrate Cohort visualization to React (#4270)
kravets-levko Nov 13, 2019
cf274d9
Fix: number based alerts evaluation isn't working (#4295)
arikfr Nov 13, 2019
d5a3f0d
CLI command to reencrypt data source options (#4190)
Nov 13, 2019
ef56e4e
use to set the hash instead of directly manipulating it (#4351)
Nov 13, 2019
1a95904
Migrate Choropleth visualization to React (#4313)
kravets-levko Nov 14, 2019
b44fa51
Migrate Funnel visualization to React (#4267)
kravets-levko Nov 14, 2019
aa06b32
Add some tests for Choropleth visualization (#4358)
kravets-levko Nov 14, 2019
0aebb37
Remove Chrome Logger and update Cypress and Percy (#4354)
gabrieldutra Nov 14, 2019
5cd6913
Fix Cypress and Percy flakyness issues (#4365)
gabrieldutra Nov 18, 2019
c6a2725
Migrate Map visualization to React (#4278)
kravets-levko Nov 20, 2019
818649b
Migrate Chart visualization to React Part 2: Editor (#4139)
kravets-levko Nov 20, 2019
1673093
add pyexasol datasource, ensure that integer dont overflow in javascript
stefan-mees Nov 12, 2019
4d1b359
Remove unused npm dependencies (#4380)
arikfr Nov 21, 2019
7cfd362
fix typo at unsupportedRedirect.js (#4387)
uncletimmy3 Nov 24, 2019
a7a9339
Hide deprecated visualizations from query editor (#4388)
kravets-levko Nov 24, 2019
e72d7a8
Table visualization: accept timestamp for date/time columns (#4389)
kravets-levko Nov 24, 2019
0563ecf
Migrate Home to React (#4379)
gabrieldutra Nov 24, 2019
7c97d8e
Add autoscroll to ng-view (#4337)
gabrieldutra Nov 24, 2019
be56035
don't try to purge jobs which have already been deleted (#4396)
Nov 25, 2019
c70a48d
Table visualization with column named "children" renders +/- buttons …
kravets-levko Nov 26, 2019
5de291a
Fix Map spec and Alert Page snapshot flakyness (#4403)
gabrieldutra Nov 26, 2019
f5a4082
Remove builtins invalid in Python 3 from Python runner (#4375)
NicolasLM Nov 27, 2019
c612bba
Amazon CloudWatch query runners (#4372)
arikfr Nov 27, 2019
80f3ec1
avoid logging job parameters (#4311)
Nov 27, 2019
300ac92
Merge branch 'master' into feat/add_pyexasol
arikfr Nov 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/docker-compose.cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
server:
build: ../
command: dev_server
command: server
depends_on:
- postgres
- redis
Expand Down
Binary file added client/app/assets/images/db-logos/cloudwatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/db-logos/exasol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions client/app/assets/less/inc/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ strong {

// Fixed width layout for specific pages
@media (min-width: 768px) {
.settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.settings-screen, .home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.container {
width: 750px;
}
}
}

@media (min-width: 992px) {
.settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.settings-screen, .home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.container {
width: 970px;
}
}
}

@media (min-width: 1200px) {
.settings-screen, home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.settings-screen, .home-page, page-dashboard-list, page-queries-list, page-alerts-list, alert-page, queries-search-results-page, .fixed-container {
.container {
width: 1170px;
}
Expand Down
5 changes: 5 additions & 0 deletions client/app/assets/less/inc/misc.less
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,9 @@
.hide-in-percy, .pace {
visibility: hidden;
}

// hide tooltips in Percy
.ant-tooltip {
display: none !important;
}
}
28 changes: 0 additions & 28 deletions client/app/assets/less/inc/visualizations/cohort.less

This file was deleted.

28 changes: 0 additions & 28 deletions client/app/assets/less/inc/visualizations/map.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,4 @@
height: 100%;
z-index: 0;
}

.map-custom-control.leaflet-bar {
background: #fff;
padding: 10px;
margin: 10px;
position: absolute;
z-index: 1;

&.top-left {
left: 0;
top: 0;
}

&.top-right {
right: 0;
top: 0;
}

&.bottom-left {
left: 0;
bottom: 0;
}

&.bottom-right {
right: 0;
bottom: 0;
}
}
}
1 change: 0 additions & 1 deletion client/app/assets/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
@import 'inc/visualizations/box';
@import 'inc/visualizations/pivot-table';
@import 'inc/visualizations/map';
@import 'inc/visualizations/cohort';
@import 'inc/visualizations/misc';

/** VENDOR OVERRIDES **/
Expand Down
9 changes: 2 additions & 7 deletions client/app/components/BeaconConsent.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from 'react';
import { react2angular } from 'react2angular';
import Card from 'antd/lib/card';
import Button from 'antd/lib/button';
import Typography from 'antd/lib/typography';
Expand All @@ -10,7 +9,7 @@ import OrgSettings from '@/services/organizationSettings';

const Text = Typography.Text;

export function BeaconConsent() {
function BeaconConsent() {
const [hide, setHide] = useState(false);

if (!clientConfig.showBeaconConsentMessage || hide) {
Expand Down Expand Up @@ -76,8 +75,4 @@ export function BeaconConsent() {
);
}

export default function init(ngModule) {
ngModule.component('beaconConsent', react2angular(BeaconConsent));
}

init.init = true;
export default BeaconConsent;
1 change: 1 addition & 0 deletions client/app/components/ColorPicker/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default function Input({ color, presetColors, presetColumns, onChange, on
))}
<div className="color-picker-input">
<TextInput
data-test="ColorPicker.CustomColor"
addonBefore={<Typography.Text type="secondary">#</Typography.Text>}
value={inputValue}
onChange={e => handleInputChange(e.target.value)}
Expand Down
30 changes: 30 additions & 0 deletions client/app/components/ColorPicker/Label.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { useMemo } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import { validateColor, getColorName } from './utils';
import './label.less';

export default function Label({ className, color, presetColors, ...props }) {
const name = useMemo(
() => getColorName(validateColor(color), presetColors),
[color, presetColors],
);

return <span className={cx('color-label', className)} {...props}>{name}</span>;
}

Label.propTypes = {
className: PropTypes.string,
color: PropTypes.string,
presetColors: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.string), // array of colors (no tooltips)
PropTypes.objectOf(PropTypes.string), // color name => color value
]),
};

Label.defaultProps = {
className: null,
color: '#FFFFFF',
presetColors: null,
};
5 changes: 3 additions & 2 deletions client/app/components/ColorPicker/Swatch.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { isString } from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Tooltip from 'antd/lib/tooltip';

import './swatch.less';

export default function Swatch({ className, color, title, size, ...props }) {
const result = (
<span
className={`color-swatch ${className}`}
className={cx('color-swatch', className)}
style={{ backgroundColor: color, width: size }}
{...props}
/>
Expand All @@ -30,7 +31,7 @@ Swatch.propTypes = {
};

Swatch.defaultProps = {
className: '',
className: null,
title: null,
color: 'transparent',
size: 12,
Expand Down
33 changes: 21 additions & 12 deletions client/app/components/ColorPicker/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { toString } from 'lodash';
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, useMemo } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import tinycolor from 'tinycolor2';
import Popover from 'antd/lib/popover';
import Card from 'antd/lib/card';
Expand All @@ -9,18 +10,16 @@ import Icon from 'antd/lib/icon';

import ColorInput from './Input';
import Swatch from './Swatch';
import Label from './Label';
import { validateColor } from './utils';

import './index.less';

function validateColor(value, fallback = null) {
value = tinycolor(value);
return value.isValid() ? '#' + value.toHex().toUpperCase() : fallback;
}

export default function ColorPicker({
color, placement, presetColors, presetColumns, triggerSize, interactive, children, onChange,
color, placement, presetColors, presetColumns, interactive, children, onChange, triggerProps,
}) {
const [visible, setVisible] = useState(false);
const validatedColor = useMemo(() => validateColor(color), [color]);
const [currentColor, setCurrentColor] = useState('');

function handleApply() {
Expand Down Expand Up @@ -57,16 +56,18 @@ export default function ColorPicker({

useEffect(() => {
if (visible) {
setCurrentColor(validateColor(color));
setCurrentColor(validatedColor);
}
}, [color, visible]);
}, [validatedColor, visible]);

return (
<Popover
arrowPointAtCenter
overlayClassName={`color-picker ${interactive ? 'color-picker-interactive' : 'color-picker-with-actions'}`}
overlayStyle={{ '--color-picker-selected-color': currentColor }}
content={(
<Card
data-test="ColorPicker"
className="color-picker-panel"
bordered={false}
title={toString(currentColor).toUpperCase()}
Expand All @@ -90,7 +91,14 @@ export default function ColorPicker({
visible={visible}
onVisibleChange={setVisible}
>
{children || (<Swatch className="color-picker-trigger" color={validateColor(color)} size={triggerSize} />)}
{children || (
<Swatch
color={validatedColor}
size={30}
{...triggerProps}
className={cx('color-picker-trigger', triggerProps.className)}
/>
)}
</Popover>
);
}
Expand All @@ -107,8 +115,8 @@ ColorPicker.propTypes = {
PropTypes.objectOf(PropTypes.string), // color name => color value
]),
presetColumns: PropTypes.number,
triggerSize: PropTypes.number,
interactive: PropTypes.bool,
triggerProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
children: PropTypes.node,
onChange: PropTypes.func,
};
Expand All @@ -118,11 +126,12 @@ ColorPicker.defaultProps = {
placement: 'top',
presetColors: null,
presetColumns: 8,
triggerSize: 30,
interactive: false,
triggerProps: {},
children: null,
onChange: () => {},
};

ColorPicker.Input = ColorInput;
ColorPicker.Swatch = Swatch;
ColorPicker.Label = Label;
7 changes: 7 additions & 0 deletions client/app/components/ColorPicker/label.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.color-label {
vertical-align: middle;

.color-swatch + & {
margin-left: 7px;
}
}
14 changes: 14 additions & 0 deletions client/app/components/ColorPicker/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { isArray, findKey } from 'lodash';
import tinycolor from 'tinycolor2';

export function validateColor(value, fallback = null) {
value = tinycolor(value);
return value.isValid() ? '#' + value.toHex().toUpperCase() : fallback;
}

export function getColorName(color, presetColors) {
if (isArray(presetColors)) {
return color;
}
return findKey(presetColors, v => validateColor(v) === color) || color;
}
2 changes: 1 addition & 1 deletion client/app/components/ParameterApplyButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function ParameterApplyButton({ paramCount, onClick }) {
return (
<div className="parameter-apply-button" data-show={!!paramCount} data-test="ParameterApplyButton">
<Badge count={paramCount}>
<Tooltip title={`${KeyboardShortcuts.modKey} + Enter`}>
<Tooltip title={paramCount ? `${KeyboardShortcuts.modKey} + Enter` : null}>
<span>
<Button onClick={onClick}>
<i className={`fa fa-${icon}`} /> Apply Changes
Expand Down
4 changes: 2 additions & 2 deletions client/app/components/QuerySelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function QuerySelector(props) {
let isStaleSearch = false;
const debouncedSearch = debounce(_search, SEARCH_DEBOUNCE_DURATION);
const placeholder = 'Search a query by name';
const clearIcon = <i className="fa fa-times" onClick={() => selectQuery(null)} />;
const spinIcon = <i className={cx('fa fa-spinner fa-pulse', { hidden: !searching })} />;
const clearIcon = <i className="fa fa-times hide-in-percy" onClick={() => selectQuery(null)} />;
const spinIcon = <i className={cx('fa fa-spinner fa-pulse hide-in-percy', { hidden: !searching })} />;

// set selected from prop
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/app-view/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ <h4>{{ $ctrl.handler.error.message }}</h4>
</div>
</div>
</div>
<div id="app-content" ng-if="!$ctrl.handler.error" ng-view></div>
<div id="app-content" ng-if="!$ctrl.handler.error" ng-view autoscroll></div>
9 changes: 2 additions & 7 deletions client/app/components/empty-state/EmptyState.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { keys, some } from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { react2angular } from 'react2angular';
import classNames from 'classnames';
import CreateDashboardDialog from '@/components/dashboards/CreateDashboardDialog';
import { currentUser } from '@/services/auth';
Expand Down Expand Up @@ -38,7 +37,7 @@ Step.defaultProps = {
onClick: null,
};

export function EmptyState({
function EmptyState({
icon,
header,
description,
Expand Down Expand Up @@ -169,8 +168,4 @@ EmptyState.defaultProps = {
showInviteStep: false,
};

export default function init(ngModule) {
ngModule.component('emptyState', react2angular(EmptyState));
}

init.init = true;
export default EmptyState;
Loading