Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public ProvenanceEventType getEventType() {
return record.getEventType();
}

@Override
public String getComponentType() {
return record.getComponentType();
}

@Override
public long getTimestamp() {
return record.getEventTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public interface ProvenanceEventLineageNode extends LineageNode {

ProvenanceEventType getEventType();

/**
* @return the type of the component that generated this event
*/
String getComponentType();

long getEventIdentifier();

List<String> getParentUuids();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ProvenanceNodeDTO {
private String clusterNodeIdentifier;
private String type;
private String eventType;
private String componentType;
private Long millis;
private Date timestamp;

Expand Down Expand Up @@ -132,6 +133,19 @@ public void setEventType(String eventType) {
this.eventType = eventType;
}

/**
* @return if this is an event node, this is the type of the component that generated this event
*/
@Schema(description = "If the type is EVENT, this is the type of the component that generated the event."
)
public String getComponentType() {
return componentType;
}

public void setComponentType(String componentType) {
this.componentType = componentType;
}

/**
* @return timestamp of this node
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3544,6 +3544,7 @@ public ProvenanceNodeDTO createProvenanceEventNodeDTO(final ProvenanceEventLinea
dto.setId(node.getIdentifier());
dto.setType("EVENT");
dto.setEventType(node.getEventType().toString());
dto.setComponentType(node.getComponentType());
dto.setTimestamp(new Date(node.getTimestamp()));
dto.setMillis(node.getTimestamp());
dto.setFlowFileUuid(node.getFlowFileUuid());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface LineageNode {
clusterNodeIdentifier: string;
type: string;
eventType: string;
componentType?: string;
millis: number;
timestamp: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,29 +851,38 @@ export class LineageComponent implements OnInit {
})
.each(function (this: any, d: any) {
const label: any = d3.select(this);
const lines: string[] = [];

if (d.eventType === 'CONTENT_MODIFIED' || d.eventType === 'ATTRIBUTES_MODIFIED') {
const lines: string[] = [];
if (d.eventType === 'CONTENT_MODIFIED') {
lines.push('CONTENT');
} else {
lines.push('ATTRIBUTES');
}
lines.push('MODIFIED');

// append each line
lines.forEach((line) => {
label
.append('tspan')
.attr('x', '0')
.attr('dy', '1.2em')
.text(function () {
return line;
});
});
label.attr('transform', 'translate(10,-14)');
} else {
label.text(d.eventType).attr('x', 10).attr('y', 4);
lines.push(d.eventType);
}

// add component type if available
if (d.componentType) {
lines.push(d.componentType);
}

// append each line
lines.forEach((line) => {
label
.append('tspan')
.attr('x', '0')
.attr('dy', '1.2em')
.text(function () {
return line;
});
});

// adjust vertical position based on number of lines
const yOffset = lines.length > 1 ? -7 * lines.length : -4;
label.attr('transform', `translate(10,${yOffset})`);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
{{ bulletinEntity.bulletin.level }}
</div>
</div>
<pre class="whitespace-pre-wrap">{{
bulletinEntity.bulletin.message
}}</pre>
<pre class="whitespace-pre-wrap">{{ bulletinEntity.bulletin.message }}</pre>
</div>
</li>
}
Expand Down
Loading