Skip to content

Hotfix/update task measurement page style #2254

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

Merged
merged 5 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 12 additions & 10 deletions shell/app/charts/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,22 +474,24 @@ export const theme = {
},
},
tooltip: {
backgroundColor: '#ffffff',
borderColor: 'rgba(0, 0, 0, .1)',
borderWidth: 1,
trigger: 'axis',
backgroundColor: 'rgba(48,38,71,0.96)',
borderWidth: 0,
padding: [8, 16],
textStyle: {
color: 'rgba(0, 0, 0, .6)',
color: '#fff',
},
axisPointer: {
lineStyle: {
color: '#cccccc',
width: 1,
type: 'line',
label: {
show: false,
},
crossStyle: {
color: '#cccccc',
width: 1,
lineStyle: {
type: 'dashed',
color: 'rgba(48,38,71,0.40)',
},
},
borderColor: 'rgba(0, 0, 0, .1)',
},
timeline: {
lineStyle: {
Expand Down
3 changes: 0 additions & 3 deletions shell/app/common/components/erda-alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ interface IProps {
type?: AlertProps['type'];
}

// TODO: clear old storage data, remove this after 21-12-10
localStorage.removeItem('erda-bp-list');

const ErdaAlert = ({ type = 'info', message, showOnceKey, className }: IProps) => {
const alertList = JSON.parse(localStorage.getItem('erda-alert-list') || '{}');
const [isHidden, setIsHidden] = React.useState(showOnceKey ? alertList[showOnceKey] : false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ declare namespace CP_CONTAINER {
props: {
className: string;
onClick?: () => void;
leftProportion?: number;
rightProportion?: number;
};
};
}
6 changes: 3 additions & 3 deletions shell/app/config-page/components/container/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ export const RowContainer = (props: CP_CONTAINER.Props) => {

export const LRContainer = (props: CP_CONTAINER.Props) => {
const { left, right, props: configProps, ...rest } = props;
const { contentSetting = '' } = configProps || {};
const { contentSetting = '', leftProportion = 1, rightProportion } = configProps || {};
const leftCls = classnames({
left: true,
'flex-1': contentSetting !== 'start',
[`flex-${leftProportion}`]: contentSetting !== 'start',
});

return (
<Container {...rest} props={{ ...(props.props || {}), direction: 'row' }}>
<div className={leftCls}>{left}</div>
<div className="right">{right}</div>
<div className={`right ${rightProportion ? `flex-${rightProportion}` : ''}`}>{right}</div>
</Container>
);
};
10 changes: 7 additions & 3 deletions shell/app/config-page/components/simple-chart/simple-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ const getOption = (chart: CP_SIMPLE_CHART.IData['chart']) => {
</div>`;
},
textStyle: {
fontSize: 12,
color: '#fff',
},
axisPointer: {
type: 'line',
label: {
show: false,
color: '#fff',
},
lineStyle: {
type: 'dashed',
color: 'rgba(48,38,71,0.40)',
},
},
},
Expand All @@ -63,9 +65,11 @@ const getOption = (chart: CP_SIMPLE_CHART.IData['chart']) => {
type: 'line',
smooth: false,
lineStyle: {
color: newColorMap.warning4,
width: 3,
},
itemStyle: {
color: newColorMap.warning4,
},
showSymbol: false,
areaStyle: {
opacity: 0.5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
background: $color-default-02;

.erda-text-block-info {
width: 120px;
min-width: 100px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ import './text-block-group.scss';

const TextBlockGroup = (props: CP_TEXT_BLOCK_GROUP.Props) => {
const { props: configProps, data } = props;
const firstRowNum = data.data[0]?.length;

return (
<div className={`cp-text-block-group flex flex-col overflow-y-auto p-4 ${getClass(configProps)}`}>
{data.data.map((rows, rowKey: number) => {
const isFirstRow = rowKey === 0;
return (
<div key={rowKey} className={`cp-text-block-group-row flex items-center ${isFirstRow ? '' : 'mt-4'}`}>
<div
key={rowKey}
className={`cp-text-block-group-row flex items-center justify-between ${isFirstRow ? '' : 'mt-4'}`}
>
{rows.map((item, idx: number) => {
const isFirstItem = idx === 0;
return <TextBlockInfo key={`${rowKey}-${idx}`} className={isFirstItem ? '' : 'ml-2'} {...item} />;
})}
{new Array(firstRowNum - rows.length).fill(1).map((idx: number) => (
<div className="erda-text-block-info" key={idx} />
))}
</div>
);
})}
Expand Down
2 changes: 2 additions & 0 deletions shell/app/modules/project/pages/issue/task-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const TaskSummary = () => {
container: {
props: {
className: 'm-4',
leftProportion: 3,
rightProportion: 7,
},
},
simpleChart: {
Expand Down