Skip to content

Conversation

@haoruizhou
Copy link
Collaborator

No description provided.

@haoruizhou haoruizhou requested a review from Copilot September 30, 2025 01:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR creates a functional installation script system for Mac and Linux that automates the setup of the DAQ system. The main focus is on streamlining the installation process by removing some scripts, simplifying token extraction, and providing better default configurations.

  • Removes complex Python-based token extraction in favor of simpler shell-based approaches
  • Simplifies default passwords and configuration for easier setup
  • Updates Grafana dashboard settings for better usability

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
installer/scripts/start-daq-system-no-slack.sh Completely removed automated startup script for no-slack configuration
installer/scripts/extract-token-docker.sh Completely removed Docker-based token extraction script
installer/scripts/extract-influx-token.py Completely removed Python-based token extraction script
installer/scripts/extract-influx-token.sh Changed from overwriting to appending to .env file
installer/scripts/Mac Dependencies.md Added new documentation for Mac-specific dependencies
installer/grafana/provisioning/dashboards/dashboard.yml Updated dashboard provider names and folder structure
installer/grafana/dashboards/Vehicle Overview.json Removed auto-refresh and set fixed time range
installer/docker-compose.yml Changed default passwords from secure values to "admin"
installer/TOKEN_EXTRACTION_README.md Completely removed comprehensive token extraction documentation
installer/.env.example Simplified configuration with new default passwords and removed token
installer/.env.backup Added new backup configuration file
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

echo "🔑 Token extracted: ${ALL_ACCESS_TOKEN:0:20}..."

# Write or update token in .env file
echo "💾 Writing token to .env file..."
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing from > to >> will append to the .env file instead of overwriting it. This could result in duplicate INFLUXDB_TOKEN entries if the script is run multiple times, potentially causing configuration issues.

Suggested change
echo "💾 Writing token to .env file..."
echo "💾 Writing token to .env file..."
# Remove any existing INFLUXDB_TOKEN lines from .env
if [ -f .env ]; then
sed -i '/^INFLUXDB_TOKEN=/d' .env
fi

Copilot uses AI. Check for mistakes.
container_name: grafana
restart: unless-stopped
ports:
- "8087:3000"
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'admin' as the default password for Grafana poses a security risk. This weak default password could allow unauthorized access to the dashboard system.

Suggested change
- "8087:3000"
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD} # Set this in your environment or .env file. Do NOT use 'admin' as the password.

Copilot uses AI. Check for mistakes.
SLACK_BOT_TOKEN=your-slack-bot-token-here
SLACK_APP_TOKEN=your-slack-app-token-here
SLACK_BOT_TOKEN=xoxb-52272542916-8790672291073-1rZVA8yhIkt9OZy2jdITkvPQ
SLACK_APP_TOKEN=xapp-1-A08P01YR7M0-8764649895847-57581196f6add241ae4bba782b045005a15400c27f9388178fdba8409caf0219
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real Slack tokens should not be included in example files as they could be accidentally committed and used maliciously. These should be placeholder values like 'your-slack-bot-token-here'.

Suggested change
SLACK_APP_TOKEN=xapp-1-A08P01YR7M0-8764649895847-57581196f6add241ae4bba782b045005a15400c27f9388178fdba8409caf0219
SLACK_APP_TOKEN=your-slack-app-token-here

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +8
Check installation of jq

```jq --version```



```brew install jq```

Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation is incomplete and lacks proper formatting. It should include a proper title, explain what jq is needed for, and provide complete installation instructions with context.

Suggested change
Check installation of jq
```jq --version```
```brew install jq```
# Installing `jq` on macOS
[`jq`](https://stedolan.github.io/jq/) is a lightweight and flexible command-line JSON processor. It is required for processing JSON data in various scripts used by this project.
## Why is `jq` needed?
Some of the scripts in this repository rely on `jq` to parse and manipulate JSON output from other tools or APIs. Without `jq`, these scripts will not function correctly.
## How to check if `jq` is installed
Open your terminal and run:
```sh
jq --version

If you see a version number (e.g., jq-1.6), jq is already installed.

If you see an error like command not found: jq, you need to install it.

How to install jq using Homebrew

If you do not have Homebrew installed, follow the instructions at https://brew.sh/ to install it first.

Then, install jq by running:

brew install jq

After installation, verify that jq is available:

jq --version

You should now see the version number, confirming that jq is installed and ready to use.

Copilot uses AI. Check for mistakes.
Comment on lines +1519 to +1520
"from": "2025-06-05 20:17:00",
"to": "2025-06-05 20:25:00"
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting a fixed time range from June 2025 makes the dashboard less useful for users, as it won't show current data by default. Consider using a relative time range like 'now-1h' to 'now' for better usability.

Suggested change
"from": "2025-06-05 20:17:00",
"to": "2025-06-05 20:25:00"
"from": "now-1h",
"to": "now"

Copilot uses AI. Check for mistakes.
@haoruizhou haoruizhou merged commit 944b555 into main Sep 30, 2025
6 of 11 checks passed
haoruizhou added a commit that referenced this pull request Nov 13, 2025
Functional installation script (Mac and Linux tested)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants