Skip to content

Itohtaka/fix expo 0402 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 2, 2025
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: 2 additions & 0 deletions cabot_dashboard_client/remote-merge-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ remote_env="~/cabot_ws/cabot/.env"
original_env="/tmp/original.env"
update_env=$1
result_env="/tmp/result.env"
ssh_options="-o StrictHostKeyChecking=no -i $CABOT_SSH_ID_FILE"
options="-o StrictHostKeyChecking=no -i $CABOT_SSH_ID_FILE -p"
if [ ! -f "$update_env" ]; then
echo "Error: $update_env does not exist."
exit 1
fi

ssh $ssh_options $CABOT_SSH_TARGET cp -a $remote_env $remote_env.$(date +'%Y%m%d%H%M%S')
scp $options $CABOT_SSH_TARGET:$remote_env $original_env
python merge-env.py $original_env $update_env $result_env
scp $options $result_env $CABOT_SSH_TARGET:$remote_env
19 changes: 14 additions & 5 deletions cabot_dashboard_server/static/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body {
padding: 4px 8px;
font-size: 14px;
color: #495057;
width: calc(33.33% - 6px);
width: calc(100% - 6px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -398,7 +398,7 @@ body {
.image-versions {
display: flex;
flex-wrap: wrap;
gap: 8px;
gap: 3px;
margin: 8px 0;
}

Expand Down Expand Up @@ -453,14 +453,23 @@ body {
}

.version-tag {
background-color: #eef;
background-color: #eee;
}

.env-key-tag {
width: calc(50% - 6px);
}

.env-tag {
background-color: #fee;
.env-value-tag {
width: calc(50% - 6px);
}

.env-label-tag {
background-color: #fff;
text-align: center;
font-weight: bold;
}

.robot-list {
max-height: 75vh;
}
3 changes: 2 additions & 1 deletion cabot_dashboard_server/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,9 @@ function updateDashboard(data) {
<div class="accordion-body">
${Object.keys(robot.env || {}).length > 0 ? `
<div class="image-versions mb-2">
<div class="version-tag env-key-tag env-label-tag">Key</div><div class="version-tag env-value-tag env-label-tag">Value</div>
${Object.entries(robot.env || {}).map(([name, tag]) =>
`<div class="version-tag env-tag">${name}=${tag}</div>`
`<div class="version-tag env-key-tag">${name}</div><div class="version-tag env-value-tag" title="${tag}">${tag}</div>`
).join('')}
</div>
` : robot.connected ? `
Expand Down