@oneuptime/common 10.0.35 → 10.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Server/Infrastructure/Postgres/SchemaMigrations/{1773761409952-MigrationName.ts → 1774000000001-MigrationName.ts} +2 -2
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +2 -2
- package/Server/Types/Markdown.ts +11 -3
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +4 -1
- package/Types/Code/CodeType.ts +1 -1
- package/Types/Metrics/MetricQueryConfigData.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +19 -0
- package/Types/Monitor/KubernetesAlertTemplates.ts +703 -0
- package/Types/Monitor/KubernetesMetricCatalog.ts +347 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +86 -0
- package/Types/Monitor/MonitorStep.ts +36 -1
- package/Types/Monitor/MonitorStepKubernetesMonitor.ts +50 -0
- package/Types/Monitor/MonitorType.ts +14 -10
- package/UI/Components/AlertBanner/AlertBanner.tsx +69 -0
- package/UI/Components/ConditionsTable/ConditionsTable.tsx +149 -0
- package/UI/Components/Dictionary/DictionaryOfStingsViewer.tsx +35 -15
- package/UI/Components/ExpandableText/ExpandableText.tsx +42 -0
- package/UI/Components/FilterButtons/FilterButtons.tsx +60 -0
- package/UI/Components/Markdown.tsx/MarkdownEditor.tsx +4 -1
- package/UI/Components/ResourceUsageBar/ResourceUsageBar.tsx +58 -0
- package/UI/Components/StackedProgressBar/StackedProgressBar.tsx +81 -0
- package/UI/Components/StatusBadge/StatusBadge.tsx +44 -0
- package/UI/Components/Tabs/Tabs.tsx +36 -8
- package/UI/Utils/Dropdown.ts +2 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/{1773761409952-MigrationName.js → 1774000000001-MigrationName.js} +3 -3
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/{1773761409952-MigrationName.js.map → 1774000000001-MigrationName.js.map} +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +2 -2
- package/build/dist/Server/Types/Markdown.js +10 -2
- package/build/dist/Server/Types/Markdown.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +2 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Types/Code/CodeType.js +1 -1
- package/build/dist/Types/Code/CodeType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +18 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +594 -0
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -0
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js +311 -0
- package/build/dist/Types/Monitor/KubernetesMetricCatalog.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +78 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +24 -1
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepKubernetesMonitor.js +30 -0
- package/build/dist/Types/Monitor/MonitorStepKubernetesMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +13 -10
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/UI/Components/AlertBanner/AlertBanner.js +42 -0
- package/build/dist/UI/Components/AlertBanner/AlertBanner.js.map +1 -0
- package/build/dist/UI/Components/ConditionsTable/ConditionsTable.js +83 -0
- package/build/dist/UI/Components/ConditionsTable/ConditionsTable.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/DictionaryOfStingsViewer.js +14 -8
- package/build/dist/UI/Components/Dictionary/DictionaryOfStingsViewer.js.map +1 -1
- package/build/dist/UI/Components/ExpandableText/ExpandableText.js +19 -0
- package/build/dist/UI/Components/ExpandableText/ExpandableText.js.map +1 -0
- package/build/dist/UI/Components/FilterButtons/FilterButtons.js +17 -0
- package/build/dist/UI/Components/FilterButtons/FilterButtons.js.map +1 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js +3 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownEditor.js.map +1 -1
- package/build/dist/UI/Components/ResourceUsageBar/ResourceUsageBar.js +23 -0
- package/build/dist/UI/Components/ResourceUsageBar/ResourceUsageBar.js.map +1 -0
- package/build/dist/UI/Components/StackedProgressBar/StackedProgressBar.js +34 -0
- package/build/dist/UI/Components/StackedProgressBar/StackedProgressBar.js.map +1 -0
- package/build/dist/UI/Components/StatusBadge/StatusBadge.js +22 -0
- package/build/dist/UI/Components/StatusBadge/StatusBadge.js.map +1 -0
- package/build/dist/UI/Components/Tabs/Tabs.js +32 -9
- package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
- package/build/dist/UI/Utils/Dropdown.js +2 -1
- package/build/dist/UI/Utils/Dropdown.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
2
|
|
|
3
|
-
export class
|
|
4
|
-
public name = "
|
|
3
|
+
export class MigrationName1774000000001 implements MigrationInterface {
|
|
4
|
+
public name = "MigrationName1774000000001";
|
|
5
5
|
|
|
6
6
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
7
|
await queryRunner.query(
|
|
@@ -267,7 +267,7 @@ import { MigrationName1773344537755 } from "./1773344537755-MigrationName";
|
|
|
267
267
|
import { MigrationName1773402621107 } from "./1773402621107-MigrationName";
|
|
268
268
|
import { MigrationName1773676206197 } from "./1773676206197-MigrationName";
|
|
269
269
|
import { MigrationName1774000000000 } from "./1774000000000-MigrationName";
|
|
270
|
-
import {
|
|
270
|
+
import { MigrationName1774000000001 } from "./1774000000001-MigrationName";
|
|
271
271
|
|
|
272
272
|
export default [
|
|
273
273
|
InitialMigration,
|
|
@@ -539,5 +539,5 @@ export default [
|
|
|
539
539
|
MigrationName1773402621107,
|
|
540
540
|
MigrationName1773676206197,
|
|
541
541
|
MigrationName1774000000000,
|
|
542
|
-
|
|
542
|
+
MigrationName1774000000001,
|
|
543
543
|
];
|
package/Server/Types/Markdown.ts
CHANGED
|
@@ -79,9 +79,6 @@ export default class Markdown {
|
|
|
79
79
|
markdown: string,
|
|
80
80
|
contentType: MarkdownContentType,
|
|
81
81
|
): Promise<string> {
|
|
82
|
-
// Basic sanitization: neutralize script tags but preserve markdown syntax like '>' for blockquotes.
|
|
83
|
-
markdown = markdown.replace(/<script/gi, "<script");
|
|
84
|
-
|
|
85
82
|
let renderer: Renderer | null = null;
|
|
86
83
|
|
|
87
84
|
if (contentType === MarkdownContentType.Blog) {
|
|
@@ -96,6 +93,17 @@ export default class Markdown {
|
|
|
96
93
|
renderer = this.getEmailRenderer();
|
|
97
94
|
}
|
|
98
95
|
|
|
96
|
+
/*
|
|
97
|
+
* Escape raw HTML tokens in the markdown source to prevent XSS.
|
|
98
|
+
* This only affects raw HTML that users type directly (e.g. <img onerror=...>),
|
|
99
|
+
* not HTML generated by the renderer methods (headings, paragraphs, etc.).
|
|
100
|
+
*/
|
|
101
|
+
if (renderer) {
|
|
102
|
+
renderer.html = (html: string): string => {
|
|
103
|
+
return Markdown.escapeHtml(html);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
99
107
|
const htmlBody: string = await marked(markdown, {
|
|
100
108
|
renderer: renderer,
|
|
101
109
|
});
|
|
@@ -447,7 +447,10 @@ ${contextBlock}
|
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
if (
|
|
450
|
+
if (
|
|
451
|
+
input.monitor.monitorType === MonitorType.Metrics ||
|
|
452
|
+
input.monitor.monitorType === MonitorType.Kubernetes
|
|
453
|
+
) {
|
|
451
454
|
const metricMonitorResult: string | null =
|
|
452
455
|
await MetricMonitorCriteria.isMonitorInstanceCriteriaFilterMet({
|
|
453
456
|
dataToProcess: input.dataToProcess,
|
package/Types/Code/CodeType.ts
CHANGED
|
@@ -16,4 +16,5 @@ export default interface MetricQueryConfigData {
|
|
|
16
16
|
metricQueryData: MetricQueryData;
|
|
17
17
|
getSeries?: ((data: AggregatedModel) => ChartSeries) | undefined;
|
|
18
18
|
chartType?: MetricChartType | undefined;
|
|
19
|
+
yAxisValueFormatter?: ((value: number) => string) | undefined;
|
|
19
20
|
}
|
|
@@ -226,6 +226,25 @@ export class CriteriaFilterUtil {
|
|
|
226
226
|
];
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
public static getInverseFilterType(filterType: FilterType): FilterType {
|
|
230
|
+
switch (filterType) {
|
|
231
|
+
case FilterType.GreaterThan:
|
|
232
|
+
return FilterType.LessThanOrEqualTo;
|
|
233
|
+
case FilterType.LessThan:
|
|
234
|
+
return FilterType.GreaterThanOrEqualTo;
|
|
235
|
+
case FilterType.GreaterThanOrEqualTo:
|
|
236
|
+
return FilterType.LessThan;
|
|
237
|
+
case FilterType.LessThanOrEqualTo:
|
|
238
|
+
return FilterType.GreaterThan;
|
|
239
|
+
case FilterType.EqualTo:
|
|
240
|
+
return FilterType.NotEqualTo;
|
|
241
|
+
case FilterType.NotEqualTo:
|
|
242
|
+
return FilterType.EqualTo;
|
|
243
|
+
default:
|
|
244
|
+
return filterType;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
229
248
|
public static isEvaluateOverTimeFilter(checkOn: CheckOn): boolean {
|
|
230
249
|
return (
|
|
231
250
|
checkOn === CheckOn.ResponseStatusCode ||
|