Skip to content

Commit 27ab629

Browse files
zeeklopdanotorrey
andauthored
Nit/associated assets UI improvement (#22041)
* nit: Improve assoc asset ui * Increase visibility of Geo lat/long fields * nit: Fixed MarkdownEditor width and event details styling --------- Co-authored-by: Dan Torrey <[email protected]>
1 parent 749c98d commit 27ab629

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

graylog2-server/src/main/java/org/graylog/plugins/map/geoip/GeoLocationInformation.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
@AutoValue
2929
@JsonDeserialize(builder = GeoLocationInformation.Builder.class)
3030
public abstract class GeoLocationInformation {
31-
private static final String FIELD_LATITUDE = "latitude";
32-
private static final String FIELD_LONGITUDE = "longitude";
31+
public static final String FIELD_LATITUDE = "latitude";
32+
public static final String FIELD_LONGITUDE = "longitude";
3333
private static final String FIELD_COUNTRY_ISO_CODE = "country_iso_code";
3434
private static final String FIELD_COUNTRY_NAME = "country_name";
3535
private static final String FIELD_CITY_NAME = "city_name";

graylog2-web-interface/src/components/common/MarkdownEditor/Preview.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const Container = styled.div<{ $height?: number; $noBackground?: boolean; $noBor
3737
3838
height: ${({ $height }) => ($height ? `${$height}px` : 'auto')};
3939
min-height: 100px;
40+
width: 100%;
4041
`;
4142

4243
const ExpandIcon = styled(Icon)`

graylog2-web-interface/src/components/events/events/EventDetailsTable.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ const EventDetailsTable = <E extends EntityBase = Event>({
5050

5151
return (
5252
<tr key={attribute.id}>
53-
<TD>
54-
<b>{attribute.title}</b>
55-
</TD>
53+
{attribute.title && <TD><b>{attribute.title}</b></TD>}
5654
<td>{renderCell ? renderCell(value, event, attribute, meta) : value}</td>
5755
</tr>
5856
);

graylog2-web-interface/src/views/components/messagelist/FormatAssetList.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ const FormatAssetList = ({ associated_assets, fieldType }: { associated_assets:
3838
() =>
3939
pluggableAssetListComponent.map(({ component: PluggableAssetListItem }) => (
4040
<PluggableAssetListItem
41-
identifiers={associated_assets}
41+
assetIds={associated_assets}
42+
direction="col"
4243
addToQuery={(id) => handleAddToQuery(dispatch, queryId, id, fieldType)}
4344
/>
4445
)),
@@ -53,7 +54,7 @@ const FormatAssetList = ({ associated_assets, fieldType }: { associated_assets:
5354
<div>
5455
<dt>Associated Assets</dt>
5556
{assetsList.map((assetElement) => (
56-
<div key={assetElement.props.identifiers[0]}>{assetElement}</div>
57+
<div key={assetElement.props.assetIds[0]}>{assetElement}</div>
5758
))}
5859
</div>
5960
);

graylog2-web-interface/src/views/types.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ type SearchActionModalProps = React.PropsWithRef<{
310310
};
311311

312312
type AssetInformationComponentProps = {
313-
identifiers: unknown;
314-
addToQuery: (id: string) => void;
313+
assetIds: unknown;
314+
direction?: 'col' | 'row';
315+
addToQuery?: (id: string) => void;
315316
};
316317

317318
type SearchAction = {

0 commit comments

Comments
 (0)