Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize span detail components #64

Merged
merged 25 commits into from
Aug 25, 2017
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fe35bbd
Update prettier and wrap at 110 instead of 80
tiffon Aug 3, 2017
acbfdee
WIP commit for refactoring trace detail view
tiffon Aug 11, 2017
4fa5c8a
WIP commit for refactoring trace detail view
tiffon Aug 14, 2017
93a6fb7
WIP refactor trace detail, split out css, start fixing tests
tiffon Aug 17, 2017
b8945ab
WIP refactor trace detail, tests working again
tiffon Aug 20, 2017
401b083
WIP refactor trace, yarn upgrade
tiffon Aug 20, 2017
c34bbd3
WIP refactor trace, test maintenance
tiffon Aug 20, 2017
c041353
remove unused import
tiffon Aug 20, 2017
9f54454
add license to css files
tiffon Aug 20, 2017
c657cf1
Revert sub-page scrolling for trace detail
tiffon Aug 20, 2017
2226744
Support URL prefix via homepage in package.json
tiffon Aug 20, 2017
f555e8b
Prevent collision of logs in log entries table
tiffon Aug 20, 2017
bef7f5b
Add comments to new utils
tiffon Aug 21, 2017
fa6f016
Fix #59 - "Span Name" to "Service & Operation"
tiffon Aug 21, 2017
3797f5b
Fix unreleased regression - ellipsis on span name
tiffon Aug 21, 2017
0fd43f5
Address PR comment on search results scatter plot
tiffon Aug 21, 2017
542c1ba
Misc cleanup from PR comment
tiffon Aug 21, 2017
42736e0
PR comment - Remove ms and use nano seconds
tiffon Aug 21, 2017
d16097b
PR comment - Adjust export, relates to recompose
tiffon Aug 21, 2017
83b28d5
Reorganize span detail components
tiffon Aug 22, 2017
bdd6d7e
PR comment - Comment getTraceSpanIdsAsTree()
tiffon Aug 22, 2017
7204684
PR comment - Add "SpanID:" label
tiffon Aug 22, 2017
9bdf8b6
Merge branch 'refactor-trace-detail-selectors' into span-detail-reorg
tiffon Aug 22, 2017
0113985
Merge branch 'master' into span-detail-reorg
tiffon Aug 24, 2017
5c7f896
PR comment - Flow typing for props
tiffon Aug 24, 2017
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
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/* jsx */
"jsx-a11y/no-static-element-interactions": 1,
"jsx-a11y/href-no-hash": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/interactive-supports-focus": 0,

/* react */
"react/jsx-filename-extension": 0,
Expand Down
3 changes: 3 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[ignore]
# node_module packages that have a .flowconfig in conflict with this file
.*/node_modules/fbjs/.*
.*/node_modules/uber-licence/.*
.*/node_modules/redux-form/.*
.*/node_modules/react-motion/.*

[include]

Expand Down
100 changes: 50 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,67 @@
"main": "src/index.js",
"license": "MIT",
"proxy": "http://localhost:16686",
"homepage": null,
"devDependencies": {
"babel-eslint": "^7.1.1",
"enzyme": "^2.4.1",
"eslint": "^3.16.1",
"eslint-config-airbnb": "^14.1.0",
"eslint-config-prettier": "^1.5.0",
"eslint-config-react-app": "^0.6.2",
"eslint-plugin-flowtype": "^2.21.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "7.1.0",
"husky": "^0.13.3",
"lint-staged": "^3.4.0",
"babel-eslint": "^7.2.3",
"enzyme": "^2.9.1",
"eslint": "^4.5.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.3.0",
"eslint-config-react-app": "^2.0.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.2.1",
"husky": "^0.14.3",
"lint-staged": "^4.0.3",
"prettier": "^1.5.3",
"react-scripts": "^0.9.5",
"sets-equal": "^1.0.0",
"sinon": "^1.17.5",
"react-scripts": "^1.0.11",
"react-test-renderer": "^15.6.1",
"sinon": "^3.2.1",
"uber-licence": "^3.1.1"
},
"dependencies": {
"basscss": "^8.0.3",
"chance": "^1.0.4",
"cytoscape": "^2.7.13",
"cytoscape-dagre": "^1.3.0",
"d3-scale": "^1.0.4",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"cytoscape": "^3.2.1",
"cytoscape-dagre": "^2.0.0",
"d3-scale": "^1.0.6",
"dagre": "^0.7.4",
"flow-bin": "^0.36.0",
"fuzzy": "^0.1.1",
"global": "^4.3.0",
"flow-bin": "^0.53.1",
"fuzzy": "^0.1.3",
"global": "^4.3.2",
"history": "^4.6.3",
"is-promise": "^2.1.0",
"isomorphic-fetch": "^2.2.1",
"json-markup": "^1.0.0",
"lodash": "^4.17.2",
"moment": "^2.14.1",
"json-markup": "^1.1.0",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"prop-types": "^15.5.10",
"query-string": "^4.2.3",
"react": "^15.5.0",
"react-addons-perf": "^15.4.1",
"react-addons-shallow-compare": "^15.3.2",
"react-addons-test-utils": "^15.3.1",
"query-string": "^5.0.0",
"react": "^15.6.1",
"react-addons-perf": "^15.4.2",
"react-dimensions": "^1.3.0",
"react-dom": "^15.5.0",
"react-ga": "^2.1.2",
"react-helmet": "^3.1.0",
"react-metrics": "^2.2.3",
"react-redux": "^4.4.5",
"react-router": "^2.7.0",
"react-router-redux": "^4.0.5",
"react-sticky": "^5.0.5",
"react-vis": "^0.6.4",
"react-vis-force": "^0.1.3",
"recompose": "^0.20.2",
"redux": "^3.5.2",
"redux-actions": "^0.11.0",
"redux-async-middleware": "0.0.0",
"redux-form": "6.3.2",
"redux-promise-middleware": "^4.0.0",
"reselect": "^2.5.3",
"semantic-ui-css": "^2.2.4",
"semantic-ui-react": "^0.58.1",
"store": "^1.3.20"
"react-dom": "^15.6.1",
"react-ga": "^2.2.0",
"react-helmet": "^5.1.3",
"react-metrics": "^2.3.2",
"react-redux": "^5.0.6",
"react-router-dom": "^4.1.2",
"react-router-redux": "5.0.0-alpha.6",
"react-vis": "^1.7.2",
"react-vis-force": "^0.3.1",
"recompose": "^0.25.0",
"redux": "^3.7.2",
"redux-actions": "^2.2.1",
"redux-async-middleware": "^0.0.0",
"redux-form": "^7.0.3",
"redux-promise-middleware": "^4.3.0",
"reselect": "^3.0.1",
"semantic-ui-css": "^2.2.12",
"semantic-ui-react": "^0.71.4",
"store": "^2.0.12"
},
"scripts": {
"start": "react-scripts start",
Expand Down
5 changes: 3 additions & 2 deletions src/api/jaeger.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import fetch from 'isomorphic-fetch';
import moment from 'moment';
import queryString from 'query-string';

import prefixUrl from '../utils/prefix-url';

function getJSON(url, query) {
return fetch(`${url}${query ? `?${queryString.stringify(query)}` : ''}`, {
credentials: 'include',
Expand All @@ -42,12 +44,11 @@ function getJSON(url, query) {
}
);
}

return response.json();
});
}

export const DEFAULT_API_ROOT = '/api/';
export const DEFAULT_API_ROOT = prefixUrl('/api/');
export const DEFAULT_DEPENDENCY_LOOKBACK = moment.duration(1, 'weeks').asMilliseconds();

const JaegerAPI = {
Expand Down
14 changes: 6 additions & 8 deletions src/api/jaeger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ import JaegerAPI from './jaeger';

const generatedTraces = traceGenerator.traces({ traces: 5 });
jest.mock('isomorphic-fetch', () =>
jest.fn(
() =>
new Promise(resolve =>
resolve({
status: 200,
data: () => Promise.resolve({ data: null }),
})
)
jest.fn(() =>
Promise.resolve({
status: 200,
data: () => Promise.resolve({ data: null }),
json: () => Promise.resolve({ data: null }),
})
)
);

Expand Down
59 changes: 43 additions & 16 deletions src/components/App/App.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
/*
Copyright (c) 2017 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#jaeger-ui-root {
height: 100%;
}

.u-no-float {
float: none;
}

.u-cursor-pointer {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the u prefix mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I recommend bringing this in for CSS utils:
http://basscss.com/

cursor: pointer;
}

/* override semantic UI webkit scrollbar styling (keep the other scroll styling) */
body ::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
height: 7px;
}

a {
color: #11939A;
}

a:hover {
color: #00474E;
cursor: pointer;
}
.jaeger-ui--content {
padding-left: 1rem;
padding-right: 1rem;
padding-bottom: 1rem;
}

.ui.menu.jaeger-ui--topnav {
border-radius: 0;
z-index: 1000;
padding: 5px;
}

.clearfix:after {
content: " ";
Expand Down Expand Up @@ -53,12 +84,8 @@ a:hover {
overflow-x: scroll;
}

.overflow-x::-webkit-scrollbar {
display: none;
}

.ui.compact.table td {
padding: 0.1em 0.5em;
padding: 0.2em 0.5em;
}

.ui.table td.light-grey {
Expand Down
8 changes: 5 additions & 3 deletions src/components/App/NotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

import PropTypes from 'prop-types';
import React from 'react';
import { Link } from 'react-router';
import { Link } from 'react-router-dom';

import prefixUrl from '../../utils/prefix-url';

export default function NotFound({ error }) {
return (
Expand All @@ -37,11 +39,11 @@ export default function NotFound({ error }) {
{error &&
<div className="ui red message">
<p>
{error.toString()}
{String(error)}
</p>
</div>}
<div className="ui center aligned basic segment">
<Link to="/">
<Link to={prefixUrl('/')}>
{'Back home'}
</Link>
</div>
Expand Down
30 changes: 30 additions & 0 deletions src/components/App/Page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright (c) 2017 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

.jaeger-ui-page {
height: 100%;
}

.jaeger-ui--content {
height: 100%;
padding-top: 50px;
}
21 changes: 9 additions & 12 deletions src/components/App/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,23 @@
import PropTypes from 'prop-types';
import React from 'react';
import Helmet from 'react-helmet';
import { Sticky, StickyContainer } from 'react-sticky';

import TopNav from './TopNav';

import './Page.css';

export default function JaegerUIPage({ children }) {
return (
<section id="jaeger-ui">
<StickyContainer>
<Helmet title="Jaeger UI" />
<Sticky topOffset={0} stickyStyle={{ zIndex: 1000 }}>
<TopNav />
</Sticky>
<div className="jaeger-ui--content">
{children}
</div>
</StickyContainer>
<section className="jaeger-ui-page" id="jaeger-ui">
<Helmet title="Jaeger UI" />
<TopNav />
<div className="jaeger-ui--content">
{children}
</div>
</section>
);
}

JaegerUIPage.propTypes = {
children: PropTypes.any,
children: PropTypes.node,
};
29 changes: 29 additions & 0 deletions src/components/App/TopNav.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright (c) 2017 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

.ui.menu.jaeger-ui--topnav {
border-radius: 0;
padding: 5px;
position: fixed;
width: 100%;
z-index: 1000;
}
Loading