!127 monitor: Change URL of grafana to relative path.

Merge pull request !127 from fengfuqiu/auto-10379039-master-1648522062339
This commit is contained in:
fengfuqiu 2022-03-29 02:48:54 +00:00 committed by Gitee
commit 12e680d454
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 1 additions and 9 deletions

View File

@ -74,7 +74,7 @@ const ServerList = (props) => {
const GrafanaWrap = (props) => {
return (
<iframe
src = {`http://127.0.0.1:3000/d/sysom-dashboard/sysom-dashboard?orgId=1&refresh=1m&var-node=${props.host}:9100&kiosk=tv`}
src = {`/grafana/d/sysom-dashboard/sysom-dashboard?orgId=1&refresh=1m&var-node=${props.host}:9100&kiosk=tv`}
width="100%"
frameBorder="0"
style={{ marginLeft: "8px", height:"calc(100vh - 80px)" }}

View File

@ -163,13 +163,6 @@ start_script_node() {
popd
}
modify_grafana_url() {
pushd ${TARGET_PATH}/${WEB_DIR}
dashboard_file=`grep -nru "sysom-dashboard/sysom-dashboard" | awk -F":" '{print $1}'`
sed -i "s/127.0.0.1:3000/${SERVER_PUBLIC_IP}\/grafana/g" $dashboard_file
popd
}
deploy() {
touch_env_rpms
touch_virtualenv
@ -179,7 +172,6 @@ deploy() {
init_conf
start_script_server
start_script_node
modify_grafana_url
start_app
}