Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "5.25.8"
"version": "5.26.9"
}
43 changes: 43 additions & 0 deletions .config/bundler/externals.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import type { Configuration, ExternalItemFunctionData } from 'webpack';

type ExternalsType = Configuration['externals'];

export const externals: ExternalsType = [
// Required for dynamic publicPath resolution
{ 'amd-module': 'module' },
'lodash',
'jquery',
'moment',
'slate',
'emotion',
'@emotion/react',
'@emotion/css',
'prismjs',
'slate-plain-serializer',
'@grafana/slate-react',
'react',
'react-dom',
'react-redux',
'redux',
'rxjs',
'i18next',
'react-router',
'd3',
'angular',
/^@grafana\/ui/i,
/^@grafana\/runtime/i,
/^@grafana\/data/i,

// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
({ request }: ExternalItemFunctionData, callback: (error?: Error, result?: string) => void) => {
const prefix = 'grafana/';
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
const stripPrefix = (request: string) => request.slice(prefix.length);

if (request && hasPrefix(request)) {
return callback(undefined, stripPrefix(request));
}

callback();
},
];
2 changes: 1 addition & 1 deletion .config/docker-compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
context: .
args:
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
grafana_version: ${GRAFANA_VERSION:-12.1.0}
grafana_version: ${GRAFANA_VERSION:-12.2.0}
development: ${DEVELOPMENT:-false}
anonymous_auth_enabled: ${ANONYMOUS_AUTH_ENABLED:-true}
ports:
Expand Down
46 changes: 6 additions & 40 deletions .config/webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ import VirtualModulesPlugin from 'webpack-virtual-modules';
import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin.ts';
import { DIST_DIR, SOURCE_DIR } from './constants.ts';
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils.ts';
import { externals } from '../bundler/externals.ts';

const pluginJson = getPluginJson();
const cpVersion = getCPConfigVersion();
const pluginVersion = getPackageJson().version;

const virtualPublicPath = new VirtualModulesPlugin({
'node_modules/grafana-public-path.js': `
Expand Down Expand Up @@ -54,44 +56,7 @@ const config = async (env: Env): Promise<Configuration> => {

entry: await getEntries(),

externals: [
// Required for dynamic publicPath resolution
{ 'amd-module': 'module' },
'lodash',
'jquery',
'moment',
'slate',
'emotion',
'@emotion/react',
'@emotion/css',
'prismjs',
'slate-plain-serializer',
'@grafana/slate-react',
'react',
'react-dom',
'react-redux',
'redux',
'rxjs',
'react-router',
'd3',
'angular',
/^@grafana\/ui/i,
/^@grafana\/runtime/i,
/^@grafana\/data/i,

// Mark legacy SDK imports as external if their name starts with the "grafana/" prefix
({ request }, callback) => {
const prefix = 'grafana/';
const hasPrefix = (request: string) => request.indexOf(prefix) === 0;
const stripPrefix = (request: string) => request.substr(prefix.length);

if (request && hasPrefix(request)) {
return callback(undefined, stripPrefix(request));
}

callback();
},
],
externals,

// Support WebAssembly according to latest spec - makes WebAssembly module async
experiments: {
Expand Down Expand Up @@ -195,7 +160,8 @@ const config = async (env: Env): Promise<Configuration> => {
virtualPublicPath,
// Insert create plugin version information into the bundle
new webpack.BannerPlugin({
banner: '/* [create-plugin] version: ' + cpVersion + ' */',
banner: `/* [create-plugin] version: ${cpVersion} */
/* [create-plugin] plugin: ${pluginJson.id}@${pluginVersion} */`,
raw: true,
entryOnly: true,
}),
Expand Down Expand Up @@ -225,7 +191,7 @@ const config = async (env: Env): Promise<Configuration> => {
rules: [
{
search: /\%VERSION\%/g,
replace: getPackageJson().version,
replace: pluginVersion,
},
{
search: /\%TODAY\%/g,
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ mage_output_file.go

# provisioning
/provisioning/

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
Binary file removed .yarn/install-state.gz
Binary file not shown.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
},
"dependencies": {
"@emotion/css": "11.10.6",
"@grafana/data": "^12.1.0",
"@grafana/data": "^12.2.0",
"@grafana/i18n": "^12.2.0",
"@grafana/plugin-ui": "^0.10.9",
"@grafana/runtime": "^12.1.0",
"@grafana/schema": "^12.1.0",
"@grafana/ui": "^12.1.0",
"@grafana/runtime": "^12.2.0",
"@grafana/schema": "^12.2.0",
"@grafana/ui": "^12.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"tslib": "2.5.3"
Expand All @@ -34,8 +35,8 @@
"@babel/core": "^7.21.4",
"@changesets/cli": "^2.27.12",
"@grafana/e2e-selectors": "12.1.0",
"@grafana/eslint-config": "^8.0.0",
"@grafana/plugin-e2e": "^2.1.7",
"@grafana/eslint-config": "^8.2.0",
"@grafana/plugin-e2e": "^2.1.13",
"@grafana/plugin-meta-extractor": "^0.0.2",
"@grafana/tsconfig": "^2.0.0",
"@playwright/test": "^1.52.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ export const Filters: React.FC<Props> = (props: Props) => {
/>
{loading === i && <div className={styles.loading}>Loading...</div>}
</span>
<Button variant="secondary" onClick={remove(i)} icon="trash-alt" />
<Button variant="secondary" aria-label="Remove filter" onClick={remove(i)} icon="trash-alt" />
{list.length > 1 && i !== list.length - 1 && (
<Segment onChange={onConjunctionChange(i)} options={opList} value={filter.conjunction || 'and'}></Segment>
)}
</>
))}
<Button variant="secondary" onClick={add} icon="plus" />
<Button variant="secondary" aria-label="Add filter" onClick={add} icon="plus" />
</>
</InlineFieldRow>
);
Expand Down
Loading
Loading