mirror of
https://github.com/apache/superset.git
synced 2024-09-18 11:39:49 -04:00
refactor: Removes the CSS files from the Paired T-Test plugin (#19563)
* refactor: Removes the CSS files from the Paired T Test plugin * Adjusts some colors
This commit is contained in:
parent
38fbca10e3
commit
f91f83d011
@ -2,31 +2,25 @@
|
|||||||
"name": "@superset-ui/legacy-plugin-chart-paired-t-test",
|
"name": "@superset-ui/legacy-plugin-chart-paired-t-test",
|
||||||
"version": "0.18.25",
|
"version": "0.18.25",
|
||||||
"description": "Superset Legacy Chart - Paired T Test",
|
"description": "Superset Legacy Chart - Paired T Test",
|
||||||
"sideEffects": [
|
"keywords": [
|
||||||
"*.css"
|
"superset"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://github.com/apache-superset/superset-ui#readme",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/apache-superset/superset-ui/issues"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/apache-superset/superset-ui.git"
|
||||||
|
},
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"author": "Superset",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "esm/index.js",
|
"module": "esm/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"esm",
|
"esm",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/apache-superset/superset-ui.git"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"superset"
|
|
||||||
],
|
|
||||||
"author": "Superset",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/apache-superset/superset-ui/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/apache-superset/superset-ui#readme",
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"distributions": "^1.0.0",
|
"distributions": "^1.0.0",
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
@ -36,5 +30,8 @@
|
|||||||
"@superset-ui/chart-controls": "*",
|
"@superset-ui/chart-controls": "*",
|
||||||
"@superset-ui/core": "*",
|
"@superset-ui/core": "*",
|
||||||
"react": "^15 || ^16"
|
"react": "^15 || ^16"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,86 +0,0 @@
|
|||||||
/**
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.superset-legacy-chart-paired_ttest .scrollbar-container {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paired-ttest-table .scrollbar-content {
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paired-ttest-table table {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.paired-ttest-table h1 {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr,
|
|
||||||
.reactable-header-sortable {
|
|
||||||
-webkit-transition: ease-in-out 0.1s;
|
|
||||||
transition: ease-in-out 0.1s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr:hover {
|
|
||||||
background-color: #e0e0e0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr .false {
|
|
||||||
color: #f44336;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr .true {
|
|
||||||
color: #4caf50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr .control {
|
|
||||||
color: #2196f3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data tr .invalid {
|
|
||||||
color: #ff9800;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-data .control td {
|
|
||||||
background-color: #eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-header-sortable:hover,
|
|
||||||
.reactable-header-sortable:focus,
|
|
||||||
.reactable-header-sort-asc,
|
|
||||||
.reactable-header-sort-desc {
|
|
||||||
background-color: #e0e0e0;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-header-sort-asc:after {
|
|
||||||
content: '\25bc';
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reactable-header-sort-desc:after {
|
|
||||||
content: '\25b2';
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
@ -19,8 +19,8 @@
|
|||||||
/* eslint-disable react/no-array-index-key */
|
/* eslint-disable react/no-array-index-key */
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { styled } from '@superset-ui/core';
|
||||||
import TTestTable, { dataPropType } from './TTestTable';
|
import TTestTable, { dataPropType } from './TTestTable';
|
||||||
import './PairedTTest.css';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
alpha: PropTypes.number,
|
alpha: PropTypes.number,
|
||||||
@ -39,29 +39,103 @@ const defaultProps = {
|
|||||||
pValPrec: 6,
|
pValPrec: 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const StyledDiv = styled.div`
|
||||||
|
${({ theme }) => `
|
||||||
|
.superset-legacy-chart-paired_ttest .scrollbar-container {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paired-ttest-table .scrollbar-content {
|
||||||
|
padding-left: ${theme.gridUnit}px;
|
||||||
|
padding-right: ${theme.gridUnit}px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paired-ttest-table table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paired-ttest-table h1 {
|
||||||
|
margin-left: ${theme.gridUnit}px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr,
|
||||||
|
.reactable-header-sortable {
|
||||||
|
-webkit-transition: ease-in-out 0.1s;
|
||||||
|
transition: ease-in-out 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr:hover {
|
||||||
|
background-color: ${theme.colors.grayscale.light3};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr .false {
|
||||||
|
color: ${theme.colors.error.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr .true {
|
||||||
|
color: ${theme.colors.success.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr .control {
|
||||||
|
color: ${theme.colors.primary.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data tr .invalid {
|
||||||
|
color: ${theme.colors.warning.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-data .control td {
|
||||||
|
background-color: ${theme.colors.grayscale.light3};
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-header-sortable:hover,
|
||||||
|
.reactable-header-sortable:focus,
|
||||||
|
.reactable-header-sort-asc,
|
||||||
|
.reactable-header-sort-desc {
|
||||||
|
background-color: ${theme.colors.grayscale.light3};
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-header-sort-asc:after {
|
||||||
|
content: '\\25bc';
|
||||||
|
position: absolute;
|
||||||
|
right: ${theme.gridUnit * 3}px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reactable-header-sort-desc:after {
|
||||||
|
content: '\\25b2';
|
||||||
|
position: absolute;
|
||||||
|
right: ${theme.gridUnit * 3}px;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
|
||||||
class PairedTTest extends React.PureComponent {
|
class PairedTTest extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
const { className, metrics, groups, data, alpha, pValPrec, liftValPrec } =
|
const { className, metrics, groups, data, alpha, pValPrec, liftValPrec } =
|
||||||
this.props;
|
this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`superset-legacy-chart-paired-t-test ${className}`}>
|
<StyledDiv>
|
||||||
<div className="paired-ttest-table">
|
<div className={`superset-legacy-chart-paired-t-test ${className}`}>
|
||||||
<div className="scrollbar-content">
|
<div className="paired-ttest-table">
|
||||||
{metrics.map((metric, i) => (
|
<div className="scrollbar-content">
|
||||||
<TTestTable
|
{metrics.map((metric, i) => (
|
||||||
key={i}
|
<TTestTable
|
||||||
metric={metric}
|
key={i}
|
||||||
groups={groups}
|
metric={metric}
|
||||||
data={data[metric]}
|
groups={groups}
|
||||||
alpha={alpha}
|
data={data[metric]}
|
||||||
pValPrec={Math.min(pValPrec, 32)}
|
alpha={alpha}
|
||||||
liftValPrec={Math.min(liftValPrec, 32)}
|
pValPrec={Math.min(pValPrec, 32)}
|
||||||
/>
|
liftValPrec={Math.min(liftValPrec, 32)}
|
||||||
))}
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</StyledDiv>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user