{
)}
|
{hasError && (
)}
+ {isSampled && (
+
+
+
+ )}
|
{
if (document.getSelection()?.toString()) {
return;
}
+ this.closePopoverMenu();
};
closePopoverMenu = () => {
diff --git a/public/app/features/logs/components/getLogRowStyles.ts b/public/app/features/logs/components/getLogRowStyles.ts
index e2142cdf592..e3609dae455 100644
--- a/public/app/features/logs/components/getLogRowStyles.ts
+++ b/public/app/features/logs/components/getLogRowStyles.ts
@@ -117,9 +117,16 @@ export const getLogRowStyles = memoizeOne((theme: GrafanaTheme2) => {
width: 4em;
cursor: default;
`,
- logIconError: css`
- color: ${theme.colors.warning.main};
- `,
+ logIconError: css({
+ color: theme.colors.warning.main,
+ position: 'relative',
+ top: '-2px',
+ }),
+ logIconInfo: css({
+ color: theme.colors.info.main,
+ position: 'relative',
+ top: '-2px',
+ }),
logsRowToggleDetails: css`
label: logs-row-toggle-details__level;
font-size: 9px;
diff --git a/public/app/features/logs/utils.ts b/public/app/features/logs/utils.ts
index 150caee3740..4d8f88c5641 100644
--- a/public/app/features/logs/utils.ts
+++ b/public/app/features/logs/utils.ts
@@ -154,6 +154,22 @@ export const checkLogsError = (logRow: LogRowModel): { hasError: boolean; errorM
};
};
+export const checkLogsSampled = (logRow: LogRowModel): { isSampled: boolean; sampleMessage?: string } => {
+ if (logRow.labels.__adaptive_logs_sampled__) {
+ let msg =
+ logRow.labels.__adaptive_logs_sampled__ === 'true'
+ ? 'Logs like this one have been dropped by Adaptive Logs'
+ : `${logRow.labels.__adaptive_logs_sampled__}% of logs like this one have been dropped by Adaptive Logs`;
+ return {
+ isSampled: true,
+ sampleMessage: msg,
+ };
+ }
+ return {
+ isSampled: false,
+ };
+};
+
export const escapeUnescapedString = (string: string) =>
string.replace(/\\r\\n|\\n|\\t|\\r/g, (match: string) => (match.slice(1) === 't' ? '\t' : '\n'));
diff --git a/public/app/routes/routes.tsx b/public/app/routes/routes.tsx
index 87729a69432..34d3ade4622 100644
--- a/public/app/routes/routes.tsx
+++ b/public/app/routes/routes.tsx
@@ -436,7 +436,7 @@ export function getAppRoutes(): RouteDescriptor[] {
),
},
config.featureToggles.dashboardRestore && {
- path: '/dashboard/recentlyDeleted',
+ path: '/dashboard/recently-deleted',
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
component: SafeDynamicImport(
() => import(/* webpackChunkName: "RecentlyDeletedPage" */ 'app/features/browse-dashboards/RecentlyDeletedPage')
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index 36fb784122a..0f00b256579 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -1184,7 +1184,7 @@
"public": {
"title": "Public dashboards"
},
- "recentlyDeleted": {
+ "recently-deleted": {
"subtitle": "Any items listed here for more than 30 days will be automatically deleted.",
"title": "Recently Deleted"
},
diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json
index bfe2a139e08..065ea9ab9b5 100644
--- a/public/locales/pseudo-LOCALE/grafana.json
+++ b/public/locales/pseudo-LOCALE/grafana.json
@@ -1184,7 +1184,7 @@
"public": {
"title": "Pūþľįč đäşĥþőäřđş"
},
- "recentlyDeleted": {
+ "recently-deleted": {
"subtitle": "Åʼny įŧęmş ľįşŧęđ ĥęřę ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ.",
"title": "Ŗęčęʼnŧľy Đęľęŧęđ"
},
diff --git a/public/sass/_grafana.scss b/public/sass/_grafana.scss
index f19901dc014..4137058f724 100644
--- a/public/sass/_grafana.scss
+++ b/public/sass/_grafana.scss
@@ -20,7 +20,6 @@
@import 'utils/widths';
// COMPONENTS
-@import 'components/scrollbar';
@import 'components/buttons';
@import 'components/alerts';
@import 'components/tags';
diff --git a/public/sass/components/_scrollbar.scss b/public/sass/components/_scrollbar.scss
deleted file mode 100644
index 1d2f90f130f..00000000000
--- a/public/sass/components/_scrollbar.scss
+++ /dev/null
@@ -1,72 +0,0 @@
-// Scrollbars
-// Note, this is not applied by default if the `betterPageScrolling` feature flag is applied
-.no-overlay-scrollbar {
- ::-webkit-scrollbar {
- width: 8px;
- height: 8px;
- }
-
- ::-webkit-scrollbar:hover {
- height: 8px;
- }
-
- ::-webkit-scrollbar-button:start:decrement,
- ::-webkit-scrollbar-button:end:increment {
- display: none;
- }
- ::-webkit-scrollbar-button:horizontal:decrement {
- display: none;
- }
- ::-webkit-scrollbar-button:horizontal:increment {
- display: none;
- }
- ::-webkit-scrollbar-button:vertical:decrement {
- display: none;
- }
- ::-webkit-scrollbar-button:vertical:increment {
- display: none;
- }
- ::-webkit-scrollbar-button:horizontal:decrement:active {
- background-image: none;
- }
- ::-webkit-scrollbar-button:horizontal:increment:active {
- background-image: none;
- }
- ::-webkit-scrollbar-button:vertical:decrement:active {
- background-image: none;
- }
- ::-webkit-scrollbar-button:vertical:increment:active {
- background-image: none;
- }
- ::-webkit-scrollbar-track-piece {
- background-color: transparent;
- }
-
- ::-webkit-scrollbar-thumb:vertical {
- height: 50px;
- background: -webkit-gradient(
- linear,
- left top,
- right top,
- color-stop(0%, $scrollbarBackground),
- color-stop(100%, $scrollbarBackground2)
- );
- border: 1px solid $scrollbarBorder;
- border-top: 1px solid $scrollbarBorder;
- border-left: 1px solid $scrollbarBorder;
- }
-
- ::-webkit-scrollbar-thumb:horizontal {
- width: 50px;
- background: -webkit-gradient(
- linear,
- left top,
- left bottom,
- color-stop(0%, $scrollbarBackground),
- color-stop(100%, $scrollbarBackground2)
- );
- border: 1px solid $scrollbarBorder;
- border-top: 1px solid $scrollbarBorder;
- border-left: 1px solid $scrollbarBorder;
- }
-}
diff --git a/public/test/jest-setup.ts b/public/test/jest-setup.ts
index 4d34bb4a7fd..640db119ccd 100644
--- a/public/test/jest-setup.ts
+++ b/public/test/jest-setup.ts
@@ -67,6 +67,8 @@ global.IntersectionObserver = mockIntersectionObserver;
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
+// add scrollTo interface since it's not implemented in jsdom
+Element.prototype.scrollTo = () => {};
jest.mock('../app/core/core', () => ({
...jest.requireActual('../app/core/core'),
diff --git a/yarn.lock b/yarn.lock
index 9fe63d38e1b..4529834161a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -30951,8 +30951,8 @@ __metadata:
linkType: hard
"ws@npm:^7.2.0, ws@npm:^7.3.1":
- version: 7.5.6
- resolution: "ws@npm:7.5.6"
+ version: 7.5.10
+ resolution: "ws@npm:7.5.10"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
@@ -30961,13 +30961,13 @@ __metadata:
optional: true
utf-8-validate:
optional: true
- checksum: 10/745fc1a1cdac7e91f2c7340f7006aea06454b6ca4f24615a1e81124f46d99a7200839895c088a30c1d8d92dd1a9d349046bd4bc3475447aaf13b1f5cb48a18b7
+ checksum: 10/9c796b84ba80ffc2c2adcdfc9c8e9a219ba99caa435c9a8d45f9ac593bba325563b3f83edc5eb067cc6d21b9a6bf2c930adf76dd40af5f58a5ca6859e81858f0
languageName: node
linkType: hard
"ws@npm:^8.16.0, ws@npm:^8.2.3, ws@npm:^8.9.0":
- version: 8.16.0
- resolution: "ws@npm:8.16.0"
+ version: 8.17.1
+ resolution: "ws@npm:8.17.1"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ">=5.0.2"
@@ -30976,7 +30976,7 @@ __metadata:
optional: true
utf-8-validate:
optional: true
- checksum: 10/7c511c59e979bd37b63c3aea4a8e4d4163204f00bd5633c053b05ed67835481995f61a523b0ad2b603566f9a89b34cb4965cb9fab9649fbfebd8f740cea57f17
+ checksum: 10/4264ae92c0b3e59c7e309001e93079b26937aab181835fb7af79f906b22cd33b6196d96556dafb4e985742dd401e99139572242e9847661fdbc96556b9e6902d
languageName: node
linkType: hard
|