-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:
react-router-dom
migration (#980)
* chore: migrate to `react-router-dom@v6` (with `react-router-dom-v5-compat` - update routes - remove unused code - add `NotFound` page (wip) * chore: update summary table links * chore: create-plugin update - fix type issues - remove redundant variable - fix tests (most of them) * chore: fix more tests - fix bug in `useSearchQueryParametersState` * chore: redirect to `home` * chore: update to node `v20` - downgrade packages to match grafana `grafanaDependency` version * fix: add missing line break * fix: self-review change requests - use `generateRoutePath` - remove done TODOs - update tests for `ProbeCard` - update tests for `NewProbe` - update tests for `EditProbe` - remove debug content from `TestRouteInfo` * fix: self-review change requests - update not found usage for `EditProbe` * fix: pr change requests - lock grafana dependencies on 11.3.0 - add 404 page instead of redirect to Home * chore: update `yarn.lock` after rebase
- Loading branch information
Showing
83 changed files
with
2,622 additions
and
1,648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "5.8.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
if [ "${DEV}" = "false" ]; then | ||
echo "Starting test mode" | ||
exec /run.sh | ||
fi | ||
|
||
echo "Starting development mode" | ||
|
||
if grep -i -q alpine /etc/issue; then | ||
exec /usr/bin/supervisord -c /etc/supervisord.conf | ||
elif grep -i -q ubuntu /etc/issue; then | ||
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf | ||
else | ||
echo 'ERROR: Unsupported base image' | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[supervisord] | ||
nodaemon=true | ||
user=root | ||
|
||
[program:grafana] | ||
user=root | ||
directory=/var/lib/grafana | ||
command=/run.sh | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 | ||
redirect_stderr=true | ||
killasgroup=true | ||
stopasgroup=true | ||
autostart=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as webpack from 'webpack'; | ||
|
||
const PLUGIN_NAME = 'BuildModeWebpack'; | ||
|
||
export class BuildModeWebpackPlugin { | ||
apply(compiler: webpack.Compiler) { | ||
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => { | ||
compilation.hooks.processAssets.tap( | ||
{ | ||
name: PLUGIN_NAME, | ||
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS, | ||
}, | ||
async () => { | ||
const assets = compilation.getAssets(); | ||
for (const asset of assets) { | ||
if (asset.name.endsWith('plugin.json')) { | ||
console.log(asset.name); | ||
const pluginJsonString = asset.source.source().toString(); | ||
const pluginJsonWithBuildMode = JSON.stringify( | ||
{ | ||
...JSON.parse(pluginJsonString), | ||
buildMode: compilation.options.mode, | ||
}, | ||
null, | ||
4 | ||
); | ||
compilation.updateAsset(asset.name, new webpack.sources.RawSource(pluginJsonWithBuildMode)); | ||
} | ||
} | ||
} | ||
); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.