Skip to content
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

dashboard: Add search box and link to URL #22

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/fectch-ci-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Fetch CI Data
run-name: Fetch CI Data
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:

jobs:
fetch-and-commit-data:
runs-on: ubuntu-22.04

env:
NODE_ENV: production
TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update dashboard data
run: |
# fetch ci nightly data as temporary file
node scripts/fetch-ci-nightly-data.js | tee tmp-data.json
node scripts/fetch-ci-pr-data.js | tee tmp-data2.json

# switch to a branch specifically for holding latest data
git config --global user.name "GH Actions Workflow"
git config --global user.email "<gha@runner>"
git fetch --all
git checkout latest-dashboard-data

# back out whatever data was there
git reset HEAD~1

# overwrite the old data
mkdir -p data/
mv tmp-data.json data/job_stats.json
mv tmp-data2.json data/check_stats.json

# commit
git add data
git commit -m '[skip ci] latest ci nightly data'
git push --force
14 changes: 14 additions & 0 deletions components/searchForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const SearchForm = ({ handleSearch }) => {
return (
<div className="flex flex-col items-center md:text-base text-xs">
<div className="flex min-[1126px]:justify-end justify-center w-full">
<form className="p-2 bg-gray-700 rounded-md flex flex-row" onSubmit={(e) => handleSearch(e)}>
<div className="mx-2">
<label className="block text-white">Search Text:</label>
<input type="text" name="value" required></input>
</div>
</form>
</div>
</div>
);
};
Loading
Loading