Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
GurinderRawala committed Sep 2, 2024
1 parent ea40d07 commit 67305b3
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 237 deletions.
20 changes: 20 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
tools:
golangci-lint:
enabled: true
eslint:
enabled: true
chat:
auto_reply: true
2 changes: 2 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ on:
required: false
default: false
type: boolean
description: 'Dry run mode'
latest:
required: false
default: false
type: boolean
description: 'Generate changelog for the latest release'

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cloud-run-grafana-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Grafana Server Cloud Run on prod
on:
push:
branches:
- fluxninja_micro_frontends
- coderabbit_micro_frontend
paths:
- "/**"
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cloud-run-grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Grafana Server Cloud Run
on:
push:
branches:
- fluxninja_micro_frontends
- coderabbit_micro_frontend
paths:
- "/**"
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "11.3.0-pre",
"repository": "github:grafana/grafana",
"scripts": {
"build": "NODE_ENV=production nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js",
"build": "NODE_ENV=dev nx exec --verbose -- webpack --config scripts/webpack/webpack.prod.js",
"build:nominify": "yarn run build -- --env noMinify=1",
"dev": "NODE_ENV=dev nx exec -- webpack --config scripts/webpack/webpack.dev.js",
"e2e": "./e2e/start-and-run-suite",
Expand Down
2 changes: 1 addition & 1 deletion packages/grafana-data/src/themes/createShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function createShape(options: ThemeShapeInput): ThemeShape {
const baseBorderRadius = options.borderRadius ?? 6;

const radius = {
default: '2px',
default: '6px',
pill: '9999px',
circle: '100%',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
container: css({
padding: theme.spacing(1),
border: `1px ${theme.colors.border.weak} solid`,
borderRadius: theme.shape.radius.default,
borderRadius: theme.shape.borderRadius(),
backgroundColor: theme.colors.background.primary,
zIndex: theme.zIndex.modal,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export const getBodyStyles = (theme: GrafanaTheme2) => {
zIndex: theme.zIndex.modal,
backgroundColor: theme.colors.background.primary,
width: '268px',
borderRadius: theme.shape.borderRadius(),

'.react-calendar__navigation': {
display: 'flex',
Expand Down Expand Up @@ -181,6 +182,9 @@ export const getBodyStyles = (theme: GrafanaTheme2) => {
borderTopLeftRadius: '20px',
borderBottomLeftRadius: '20px',
},
'& button': {
borderRadius: 0,
},

[`${hasActiveSelector}, .react-calendar__tile--rangeEnd`]: {
borderTopRightRadius: '20px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme2, isReversed, hideQuickRang
background: theme.colors.background.primary,
boxShadow: theme.shadows.z3,
width: `${isFullscreen ? '546px' : '262px'}`,
borderRadius: theme.shape.radius.default,
borderRadius: theme.shape.borderRadius(),
border: `1px solid ${theme.colors.border.weak}`,
[`${isReversed ? 'left' : 'right'}`]: 0,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SelectableValue, parseDuration } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';

import { t } from '../../utils/i18n';
import { ButtonGroup } from '../Button';
import { ButtonSelect } from '../Dropdown/ButtonSelect';
import { ToolbarButtonVariant, ToolbarButton } from '../ToolbarButton';

Expand Down Expand Up @@ -102,7 +101,7 @@ export class RefreshPicker extends PureComponent<Props> {
const tooltipAutoRefresh = selectedValue.value === '' ? tooltipAutoRefreshOff : tooltipIntervalSelected;

return (
<ButtonGroup className="refresh-picker">
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }} className="refresh-picker">
<ToolbarButton
aria-label={text}
tooltip={tooltip}
Expand All @@ -125,7 +124,7 @@ export class RefreshPicker extends PureComponent<Props> {
tooltip={tooltipAutoRefresh}
/>
)}
</ButtonGroup>
</div>
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions public/app/fn_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config.featureToggles = {
publicDashboards: true,
};
interface FnData {
assets: {
themePaths: {
light: string;
dark: string;
};
Expand All @@ -20,7 +20,7 @@ declare global {
}

// config.isPublicDashboardView = false;
config.bootData.themePaths = window.fnData.assets;
config.bootData.themePaths = window.fnData.themePaths;

export const { bootstrap, mount, unmount, update, afterMount, afterUnmount, beforeLoad, beforeMount, beforeUnmount } =
createMfe.create(FNDashboard);
2 changes: 1 addition & 1 deletion public/app/plugins/panel/canvas/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function getGlobalStyles(theme: GrafanaTheme2) {
cursor: 'grab',
flexGrow: 1,
border: `1px solid ${theme.components.input.borderColor}`,
borderRadius: `${theme.shape.radius.default}`,
borderRadius: `${theme.shape.borderRadius()}`,
background: `${theme.colors.background.secondary}`,
minHeight: `${theme.spacing.gridSize * 4}px`,
'&:hover': {
Expand Down
29 changes: 5 additions & 24 deletions public/microfrontends/fn_dashboard/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<title>CodeRabbit Micro-frontend</title>
<base href="/" />
</head>

<body class="theme-light app-grafana">
<div id="grafanaRoot"></div>
<script nonce="">
window.fnData = {
assets: {
light: '../../../public/build/grafana.light.56483b57dfda9d617e91.css',
dark: '../../../public/build/grafana.dark.ea10a053bf33d9b6d591.css',
<!doctype html><html lang="en"><head><title>CodeRabbit Micro-frontend</title><base href="/"/></head><body class="theme-light app-grafana"><div id="grafanaRoot"></div><script nonce="">window.fnData = {
themePaths: {
light: '../../../public/build/grafana.light.e472367a4cf156a9b63a.css',
dark: '../../../public/build/grafana.dark.5f7207c2eacde948b7e9.css',
}
};
</script>


<script nonce="" src="../../../public/build/runtime~fn_dashboard.2513260d3bb1ec1df89c.js" type="text/javascript"></script>

<script nonce="" src="../../../public/build/fn_dashboard.f2d6b81094397ad82233.js" type="text/javascript"></script>

</body>
</html>
};</script><script nonce="" src="../../../public/build/runtime.9eb7f96cd525774fa273.js"></script><script nonce="" src="../../../public/build/6029.5c0893d1623856e7b325.js"></script><script nonce="" src="../../../public/build/1033.56e8a42979cc4b84ccab.js"></script><script nonce="" src="../../../public/build/9721.3f99a54915f5b5fda31c.js"></script><script nonce="" src="../../../public/build/1316.52e481919f4b86b55ef4.js"></script><script nonce="" src="../../../public/build/9569.f432c0a8a601f1ff6c30.js"></script><script nonce="" src="../../../public/build/6263.da7ac459a5a5b637a73a.js"></script><script nonce="" src="../../../public/build/6947.6760542b558c0c2cf573.js"></script><script nonce="" src="../../../public/build/4894.88c4d69a6de1f31710b4.js"></script><script nonce="" src="../../../public/build/530.1c5ae442b33495c705a5.js"></script><script nonce="" src="../../../public/build/2474.0ec13dcec78b7af62be9.js"></script><script nonce="" src="../../../public/build/4689.d68a119c4ef9e4b107c1.js"></script><script nonce="" src="../../../public/build/fn_dashboard.2faaa45d8bc8e5f2ce4c.js"></script></body></html>
4 changes: 2 additions & 2 deletions public/sass/_variables.generated.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ $headings-line-height: 1.5 !default;

$border-width: 1px !default;

$border-radius: 2px !default;
$border-radius: 6px !default;
$border-radius-lg: 18px !default;
$border-radius-sm: 2px !default;
$border-radius-sm: 6px !default;

// Page

Expand Down
61 changes: 1 addition & 60 deletions public/views/error.html
Original file line number Diff line number Diff line change
@@ -1,60 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width" />
<meta name="theme-color" content="#000" />

<title>[[.AppTitle]] - Error</title>

<base href="[[.AppSubUrl]]/" />

[[ if eq .ThemeType "light" ]]
<link rel="stylesheet" href="[[.Assets.Light]]" />
[[ else ]]
<link rel="stylesheet" href="[[.Assets.Dark]]" />
[[ end ]]

<link rel="icon" type="image/png" href="public/img/fav32.png" />
<link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28" />
</head>

<body class="theme-[[ .ThemeType ]]">
<div class="main-view">
<div class="page-container">
<div class="page-header">
<div class="page-header__inner">
<span class="page-header__logo">
<i class="page-header__icon fa fa-frown-o"></i>
</span>
<div class="page-header__info-block">
<h1 class="page-header__title">
<a class="text-link" href="login">Grafana</a><span> / Server Error</span><span></span>
</h1>
<div class="page-header__sub-title">Sadly something went wrong</div>
</div>
</div>
</div>
</div>
<div class="page-container page-body ng-scope" style="padding: 2rem">
<div class="alert">
<div class="alert-icon"><icon name="'exclamation-triangle'"></icon></div>
<div class="alert-body">
<div class="alert-title">[[.Title]]</div>
</div>
</div>
<br />
[[if .ErrorMsg]]
<h4 class="page-heading">Error details</h4>
<div class="alert-text">
<pre>[[.ErrorMsg]]</pre>
</div>
[[end]]
<div style="padding: 2rem 0 0">
<p>Check the Grafana server logs for the detailed error message.</p>
</div>
</div>
</div>
</body>
</html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width"/><meta name="theme-color" content="#000"/><title>[[.AppTitle]] - Error</title><base href="[[.AppSubUrl]]/"/>[[ if eq .ThemeType "light" ]]<link rel="stylesheet" href="[[.Assets.Light]]"/>[[ else ]]<link rel="stylesheet" href="[[.Assets.Dark]]"/>[[ end ]]<link rel="icon" type="image/png" href="public/img/fav32.png"/><link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28"/></head><body class="theme-[[ .ThemeType ]]"><div class="main-view"><div class="page-container"><div class="page-header"><div class="page-header__inner"><span class="page-header__logo"><i class="page-header__icon fa fa-frown-o"></i></span><div class="page-header__info-block"><h1 class="page-header__title"><a class="text-link" href="login">Grafana</a><span> / Server Error</span><span></span></h1><div class="page-header__sub-title">Sadly something went wrong</div></div></div></div></div><div class="page-container page-body ng-scope" style="padding: 2rem"><div class="alert"><div class="alert-icon"><icon name="'exclamation-triangle'"></icon></div><div class="alert-body"><div class="alert-title">[[.Title]]</div></div></div><br/>[[if .ErrorMsg]]<h4 class="page-heading">Error details</h4><div class="alert-text"><pre>[[.ErrorMsg]]</pre></div>[[end]]<div style="padding: 2rem 0 0"><p>Check the Grafana server logs for the detailed error message.</p></div></div></div></body></html>
2 changes: 1 addition & 1 deletion public/views/index-microfrontend-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div id="grafanaRoot"></div>
<script nonce="">
window.fnData = {
assets: {
themePaths: {
light: '../../../public/build/<%= htmlWebpackPlugin.files.cssChunks.light %>',
dark: '../../../public/build/<%= htmlWebpackPlugin.files.cssChunks.dark %>',
}
Expand Down
Loading

0 comments on commit 67305b3

Please sign in to comment.