Skip to content

Commit

Permalink
Merge pull request #1 from jaegertracing/master
Browse files Browse the repository at this point in the history
Updating my fork of Jaeger
  • Loading branch information
achesin committed Apr 12, 2021
2 parents abdf99d + ae758fa commit 7931bf7
Show file tree
Hide file tree
Showing 16 changed files with 627 additions and 155 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
4 changes: 1 addition & 3 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ Welcome to the Jaeger project! 👋🎉
- Please be respectful and considerate of others when commenting on issues.
- Please provide as much information as possible so we all understand the issue.
- If you only have a question, you may get a faster response by asking in
- our chat room https://gitter.im/jaegertracing/Lobby, or
- the forum https://groups.google.com/d/forum/jaeger-tracing
(but please don't double post)
- our chat room https://cloud-native.slack.com/archives/CGG7NFUJ3
-->

## Requirement - what kind of business use case are you trying to solve?
Expand Down
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pull_request_rules:
- name: automatic merge for dependabot pull requests
conditions:
- author~=^dependabot(|-preview)\[bot\]$
actions:
merge:
method: squash
commit_message: title+body
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
codeql-analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2.3.4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: javascript

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2.1.5
with:
node-version: '10'
- name: install yarn
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ build
# reports
coverage
.nyc_output
junit.xml

# misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8
10
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Releases

## Next (unreleased)

### Enhancements

### Fixes

## v1.13.0 (February 20, 2021)

### Enhancements

- **General:** Generic web analytics tracking implementation ([@th3M1ke](https://github.com/th3M1ke) in [#681](https://github.com/jaegertracing/jaeger-ui/pull/681))

- **General:** Rearrange nav controls ([@yoave23](https://github.com/yoave23) in [#676](https://github.com/jaegertracing/jaeger-ui/pull/676))

- **General:** Change UI configuration to a Javascript file ([@th3M1ke](https://github.com/th3M1ke) in [#677](https://github.com/jaegertracing/jaeger-ui/pull/677))

- **Trace detail:** Display references unless it's a single CHILD_OF ([@yurishkuro](https://github.com/yurishkuro) in [#672](https://github.com/jaegertracing/jaeger-ui/pull/672))

## v1.12.0 (November 14, 2020)

### Enhancements
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@typescript-eslint/eslint-plugin": "1.12.0",
"@typescript-eslint/parser": "1.12.0",
"@typescript-eslint/typescript-estree": "1.12.0",
"babel-eslint": "10.0.1",
"babel-eslint": "10.1.0",
"eslint": "5.14.1",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "4.0.0",
Expand All @@ -33,7 +33,7 @@
"**/fstream": "1.0.12",
"**/handlebars": "4.1.2",
"**/js-yaml": "3.13.1",
"**/lodash": "4.17.19",
"**/lodash": "4.17.21",
"**/node-gyp/tar": "2.2.2",
"**/prettier": "1.18.2"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "jaeger-ui",
"version": "1.12.0",
"version": "1.13.0",
"main": "src/index.js",
"license": "Apache-2.0",
"homepage": ".",
Expand All @@ -25,6 +25,7 @@
"enzyme-adapter-react-16": "^1.2.0",
"enzyme-to-json": "^3.3.0",
"http-proxy-middleware": "^0.19.1",
"jest-junit": "^10.0.0",
"less": "3.9.0",
"less-loader": "4.1.0",
"less-vars-to-js": "^1.2.1",
Expand Down Expand Up @@ -121,6 +122,10 @@
"!src/utils/test/**/*.js",
"!src/demo/**/*.js",
"!src/types/*"
],
"reporters": [
"default",
"jest-junit"
]
},
"browserslist": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ limitations under the License.
margin-top: 0.5em;
}

.SearchForm--submit {
background-color: #11939a;
color: white;
float: right;
}

.SearchForm--tagsHintInfo {
padding-left: 1.7em;
}
Expand Down
95 changes: 58 additions & 37 deletions packages/jaeger-ui/src/components/SearchTracePage/SearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import * as React from 'react';
import { Form, Input, Button, Popover, Select } from 'antd';
import { Form, Input, Button, Popover, Select, Row, Col } from 'antd';
import _get from 'lodash/get';
import logfmtParser from 'logfmt/lib/logfmt_parser';
import { stringify as logfmtStringify } from 'logfmt/lib/stringify';
Expand Down Expand Up @@ -377,14 +377,21 @@ export class SearchFormImpl extends React.PureComponent {
</div>
}
>
<Field
name="startDate"
type="date"
component={AdaptedInput}
placeholder="Start Date"
props={{ disabled }}
/>
<Field name="startDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<Field
name="startDate"
type="date"
component={AdaptedInput}
placeholder="Start Date"
props={{ disabled }}
/>
</Col>

<Col className="gutter-row" span={12}>
<Field name="startDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
</Col>
</Row>
</FormItem>,

<FormItem
Expand All @@ -406,36 +413,49 @@ export class SearchFormImpl extends React.PureComponent {
</div>
}
>
<Field
name="endDate"
type="date"
component={AdaptedInput}
placeholder="End Date"
props={{ disabled }}
/>
<Field name="endDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<Field
name="endDate"
type="date"
component={AdaptedInput}
placeholder="End Date"
props={{ disabled }}
/>
</Col>

<Col className="gutter-row" span={12}>
<Field name="endDateTime" type="time" component={AdaptedInput} props={{ disabled }} />
</Col>
</Row>
</FormItem>,
]}

<FormItem label="Min Duration">
<Field
name="minDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>

<FormItem label="Max Duration">
<Field
name="maxDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
<Row gutter={16}>
<Col className="gutter-row" span={12}>
<FormItem label="Max Duration">
<Field
name="maxDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
</Col>

<Col className="gutter-row" span={12}>
<FormItem label="Min Duration">
<Field
name="minDuration"
component={ValidatedAdaptedInput}
placeholder={placeholderDurationFields}
props={{ disabled }}
validate={validateDurationFields}
/>
</FormItem>
</Col>
</Row>

<FormItem label="Limit Results">
<Field
Expand All @@ -449,6 +469,7 @@ export class SearchFormImpl extends React.PureComponent {

<Button
htmlType="submit"
className="SearchForm--submit"
disabled={disabled || noSelectedService || invalid}
data-test={markers.SUBMIT_BTN}
>
Expand Down Expand Up @@ -604,7 +625,7 @@ export function mapStateToProps(state) {
};
}

function mapDispatchToProps(dispatch) {
export function mapDispatchToProps(dispatch) {
const { searchTraces } = bindActionCreators(jaegerApiActions, dispatch);
return {
onSubmit: fields => submitForm(fields, searchTraces),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
convTagsLogfmt,
getUnixTimeStampInMSFromForm,
lookbackToTimestamp,
mapDispatchToProps,
mapStateToProps,
optionsWithinMaxLookback,
submitForm,
Expand Down Expand Up @@ -264,6 +265,23 @@ describe('submitForm()', () => {
expect(operation).toBe(undefined);
});

it('expects operation to be value defined in beforeEach', () => {
submitForm(fields, searchTraces);
const { calls } = searchTraces.mock;
expect(calls.length).toBe(1);
const { operation } = calls[0][0];
expect(operation).toBe('op-a');
});

it('expects operation to be value assigned before call is made', () => {
fields.operation = 'test';
submitForm(fields, searchTraces);
const { calls } = searchTraces.mock;
expect(calls.length).toBe(1);
const { operation } = calls[0][0];
expect(operation).toBe('test');
});

describe('`fields.lookback`', () => {
function getCalledDuration(mock) {
const { start, end } = mock.calls[0][0];
Expand Down Expand Up @@ -370,6 +388,22 @@ describe('<SearchForm>', () => {
expect(ops.prop('props').disabled).toBe(false);
});

it('keeps operation disabled when no service selected', () => {
let ops = wrapper.find('[placeholder="Select An Operation"]');
expect(ops.prop('props').disabled).toBe(true);
wrapper = shallow(<SearchForm {...defaultProps} selectedService="" />);
ops = wrapper.find('[placeholder="Select An Operation"]');
expect(ops.prop('props').disabled).toBe(true);
});

it('enables operation when unknown service selected', () => {
let ops = wrapper.find('[placeholder="Select An Operation"]');
expect(ops.prop('props').disabled).toBe(true);
wrapper = shallow(<SearchForm {...defaultProps} selectedService="svcC" />);
ops = wrapper.find('[placeholder="Select An Operation"]');
expect(ops.prop('props').disabled).toBe(false);
});

it('shows custom date inputs when `props.selectedLookback` is "custom"', () => {
function getDateFieldLengths(compWrapper) {
return [
Expand Down Expand Up @@ -439,7 +473,7 @@ describe('mapStateToProps()', () => {
let state;

beforeEach(() => {
state = { router: { location: { serach: '' } } };
state = { router: { location: { search: '' } } };
});

it('does not explode when the query string is empty', () => {
Expand Down Expand Up @@ -542,3 +576,11 @@ describe('mapStateToProps()', () => {
expect(msDiff(dateParams.dateStr, dateParams.dateTimeStr, endDate, endDateTime)).toBeLessThan(60 * 1000);
});
});

describe('mapDispatchToProps()', () => {
it('creates the actions correctly', () => {
expect(mapDispatchToProps(() => {})).toEqual({
onSubmit: expect.any(Function),
});
});
});
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/constants/default-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default deepFreeze(
},
{
label: 'Online Chat',
url: 'https://gitter.im/jaegertracing/Lobby',
url: 'https://cloud-native.slack.com/archives/CGG7NFUJ3',
},
{
label: 'GitHub',
Expand Down
2 changes: 1 addition & 1 deletion packages/plexus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"enzyme": "3.8.0",
"file-loader": "3.0.1",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"html-webpack-plugin": "5.1.0",
"jest": "23.6.0",
"npm-run-all": "4.1.5",
"react": "^16.7.0",
Expand Down
Loading

0 comments on commit 7931bf7

Please sign in to comment.