Skip to content

Commit abfb3a8

Browse files
authored
Update asset types in curated assets list (open-metadata#22976)
* Update asset types in curated assets list * add knowledge page in asset type list
1 parent 582d5eb commit abfb3a8

File tree

5 files changed

+136
-73
lines changed

5 files changed

+136
-73
lines changed

openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/ActivityFeedcardNew.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const ActivityFeedCardNew = ({
245245
{/* Horizontal line connecting popover to end of container */}
246246
<div className="horizontal-line " />
247247

248-
<div className="d-flex flex-col w-full">
248+
<div className="d-flex flex-col w-full min-w-0 overflow-hidden">
249249
<div className="d-flex flex-col align-start">
250250
<div
251251
className={classNames(

openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/KPIWidget/KPILegend/KPILegend.tsx

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* limitations under the License.
1212
*/
1313
import { InfoCircleOutlined, WarningOutlined } from '@ant-design/icons';
14-
import { Col, Progress, Row, Tooltip, Typography } from 'antd';
14+
import { Progress, Tooltip, Typography } from 'antd';
1515
import { toNumber } from 'lodash';
1616
import React from 'react';
1717
import { useTranslation } from 'react-i18next';
@@ -37,7 +37,7 @@ const KPILegend: React.FC<KPILegendProps> = ({
3737

3838
const GoalCompleted = () => {
3939
return (
40-
<div className="goal-completed-container d-flex items-center gap-1">
40+
<div className="goal-completed-container">
4141
<CheckIcon />
4242
<Typography.Text>{t('label.goal-completed')}</Typography.Text>
4343
</div>
@@ -46,7 +46,7 @@ const KPILegend: React.FC<KPILegendProps> = ({
4646

4747
const GoalMissed = () => {
4848
return (
49-
<div className="goal-missed-container d-flex items-center gap-1">
49+
<div className="goal-missed-container">
5050
<WarningOutlined />
5151
<Typography.Text>{t('label.goal-missed')}</Typography.Text>
5252
</div>
@@ -74,59 +74,58 @@ const KPILegend: React.FC<KPILegendProps> = ({
7474

7575
if (isFullSize) {
7676
return (
77-
<div className="kpi-full-legend p-xs m-b-sm" key={key}>
78-
<Row className="items-center" gutter={8}>
79-
<Col span={24}>
80-
<div className="d-flex justify-between">
81-
<Typography.Text
82-
className="kpi-legend-title"
83-
ellipsis={{ tooltip: true }}>
84-
{resultData.displayName}
85-
</Typography.Text>
77+
<div className="kpi-full-legend" key={key}>
78+
<div className="kpi-legend-header">
79+
<Typography.Text
80+
className="kpi-legend-title"
81+
ellipsis={{ tooltip: true }}>
82+
{resultData.displayName}
83+
</Typography.Text>
8684

87-
{daysLeft <= 0 || isTargetMet ? (
88-
<Tooltip
89-
placement="bottom"
90-
title={getKpiResultFeedback(
91-
daysLeft,
92-
Boolean(isTargetMet)
93-
)}
94-
trigger="hover">
95-
<InfoCircleOutlined className="kpi-legend-info-icon" />
96-
</Tooltip>
97-
) : null}
98-
</div>
85+
{daysLeft <= 0 || isTargetMet ? (
86+
<Tooltip
87+
placement="bottom"
88+
title={getKpiResultFeedback(daysLeft, Boolean(isTargetMet))}
89+
trigger="hover">
90+
<InfoCircleOutlined className="kpi-legend-info-icon" />
91+
</Tooltip>
92+
) : null}
93+
</div>
9994

100-
<Progress
101-
percent={Number(currentProgress)}
102-
showInfo={false}
103-
size="small"
104-
strokeColor={color}
105-
strokeWidth={4}
106-
/>
95+
<Progress
96+
percent={Number(currentProgress)}
97+
showInfo={false}
98+
size="small"
99+
strokeColor={color}
100+
strokeWidth={4}
101+
/>
107102

108-
<div className="d-flex justify-between m-t-xxs">
109-
<Typography.Text className="text-xss kpi-legend-value">
110-
{current.toFixed(0)}
111-
{suffix}
112-
</Typography.Text>
113-
{isTargetMet ? (
114-
<GoalCompleted />
115-
) : isTargetMissed ? (
116-
<GoalMissed />
117-
) : (
118-
<Typography.Text className="text-xss font-semibold kpi-legend-days-left">
119-
{daysLeft <= 0 ? 0 : daysLeft}{' '}
120-
{t('label.days-left').toUpperCase()}
121-
</Typography.Text>
122-
)}
123-
<Typography.Text className="text-xss kpi-legend-value">
124-
{target.toFixed(0)}
125-
{suffix}
103+
<div className="kpi-legend-bottom-row">
104+
<div className="kpi-legend-value-section">
105+
<Typography.Text className="text-xss kpi-legend-value">
106+
{current.toFixed(0)}
107+
{suffix}
108+
</Typography.Text>
109+
</div>
110+
<div className="kpi-legend-center-section">
111+
{isTargetMet ? (
112+
<GoalCompleted />
113+
) : isTargetMissed ? (
114+
<GoalMissed />
115+
) : (
116+
<Typography.Text className="text-xss font-semibold kpi-legend-days-left text-center">
117+
{daysLeft <= 0 ? 0 : daysLeft}{' '}
118+
{t('label.days-left').toUpperCase()}
126119
</Typography.Text>
127-
</div>
128-
</Col>
129-
</Row>
120+
)}
121+
</div>
122+
<div className="kpi-legend-value-section">
123+
<Typography.Text className="text-xss kpi-legend-value">
124+
{target.toFixed(0)}
125+
{suffix}
126+
</Typography.Text>
127+
</div>
128+
</div>
130129
</div>
131130
);
132131
}

openmetadata-ui/src/main/resources/ui/src/components/MyData/Widgets/KPIWidget/KPILegend/kpi-legend.less

Lines changed: 81 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
@import (reference) url('../../../../../styles/variables.less');
1515

1616
.kpi-legend {
17-
border: 1px solid @grey-15;
1817
border-radius: @border-rad-sm;
19-
overflow-y: auto;
18+
border: 1px solid @grey-15;
19+
display: flex;
20+
flex-direction: column;
21+
gap: @size-xs;
2022
max-height: 350px;
23+
overflow-y: auto;
2124

2225
.legend-dot {
2326
border-radius: 50%;
@@ -26,19 +29,28 @@
2629
}
2730

2831
.kpi-full-legend {
29-
min-width: 235px;
30-
background-color: @purple-4;
31-
border: 1px solid @grey-16;
32-
border-radius: @border-rad-sm;
3332
background-color: @grey-26;
33+
border-radius: @border-rad-sm;
34+
border: 1px solid @grey-16;
35+
display: flex;
36+
flex-direction: column;
37+
gap: @size-xxs;
38+
margin-bottom: @size-xs;
39+
min-width: 0;
40+
padding: @size-xs;
41+
width: 100%;
3442
}
3543

3644
.kpi-legend-title {
3745
color: @grey-700;
46+
flex: 1;
3847
font-size: @size-sm;
39-
line-height: 1.2;
4048
font-weight: @font-regular;
41-
max-width: 180px;
49+
line-height: 1.2;
50+
min-width: 0;
51+
overflow: hidden;
52+
text-overflow: ellipsis;
53+
white-space: nowrap;
4254
}
4355

4456
.kpi-legend-info-icon {
@@ -60,41 +72,90 @@
6072
}
6173

6274
.goal-completed-container {
63-
padding: @size-xxs @size-xs;
64-
border-radius: @border-rad-xs;
75+
align-items: center;
6576
background-color: @green-9;
77+
border-radius: @border-rad-xs;
78+
display: flex;
79+
flex-shrink: 1;
6680
font-size: 10px;
67-
max-width: 115px;
81+
gap: @size-xxs;
82+
min-width: 0;
83+
padding: @size-xxs @size-xs;
84+
width: fit-content;
6885

6986
.ant-typography {
7087
color: @green-10;
71-
margin-left: @size-xxs;
88+
margin: 0;
89+
min-width: 0;
90+
overflow: hidden;
91+
text-overflow: ellipsis;
92+
white-space: nowrap;
7293
}
7394

7495
svg {
75-
width: @size-sm;
76-
height: @size-sm;
7796
color: @green-10;
97+
flex-shrink: 0;
98+
height: @size-sm;
99+
width: @size-sm;
78100
}
79101
}
80102

81103
.goal-missed-container {
82-
padding: @size-xxs @size-xs;
83-
border-radius: @border-rad-xs;
104+
align-items: center;
84105
background-color: @yellow-10;
106+
border-radius: @border-rad-xs;
85107
color: @yellow-11;
108+
display: flex;
109+
flex-shrink: 1;
86110
font-size: 10px;
87-
max-width: 100px;
111+
gap: @size-xxs;
112+
min-width: 0;
113+
padding: @size-xxs @size-xs;
114+
width: fit-content;
88115

89116
.ant-typography {
90117
color: @yellow-11;
91-
margin-left: @size-xxs;
118+
margin: 0;
119+
min-width: 0;
120+
overflow: hidden;
121+
text-overflow: ellipsis;
122+
white-space: nowrap;
92123
}
93124

94125
svg {
95-
width: @size-sm;
96-
height: @size-sm;
97126
color: @yellow-11;
127+
flex-shrink: 0;
128+
height: @size-sm;
129+
width: @size-sm;
98130
}
99131
}
132+
133+
.kpi-legend-header {
134+
align-items: center;
135+
display: flex;
136+
gap: @size-xs;
137+
justify-content: space-between;
138+
min-width: 0;
139+
}
140+
141+
.kpi-legend-bottom-row {
142+
align-items: center;
143+
display: flex;
144+
gap: @size-xxs;
145+
justify-content: space-between;
146+
min-width: 0;
147+
}
148+
149+
.kpi-legend-center-section {
150+
align-items: center;
151+
display: flex;
152+
flex: 1;
153+
justify-content: center;
154+
min-width: 0;
155+
}
156+
157+
.kpi-legend-value-section {
158+
flex-shrink: 0;
159+
min-width: fit-content;
160+
}
100161
}

openmetadata-ui/src/main/resources/ui/src/constants/AdvancedSearch.constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ export const CURATED_ASSETS_LIST = [
338338
EntityType.DASHBOARD_DATA_MODEL,
339339
EntityType.DATABASE,
340340
EntityType.DATABASE_SCHEMA,
341+
EntityType.DATA_PRODUCT,
341342
EntityType.GLOSSARY_TERM,
343+
EntityType.KNOWLEDGE_PAGE,
342344
EntityType.METRIC,
343345
EntityType.MLMODEL,
344346
EntityType.PIPELINE,

openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,6 +2452,7 @@ export const getEntityNameLabel = (entityName?: string) => {
24522452
apiCollection: t('label.api-collection'),
24532453
apiEndpoint: t('label.api-endpoint'),
24542454
metric: t('label.metric'),
2455+
page: t('label.knowledge-page'),
24552456
};
24562457

24572458
return (

0 commit comments

Comments
 (0)