Skip to content

Commit ad17b96

Browse files
authored
Merge branch 'main' into fix+value+angle
2 parents f7fe917 + 16e2732 commit ad17b96

File tree

93 files changed

+1724
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1724
-588
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,13 @@ jobs:
6666
with:
6767
helm-gcs-repository: ${{ secrets.HELM_GCS_REPOSITORY }}
6868
helm-gcs-credentials: ${{ secrets.HELM_GCS_CREDENTIALS }}
69+
70+
publish-release-notes:
71+
runs-on: ubuntu-20.04
72+
steps:
73+
- uses: actions/[email protected]
74+
with:
75+
fetch-depth: 0
76+
- uses: hypertrace/github-actions/release-notes@main
77+
with:
78+
github-token: ${{ secrets.GITHUB_TOKEN }}

package-lock.json

Lines changed: 108 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
},
6868
"devDependencies": {
6969
"@angular-builders/jest": "^11.0.0",
70-
"@angular-devkit/build-angular": "~0.1100.5",
70+
"@angular-devkit/build-angular": "~0.1100.7",
7171
"@angular/cli": "11.0.6",
7272
"@angular/compiler-cli": "~11.0.2",
7373
"@angular/language-service": "~11.0.5",
@@ -86,15 +86,15 @@
8686
"@types/d3-selection": "^1.4.2",
8787
"@types/d3-shape": "^1.3.1",
8888
"@types/d3-zoom": "^1.7.5",
89-
"@types/jest": "^26.0.19",
89+
"@types/jest": "^26.0.20",
9090
"@types/lodash-es": "^4.17.4",
9191
"@types/node": "^14.14.14",
9292
"@types/uuid": "^8.3.0",
9393
"@types/webpack-env": "^1.14.0",
9494
"codelyzer": "^6.0.1",
95-
"commitizen": "^4.2.1",
95+
"commitizen": "^4.2.3",
9696
"cz-conventional-changelog": "^3.3.0",
97-
"husky": "^4.3.7",
97+
"husky": "^4.3.8",
9898
"jest": "^26.6.3",
9999
"jest-config": "^26.6.3",
100100
"jest-html-reporter": "^3.2.0",
@@ -108,7 +108,7 @@
108108
"tslint": "~6.1.3",
109109
"tslint-config-prettier": "^1.18.0",
110110
"typescript": "~4.0.5",
111-
"typescript-tslint-plugin": "^0.5.5"
111+
"typescript-tslint-plugin": "^1.0.1"
112112
},
113113
"config": {
114114
"commitizen": {
Lines changed: 3 additions & 0 deletions
Loading

projects/assets-library/assets/styles/_font.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ $font-family: 'Work Sans', sans-serif;
100100
@mixin link {
101101
color: $blue-5;
102102
cursor: pointer;
103+
text-decoration-line: none;
103104
}
104105

105106
@mixin link-hover($isSvg: false) {

projects/assets-library/src/icons/icon-library.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const iconsRootPath = 'assets/icons';
4646
{ key: IconType.Eye, url: `${iconsRootPath}/eye.svg` },
4747
{ key: IconType.FileCode, url: `${iconsRootPath}/file-code.svg` },
4848
{ key: IconType.Filter, url: `${iconsRootPath}/filter.svg` },
49+
{ key: IconType.Go, url: `${iconsRootPath}/go.svg` },
4950
{ key: IconType.Helm, url: `${iconsRootPath}/helm.svg` },
5051
{ key: IconType.Hypertrace, url: `${iconsRootPath}/hypertrace.svg` },
5152
{ key: IconType.IpAddress, url: `${iconsRootPath}/ip-address.svg` },

projects/assets-library/src/icons/icon-type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const enum IconType {
4848
FileCode = 'svg:file-code',
4949
Filter = 'svg:filter',
5050
First = 'first_page',
51+
Go = 'svg:go',
5152
Helm = 'svg:helm',
5253
Home = 'home',
5354
Hypertrace = 'svg:hypertrace',

projects/common/src/color/color.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const enum Color {
77
BlueGray4 = '#4b5f77',
88
Gray1 = '#f4f5f5',
99
Gray2 = '#e1e4e5',
10+
Gray4 = '#889499',
1011
Gray5 = '#657277',
1112
Gray7 = '#272c2e',
1213
Gray9 = '#080909',

projects/common/src/time/time-duration.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TimeDuration } from './time-duration';
1+
import { TimeDuration, UnitStringType } from './time-duration';
22
import { TimeUnit } from './time-unit.type';
33

44
describe('Time duration', () => {
@@ -13,6 +13,13 @@ describe('Time duration', () => {
1313
TimeUnit.Minute
1414
)
1515
).toBe('4h3m');
16+
expect(
17+
new TimeDuration(4 * 60 * 60 * 1000 + 3 * 60 * 1000 + 5 * 1000 + 689, TimeUnit.Millisecond).toMultiUnitString(
18+
TimeUnit.Minute,
19+
false,
20+
UnitStringType.Long
21+
)
22+
).toBe('4 hours 3 minutes');
1623
expect(
1724
new TimeDuration(4 * 60 * 60 * 1000 + 5 * 1000 + 689, TimeUnit.Millisecond).toMultiUnitString(TimeUnit.Second)
1825
).toBe('4h5s');

projects/common/src/time/time-duration.ts

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,30 @@ export class TimeDuration {
1616
return this.toMillis() / this.unitInMillis(unit);
1717
}
1818

19-
public toMultiUnitString(smallestUnit: ConvertibleTimeUnit = TimeUnit.Second, displayZero: boolean = true): string {
19+
public toMultiUnitString(
20+
smallestUnit: ConvertibleTimeUnit = TimeUnit.Second,
21+
displayZero: boolean = true,
22+
unitStringType: UnitStringType = UnitStringType.Short
23+
): string {
2024
const mostSignificantPortion = this.getMostSignificantUnitOnly();
2125
const remainingMillis = this.millis - mostSignificantPortion.toMillis();
2226
if (mostSignificantPortion.getAmountForUnit(smallestUnit) < 1) {
23-
return displayZero ? new TimeDuration(0, smallestUnit).toString() : '';
27+
return displayZero ? new TimeDuration(0, smallestUnit).toFormattedString(unitStringType) : '';
2428
}
2529
if (mostSignificantPortion.unit === smallestUnit || remainingMillis === 0) {
26-
return mostSignificantPortion.toString();
30+
return mostSignificantPortion.toFormattedString(unitStringType);
2731
}
2832

29-
return `${mostSignificantPortion.toString()}${new TimeDuration(
30-
remainingMillis,
31-
TimeUnit.Millisecond
32-
).toMultiUnitString(smallestUnit, false)}`;
33+
const joiningStr = unitStringType === UnitStringType.Long ? ' ' : '';
34+
35+
return [
36+
mostSignificantPortion.toFormattedString(unitStringType),
37+
new TimeDuration(remainingMillis, TimeUnit.Millisecond).toMultiUnitString(smallestUnit, false, unitStringType)
38+
].join(joiningStr);
39+
}
40+
41+
private toFormattedString(unitStringType: UnitStringType = UnitStringType.Short): string {
42+
return unitStringType === UnitStringType.Short ? this.toString() : this.toLongString();
3343
}
3444

3545
public getMostSignificantUnitOnly(): TimeDuration {
@@ -141,3 +151,8 @@ type ConvertibleTimeUnit =
141151
| TimeUnit.Minute
142152
| TimeUnit.Second
143153
| TimeUnit.Millisecond;
154+
155+
export enum UnitStringType {
156+
Long = 'long',
157+
Short = 'short'
158+
}

0 commit comments

Comments
 (0)