forked from bluerobotics/cockpit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bluerobotics:master' into master
- Loading branch information
Showing
183 changed files
with
18,613 additions
and
2,819 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,81 @@ | ||
# Same as production | ||
ARG VARIANT=22.04 | ||
FROM ubuntu:${VARIANT} | ||
|
||
ARG USERNAME=dev | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
xvfb \ | ||
git \ | ||
nano \ | ||
unzip \ | ||
bash-completion \ | ||
less \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create the user with the same UID/GID as host user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& apt-get update \ | ||
&& apt-get install -y sudo \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# Set up NVM and Node.js | ||
ENV NVM_DIR=/usr/local/nvm | ||
ENV NODE_VERSION=v20.16.0 | ||
RUN mkdir -p /usr/local/nvm \ | ||
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ | ||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& nvm use default \ | ||
&& chown -R $USERNAME:$USERNAME $NVM_DIR | ||
ENV NODE_PATH=/usr/local/nvm/versions/node/$NODE_VERSION/bin | ||
ENV PATH=$NODE_PATH:$PATH | ||
|
||
# Set up Bun | ||
USER $USERNAME | ||
WORKDIR /home/$USERNAME | ||
RUN curl -fsSL https://bun.sh/install | bash | ||
ENV BUN_PATH=/home/$USERNAME/.bun | ||
ENV PATH=$BUN_PATH/bin:$PATH | ||
|
||
# Set up bash | ||
RUN echo 'export PS1="\[\e[01;32m\]\u\[\e[m\]:\[\e[01;34m\]\w\[\e[m\]\$ "' >> ~/.bashrc \ | ||
&& echo "export PATH=\"$BUN_PATH/bin:\$PATH\"" >> ~/.bashrc \ | ||
&& echo 'export NVM_DIR="/usr/local/nvm"' >> ~/.bashrc \ | ||
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc | ||
|
||
# Create workspace directory with correct permissions | ||
USER root | ||
RUN mkdir -p /workspace \ | ||
&& chown $USERNAME:$USERNAME /workspace | ||
|
||
# Entrypoint script | ||
COPY <<-"EOF" /usr/local/bin/entrypoint.sh | ||
#!/bin/bash | ||
if [ "$1" = "dev" ]; then | ||
# If first argument is "dev", start the dev server with host binding | ||
. ~/.bashrc && exec bun dev --host 0.0.0.0 | ||
else | ||
# Otherwise, forward all arguments to bun | ||
. ~/.bashrc && exec bun "$@" | ||
fi | ||
EOF | ||
|
||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
USER $USERNAME | ||
WORKDIR /workspace | ||
ENV CONTAINER=true | ||
|
||
# Verify installations | ||
RUN . ~/.bashrc && bun --version && node --version | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||
CMD ["dev"] |
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,30 @@ | ||
{ | ||
"name": "Cockpit Development", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"USERNAME": "dev", | ||
"USER_UID": "1000", | ||
"USER_GID": "1000" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"vue.volar", | ||
"bradlc.vscode-tailwindcss", | ||
"spencerwmiles.vscode-task-buttons" | ||
], | ||
"settings": { | ||
"task.quickOpen.detail": true, | ||
"task.quickOpen.skip": false, | ||
"terminal.integrated.defaultProfile.linux": "bash" | ||
} | ||
} | ||
}, | ||
"forwardPorts": [5173], | ||
"postCreateCommand": "git submodule update --init --recursive && bun install && exit 0", | ||
"remoteUser": "dev", | ||
"updateRemoteUserUID": 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,55 @@ | ||
name: Report bug | ||
description: Report a bug found | ||
type: "Bug" | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to report an issue! Please fill out the following details so we can respond and act efficiently. | ||
- type: textarea | ||
attributes: | ||
label: Bug description | ||
description: Describe roughly what the bug is. For interface issues, please include relevant screenshots or recordings. | ||
placeholder: | | ||
Example: "Widgets underneath the top bar" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: Provide an example of how to replicate the bug. | ||
placeholder: | | ||
Example: | ||
1. Click here | ||
2. Click That | ||
3. Put this here | ||
4. And etc | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Primary pain point(s) | ||
description: What is this bug actively stopping you from doing? This is helpful for us to suggest temporary workarounds while the actual issue is being fixed. | ||
placeholder: | | ||
Example: "When the widget is obstructed I can't see the information I need." | ||
validations: | ||
required: false | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: System logs, links to relevant forum discussions, etc. | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Prerequisites | ||
description: Please confirm the following (and check the boxes) before submitting. | ||
options: | ||
- label: I have checked to make sure that a similar request has not already been filed or fixed. | ||
required: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Improve User Interface or Experience | ||
description: Suggestion to improve UI/UX. | ||
title: "frontend: " | ||
labels: ["ui", "enhancement"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to suggest improvements to our interface! Please fill out the following details so we can respond and act efficiently. | ||
- type: textarea | ||
attributes: | ||
label: Current behaviour | ||
description: Describe what you see, why that is bad, and any issues it is causing. | ||
placeholder: | | ||
Example: "The small margins between the mini-widgets make it harder to distinguish between them, and looks unusual." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Expected or desired behaviour | ||
description: Explain what you expect or would like to see instead, and why. | ||
placeholder: | | ||
Example: "An extra margin or space between them may help." | ||
validations: | ||
required: true | ||
|
||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Prerequisites | ||
description: Please confirm the following (and check the boxes) before submitting. | ||
options: | ||
- label: I have checked to make sure that a similar request has not already been filed or fixed. | ||
required: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Widget idea | ||
description: Suggest/request a new type of widget | ||
title: "widget: " | ||
labels: ["widget-specific", "ui"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to report an issue! Please fill out the following details so we can respond and act efficiently. | ||
- type: textarea | ||
attributes: | ||
label: Problem to solve | ||
description: Describe why a new widget is needed, in detail. | ||
placeholder: | | ||
Example: "I want to visually track and compare data from multiple sensors over time." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Desired approach | ||
description: Suggest specific functionality and/or interface ideas that you think should be included / considered. If possible, provide diagrams/sketches/images as interface references. | ||
placeholder: | | ||
A plotting widget with support for multiple variables could show the values over time, and allowing (optional) logarithmic scaling for the horizontal axis could focus attention on the most recent values. | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Additional context | ||
description: Links to similar widgets or interfaces in other software/games, relevant forum discussion threads, etc. | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
id: terms | ||
attributes: | ||
label: Prerequisites | ||
description: Please confirm the following (and check the boxes) before submitting. | ||
options: | ||
- label: I have checked to make sure that a similar request has not already been filed or fixed. | ||
required: true |
Oops, something went wrong.