Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90510aa33b | ||
|
|
96a70f5d41 | ||
|
|
d4a13edcf0 | ||
|
|
51fad91a22 | ||
|
|
36abcda1e1 | ||
|
|
dd5f464f73 | ||
|
|
f9ada41272 |
6 changed files with 27 additions and 12 deletions
2
.github/workflows/patch-build.yaml
vendored
2
.github/workflows/patch-build.yaml
vendored
|
|
@ -214,7 +214,7 @@ jobs:
|
||||||
|
|
||||||
# Build FOSS and EE versions
|
# Build FOSS and EE versions
|
||||||
build_service "$service" "$version" "$foss_build_args"
|
build_service "$service" "$version" "$foss_build_args"
|
||||||
build_service "$service" "$version" "$ee_build_args"
|
build_service "$service" "${version}-ee" "$ee_build_args"
|
||||||
|
|
||||||
# Build managed version for specific services
|
# Build managed version for specific services
|
||||||
if [[ "$service" != "chalice" && "$service" != "frontend" ]]; then
|
if [[ "$service" != "chalice" && "$service" != "frontend" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ function DashboardView(props: Props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
dashboardStore.resetPeriod();
|
||||||
if (queryParams.has('modal')) {
|
if (queryParams.has('modal')) {
|
||||||
onAddWidgets();
|
onAddWidgets();
|
||||||
trimQuery();
|
trimQuery();
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,6 @@ const ListView: React.FC<Props> = ({
|
||||||
if (disableSelection) {
|
if (disableSelection) {
|
||||||
const path = withSiteId(`/metrics/${metric.metricId}`, siteId);
|
const path = withSiteId(`/metrics/${metric.metricId}`, siteId);
|
||||||
history.push(path);
|
history.push(path);
|
||||||
} else {
|
|
||||||
toggleSelection?.(metric.metricId);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ function DropdownAudioPlayer({
|
||||||
return {
|
return {
|
||||||
url: data.url,
|
url: data.url,
|
||||||
timestamp: data.timestamp,
|
timestamp: data.timestamp,
|
||||||
start: startTs,
|
start: Math.max(0, startTs),
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
[audioEvents.length, sessionStart],
|
[audioEvents.length, sessionStart],
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
import { makeAutoObservable, runInAction, reaction } from 'mobx';
|
import { makeAutoObservable, runInAction, reaction } from 'mobx';
|
||||||
import { dashboardService, metricService } from 'App/services';
|
import { dashboardService, metricService } from 'App/services';
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import Period, { LAST_24_HOURS, LAST_7_DAYS } from 'Types/app/period';
|
import Period, { LAST_24_HOURS } from 'Types/app/period';
|
||||||
import { getRE } from 'App/utils';
|
import { getRE } from 'App/utils';
|
||||||
import Filter from './types/filter';
|
import Filter from './types/filter';
|
||||||
import Widget from './types/widget';
|
import Widget from './types/widget';
|
||||||
import Dashboard from './types/dashboard';
|
import Dashboard from './types/dashboard';
|
||||||
import { calculateGranularities } from '@/components/Dashboard/components/WidgetDateRange/RangeGranularity';
|
import { calculateGranularities } from '@/components/Dashboard/components/WidgetDateRange/RangeGranularity';
|
||||||
|
import { CUSTOM_RANGE } from '@/dateRange';
|
||||||
|
|
||||||
interface DashboardFilter {
|
interface DashboardFilter {
|
||||||
query?: string;
|
query?: string;
|
||||||
|
|
@ -90,16 +91,20 @@ export default class DashboardStore {
|
||||||
() => this.period,
|
() => this.period,
|
||||||
(period) => {
|
(period) => {
|
||||||
this.createDensity(period.getDuration());
|
this.createDensity(period.getDuration());
|
||||||
}
|
},
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetDensity = () => {
|
||||||
|
this.createDensity(this.period.getDuration());
|
||||||
|
};
|
||||||
|
|
||||||
createDensity = (duration: number) => {
|
createDensity = (duration: number) => {
|
||||||
const densityOpts = calculateGranularities(duration);
|
const densityOpts = calculateGranularities(duration);
|
||||||
const defaultOption = densityOpts[densityOpts.length - 2];
|
const defaultOption = densityOpts[densityOpts.length - 2];
|
||||||
|
|
||||||
this.setDensity(defaultOption.key)
|
this.setDensity(defaultOption.key);
|
||||||
}
|
};
|
||||||
|
|
||||||
setDensity = (density: number) => {
|
setDensity = (density: number) => {
|
||||||
this.selectedDensity = density;
|
this.selectedDensity = density;
|
||||||
|
|
@ -462,7 +467,7 @@ export default class DashboardStore {
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
const response = await dashboardService.addWidget(dashboard, metricIds);
|
await dashboardService.addWidget(dashboard, metricIds);
|
||||||
toast.success('Card added to dashboard.');
|
toast.success('Card added to dashboard.');
|
||||||
} catch {
|
} catch {
|
||||||
toast.error('Card could not be added.');
|
toast.error('Card could not be added.');
|
||||||
|
|
@ -472,6 +477,17 @@ export default class DashboardStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetPeriod = () => {
|
||||||
|
if (this.period) {
|
||||||
|
const range = this.period.rangeName;
|
||||||
|
if (range !== CUSTOM_RANGE) {
|
||||||
|
this.period = Period({ rangeName: this.period.rangeName });
|
||||||
|
} else {
|
||||||
|
this.period = Period({ rangeName: LAST_24_HOURS });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
setPeriod(period: any) {
|
setPeriod(period: any) {
|
||||||
this.period = Period({
|
this.period = Period({
|
||||||
start: period.start,
|
start: period.start,
|
||||||
|
|
@ -545,7 +561,7 @@ export default class DashboardStore {
|
||||||
const data = await metricService.getMetricChartData(
|
const data = await metricService.getMetricChartData(
|
||||||
metric,
|
metric,
|
||||||
params,
|
params,
|
||||||
isSaved
|
isSaved,
|
||||||
);
|
);
|
||||||
resolve(metric.setData(data, period, isComparison, density));
|
resolve(metric.setData(data, period, isComparison, density));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,4 @@ version: 0.1.10
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
AppVersion: "v1.22.39"
|
AppVersion: "v1.22.42"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue