From 1ec014a4bd08f29ba1aef90f50f2dc3740d20c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Sat, 8 Sep 2018 16:53:56 +0200 Subject: [PATCH] [APM] Minor cleanup (#22827) # Conflicts: # x-pack/plugins/apm/public/components/app/TransactionOverview/view.js --- x-pack/plugins/apm/common/constants.js | 2 + .../__snapshots__/DetailView.test.js.snap | 312 +++++++++--------- .../app/ErrorGroupDetails/DetailView/index.js | 24 +- .../__test__/__snapshots__/List.test.js.snap | 8 +- .../Watcher/WatcherFlyOut.js | 12 +- .../StickyTransactionProperties.js | 57 ++++ .../TransactionDetails/Transaction/view.js | 34 +- .../components/app/TransactionDetails/view.js | 4 +- .../DynamicBaseline/Flyout.js | 8 +- .../TransactionOverview.test.js.snap | 2 +- .../app/TransactionOverview/index.js | 2 +- .../app/TransactionOverview/view.js | 8 +- .../components/shared/ContextProperties.js | 111 ------- .../StickyProperties/StickyProperties.test.js | 52 +++ .../StickyProperties.test.js.snap | 168 ++++++++++ .../shared/StickyProperties/index.js | 116 +++++++ .../public/services/__test__/callApi.test.js | 70 ++-- .../apm/public/services/rest/callApi.js | 14 +- ...sCharts.js => transactionDetailsCharts.js} | 8 +- ...Charts.js => transactionOverviewCharts.js} | 8 +- .../plugins/apm/public/utils/testHelpers.js | 4 +- 21 files changed, 649 insertions(+), 375 deletions(-) create mode 100644 x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/StickyTransactionProperties.js delete mode 100644 x-pack/plugins/apm/public/components/shared/ContextProperties.js create mode 100644 x-pack/plugins/apm/public/components/shared/StickyProperties/StickyProperties.test.js create mode 100644 x-pack/plugins/apm/public/components/shared/StickyProperties/__snapshots__/StickyProperties.test.js.snap create mode 100644 x-pack/plugins/apm/public/components/shared/StickyProperties/index.js rename x-pack/plugins/apm/public/store/reactReduxRequest/{detailsCharts.js => transactionDetailsCharts.js} (86%) rename x-pack/plugins/apm/public/store/reactReduxRequest/{overviewCharts.js => transactionOverviewCharts.js} (86%) diff --git a/x-pack/plugins/apm/common/constants.js b/x-pack/plugins/apm/common/constants.js index 7bb25a4a2813a..e0627338bbc2f 100644 --- a/x-pack/plugins/apm/common/constants.js +++ b/x-pack/plugins/apm/common/constants.js @@ -31,4 +31,6 @@ export const ERROR_LOG_MESSAGE = 'error.log.message'; export const ERROR_EXC_MESSAGE = 'error.exception.message'; export const ERROR_EXC_HANDLED = 'error.exception.handled'; +export const REQUEST_URL_FULL = 'context.request.url.full'; + export const USER_ID = 'context.user.id'; diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap index 1c47d1665a5da..8b76e15a9da9f 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap @@ -24,12 +24,6 @@ exports[`DetailView should render with data 1`] = ` margin-bottom: 16px; } -.c8 { - width: 33%; - margin-bottom: 16px; - width: 66%; -} - .c5 { margin-bottom: 8px; font-size: 12px; @@ -40,22 +34,22 @@ exports[`DetailView should render with data 1`] = ` cursor: help; } +.c7 { + color: #999999; +} + .c6 { display: inline-block; line-height: 16px; } -.c7 { - color: #999999; -} - -.c9 { +.c8 { display: inline-block; + line-height: 16px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - line-height: 16px; } .c2 { @@ -64,12 +58,12 @@ exports[`DetailView should render with data 1`] = ` margin: 0; } -.c14 { +.c13 { margin: 24px 0; font-size: 14px; } -.c11 { +.c10 { display: inline-block; font-size: 16px; padding: 16px 20px; @@ -82,7 +76,7 @@ exports[`DetailView should render with data 1`] = ` border-bottom: 2px solid #006E8A; } -.c12 { +.c11 { display: inline-block; font-size: 16px; padding: 16px 20px; @@ -94,12 +88,12 @@ exports[`DetailView should render with data 1`] = ` user-select: none; } -.c19 { +.c18 { position: relative; border-radius: 0 0 5px 5px; } -.c20 { +.c19 { position: absolute; width: 100%; height: 18px; @@ -108,7 +102,7 @@ exports[`DetailView should render with data 1`] = ` background-color: #FCF2E6; } -.c21 { +.c20 { position: absolute; top: 0; left: 0; @@ -116,7 +110,7 @@ exports[`DetailView should render with data 1`] = ` background: #f5f5f5; } -.c22 { +.c21 { position: relative; min-width: 42px; padding-left: 8px; @@ -127,11 +121,11 @@ exports[`DetailView should render with data 1`] = ` border-right: 1px solid #d9d9d9; } -.c22:last-of-type { +.c21:last-of-type { border-radius: 0 0 0 5px; } -.c23 { +.c22 { position: relative; min-width: 42px; padding-left: 8px; @@ -143,22 +137,22 @@ exports[`DetailView should render with data 1`] = ` background-color: #FCF2E6; } -.c23:last-of-type { +.c22:last-of-type { border-radius: 0 0 0 5px; } -.c24 { +.c23 { overflow: auto; margin: 0 0 0 42px; padding: 0; background-color: #ffffff; } -.c24:last-of-type { +.c23:last-of-type { border-radius: 0 0 5px 0; } -.c25 { +.c24 { margin: 0; color: inherit; background: inherit; @@ -169,7 +163,7 @@ exports[`DetailView should render with data 1`] = ` line-height: 18px; } -.c26 { +.c25 { position: relative; padding: 0; margin: 0; @@ -177,18 +171,18 @@ exports[`DetailView should render with data 1`] = ` z-index: 2; } -.c16 { +.c15 { color: #999999; padding: 8px; border-bottom: 1px solid #d9d9d9; border-radius: 5px 5px 0 0; } -.c18 { +.c17 { font-weight: bold; } -.c15 { +.c14 { margin: 0 0 24px 0; position: relative; font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; @@ -197,11 +191,11 @@ exports[`DetailView should render with data 1`] = ` background: #f5f5f5; } -.c15 .c17 { +.c14 .c16 { color: #000000; } -.c27 { +.c26 { margin: 0 0 24px 0; -webkit-user-select: none; -moz-user-select: none; @@ -233,12 +227,12 @@ exports[`DetailView should render with data 1`] = ` margin-bottom: 16px; } -.c10 { +.c9 { padding: 0 24px; border-bottom: 1px solid #d9d9d9; } -.c13 { +.c12 { padding: 24px 24px 0; } @@ -339,19 +333,19 @@ exports[`DetailView should render with data 1`] = `
- 1515508740 + 1337 minutes ago (mocking 1515508740) ( - 1515508740 + 1st of January (mocking 1515508740) )
@@ -435,66 +429,66 @@ exports[`DetailView should render with data 1`] = `
Exception stacktrace
Request
Response
System
Service
Process
User
Tags
@@ -502,146 +496,146 @@ exports[`DetailView should render with data 1`] = `

Stacktraces

server/coffee.js in <anonymous> at line 9
2 .
3 .
4 .
5 .
6 .
7 .
8 .
9 .
10 .
11 .
12 .
13 .
14 .
15 .
16 .
               
                 
 
               
             
               
                 
             
               
                 
             
               
                 
 
               
             
               
                 
             
               
                 
 
               
             
               
                 app.get(
                 
             
               
                   
                 
             
               
                     res.send(
                 
             
               
                   } 
                 
             
               
                     res.send(
                 
             
               
                   }
               
             
               
                 })
               
             
               
                 
 
               
             
               
                 app.get(
                 
       
server.js in <anonymous> at line 27
20 .
21 .
22 .
23 .
24 .
25 .
26 .
27 .
28 .
29 .
30 .
31 .
32 .
33 .
34 .
               
                 app.use(
                 
             
               
                 app.use(express.static(
                 
             
               
                 app.use(
                 
             
               
                   apm.setTag(
                 
             
               
                   apm.setTag(
                 
             
               
                   apm.setTag(
                 
             
               
                   apm.setTag(
                 
             
               
                   next()
               
             
               
                 })
               
             
               
                 
 
               
             
               
                 app.use(
                 
             
               
                 app.use(
                 
             
               
                 app.get(
                 
             
               
                   res.sendFile(path.resolve(__dirname, 
                 
             
               
                 })
               
@@ -1798,7 +1792,7 @@ exports[`DetailView should render with data 1`] = `