Skip to content

Commit

Permalink
client: show ecs
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Mar 2, 2022
1 parent cdc5e7f commit 28181fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/src/__locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@
"interval_days": "{{count}} day",
"interval_days_plural": "{{count}} days",
"domain": "Domain",
"ecs": "ECS",
"punycode": "Punycode",
"answer": "Answer",
"filter_added_successfully": "The list has been successfully added",
Expand Down
9 changes: 9 additions & 0 deletions client/src/components/Logs/Cells/DomainCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const DomainCell = ({
time,
tracker,
type,
ecs,
}) => {
const { t } = useTranslation();
const dnssec_enabled = useSelector((state) => state.dnsConfig.dnssec_enabled);
Expand Down Expand Up @@ -56,6 +57,13 @@ const DomainCell = ({
};
}

if (ecs) {
requestDetailsObj = {
...requestDetailsObj,
ecs,
};
}

requestDetailsObj = {
...requestDetailsObj,
type_table_header: type,
Expand Down Expand Up @@ -168,6 +176,7 @@ DomainCell.propTypes = {
time: propTypes.string.isRequired,
type: propTypes.string.isRequired,
tracker: propTypes.object,
ecs: propTypes.string,
};

export default DomainCell;
1 change: 1 addition & 0 deletions client/src/components/Logs/Cells/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ Row.propTypes = {
type: propTypes.string.isRequired,
client_proto: propTypes.string.isRequired,
client_id: propTypes.string,
ecs: propTypes.string,
client_info: propTypes.shape({
name: propTypes.string.isRequired,
whois: propTypes.shape({
Expand Down
2 changes: 2 additions & 0 deletions client/src/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const normalizeLogs = (logs) => logs.map((log) => {
original_answer,
upstream,
cached,
ecs,
} = log;

const { name: domain, unicode_name: unicodeName, type } = question;
Expand Down Expand Up @@ -118,6 +119,7 @@ export const normalizeLogs = (logs) => logs.map((log) => {
elapsedMs,
upstream,
cached,
ecs,
};
});

Expand Down

0 comments on commit 28181fb

Please sign in to comment.