Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d580932ad | |||
| f26dbdf8b6 | |||
| 33e370e90f | |||
| 5c492986a5 | |||
| fb564afe30 | |||
| a4d151e3f7 | |||
| 124973d9fa | |||
| abfaa5259e | |||
| 6d4196085e | |||
| fa5d0e44c4 | |||
| b197d349f4 | |||
| c97388ff60 | |||
| c8768387f6 | |||
| fd4f0429e4 | |||
| 33d4b99a4b | |||
| 9be57f2271 | |||
| 8196447526 | |||
| 712119cb5e |
@@ -0,0 +1,131 @@
|
|||||||
|
name: Docker
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '36 12 * * *'
|
||||||
|
push:
|
||||||
|
branches: [ master, influxdb ]
|
||||||
|
# Publish semver tags as releases.
|
||||||
|
tags: [ 'v*.*.*' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
collector:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# Login against a Docker registry except on PR
|
||||||
|
# https://github.com/docker/login-action
|
||||||
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Extract metadata (tags, labels) for Docker
|
||||||
|
# https://github.com/docker/metadata-action
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
type=ref,enable=true,event=branch,suffix=-collector
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
|
# https://github.com/docker/build-push-action
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/Dockerfile.collector
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# Login against a Docker registry except on PR
|
||||||
|
# https://github.com/docker/login-action
|
||||||
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Extract metadata (tags, labels) for Docker
|
||||||
|
# https://github.com/docker/metadata-action
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
type=ref,enable=true,event=branch,suffix=-web
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
|
# https://github.com/docker/build-push-action
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/Dockerfile.web
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
omnibus:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# Login against a Docker registry except on PR
|
||||||
|
# https://github.com/docker/login-action
|
||||||
|
- name: Log into registry ${{ env.REGISTRY }}
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Extract metadata (tags, labels) for Docker
|
||||||
|
# https://github.com/docker/metadata-action
|
||||||
|
- name: Extract Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||||
|
with:
|
||||||
|
tags: |
|
||||||
|
type=ref,enable=true,event=branch,suffix=-omnibus
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
# Build and push Docker image with Buildx (don't push on PR)
|
||||||
|
# https://github.com/docker/build-push-action
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/Dockerfile
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# compiles Windows artifacts and attaches them to build
|
||||||
|
name: Release Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
# Only use the types keyword to narrow down the activity types that will trigger your workflow.
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
release-windows:
|
||||||
|
name: Release Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
GOOS: windows
|
||||||
|
GOARCH: amd64
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{github.event.release.tag_name}}
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
|
||||||
|
- name: Build Binaries
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p $GITHUB_WORKSPACE\dist
|
||||||
|
|
||||||
|
echo "building collector binary (OS = ${GOOS}, ARCH = ${GOARCH})"
|
||||||
|
go build -ldflags "-extldflags=-static -X main.goos=${GOOS} -X main.goarch=${GOARCH}" -o $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe -tags "static netgo" collector\cmd\collector-metrics\collector-metrics.go
|
||||||
|
ls $GITHUB_WORKSPACE\dist\scrutiny-collector-metrics-${GOOS}-${GOARCH}.exe
|
||||||
|
|
||||||
|
- name: Release Asset - Collector - windows-amd64
|
||||||
|
id: upload-release-asset2
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
|
asset_path: './dist/scrutiny-collector-metrics-windows-amd64'
|
||||||
|
asset_name: scrutiny-collector-metrics-windows-amd64
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
@@ -34,7 +34,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version_bump_type: ${{ github.event.inputs.version_bump_type }}
|
version_bump_type: ${{ github.event.inputs.version_bump_type }}
|
||||||
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
|
||||||
github_token: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }} # Leave this line unchanged
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $(dirname "$PROJECT_PATH")
|
mkdir -p $(dirname "$PROJECT_PATH")
|
||||||
|
|||||||
+3
-1
@@ -23,7 +23,9 @@ analogj/scrutiny
|
|||||||
The frontend is written in Angular.
|
The frontend is written in Angular.
|
||||||
If you're working on the frontend and can use mocked data rather than a real backend, you can use
|
If you're working on the frontend and can use mocked data rather than a real backend, you can use
|
||||||
```
|
```
|
||||||
cd webapp/frontend && ng serve
|
cd webapp/frontend
|
||||||
|
npm install
|
||||||
|
ng serve
|
||||||
```
|
```
|
||||||
|
|
||||||
However, if you need to also run the backend, and use real data, you'll need to run the following command:
|
However, if you need to also run the backend, and use real data, you'll need to run the following command:
|
||||||
|
|||||||
@@ -14,10 +14,11 @@
|
|||||||
[](https://goreportcard.com/report/github.com/AnalogJ/scrutiny)
|
[](https://goreportcard.com/report/github.com/AnalogJ/scrutiny)
|
||||||
[](https://github.com/AnalogJ/scrutiny/releases)
|
[](https://github.com/AnalogJ/scrutiny/releases)
|
||||||
|
|
||||||
|
|
||||||
WebUI for smartd S.M.A.R.T monitoring
|
WebUI for smartd S.M.A.R.T monitoring
|
||||||
|
|
||||||
> NOTE: Scrutiny is a Work-in-Progress and still has some rough edges.
|
> NOTE: Scrutiny is a Work-in-Progress and still has some rough edges.
|
||||||
|
>
|
||||||
|
> WARNING: Once the [InfluxDB](https://github.com/AnalogJ/scrutiny/tree/influxdb) branch is merged, Scrutiny will use both sqlite and InfluxDB for data storage. Unfortunately, this may not be backwards compatible with the database structures in the master (sqlite only) branch.
|
||||||
|
|
||||||
[](https://imgur.com/a/5k8qMzS)
|
[](https://imgur.com/a/5k8qMzS)
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ COPY --from=backendbuild /go/src/github.com/analogj/scrutiny/scrutiny-collector-
|
|||||||
COPY --from=backendbuild /go/src/github.com/analogj/scrutiny/scrutiny-collector-metrics /scrutiny/bin/
|
COPY --from=backendbuild /go/src/github.com/analogj/scrutiny/scrutiny-collector-metrics /scrutiny/bin/
|
||||||
RUN chmod +x /scrutiny/bin/scrutiny-collector-selftest && \
|
RUN chmod +x /scrutiny/bin/scrutiny-collector-selftest && \
|
||||||
chmod +x /scrutiny/bin/scrutiny-collector-metrics && \
|
chmod +x /scrutiny/bin/scrutiny-collector-metrics && \
|
||||||
|
chmod +x /entrypoint-collector.sh && \
|
||||||
chmod 0644 /etc/cron.d/scrutiny && \
|
chmod 0644 /etc/cron.d/scrutiny && \
|
||||||
rm -f /etc/cron.daily/apt /etc/cron.daily/dpkg /etc/cron.daily/passwd
|
rm -f /etc/cron.daily/apt /etc/cron.daily/dpkg /etc/cron.daily/passwd
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
# Cron runs in its own isolated environment (usually using only /etc/environment )
|
# Cron runs in its own isolated environment (usually using only /etc/environment )
|
||||||
# So when the container starts up, we will do a dump of the runtime environment into a .env file that we
|
# So when the container starts up, we will do a dump of the runtime environment into a .env file that we
|
||||||
# will then source into the crontab file (/etc/cron.d/scrutiny.sh)
|
# will then source into the crontab file (/etc/cron.d/scrutiny.sh)
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ package version
|
|||||||
|
|
||||||
// VERSION is the app-global version string, which will be replaced with a
|
// VERSION is the app-global version string, which will be replaced with a
|
||||||
// new value during packaging
|
// new value during packaging
|
||||||
const VERSION = "0.3.10"
|
const VERSION = "0.3.12"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const treoBreakpoints = {'xs': '(min-width: 0) and (max-width: 599px)', 'sm': '(min-width: 600px) and (max-width: 959px)', 'md': '(min-width: 960px) and (max-width: 1279px)', 'lg': '(min-width: 1280px) and (max-width: 1439px)', 'xl': '(min-width: 1440px)', 'lt-md': '(max-width: 959px)', 'lt-lg': '(max-width: 1279px)', 'lt-xl': '(max-width: 1439px)', 'gt-xs': '(min-width: 600px)', 'gt-sm': '(min-width: 960px)', 'gt-md': '(min-width: 1280px)'};
|
export const treoBreakpoints = {'xs': '(min-width: 0) and (max-width: 599px)', 'sm': '(min-width: 600px) and (max-width: 959px)', 'md': '(min-width: 960px) and (max-width: 1279px)', 'lg': '(min-width: 1280px) and (max-width: 1439px)', 'xl': '(min-width: 1440px)', 'lt-md': '(max-width: 200px)', 'lt-lg': '(max-width: 1279px)', 'lt-xl': '(max-width: 1439px)', 'gt-xs': '(min-width: 600px)', 'gt-sm': '(min-width: 960px)', 'gt-md': '(min-width: 1280px)'};
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<div class="flex flex-wrap w-full">
|
<div class="flex flex-wrap w-full">
|
||||||
|
|
||||||
<div *ngFor="let disk of data.data | deviceSort" class="flex w-1/2 min-w-80 p-4">
|
<div *ngFor="let disk of data.data | deviceSort" class="flex gt-sm:w-1/2 min-w-80 p-4">
|
||||||
<div [ngClass]="{'border-green': disk.smart_results[0]?.smart_status == 'passed',
|
<div [ngClass]="{'border-green': disk.smart_results[0]?.smart_status == 'passed',
|
||||||
'border-red': disk.smart_results[0]?.smart_status == 'failed' }"
|
'border-red': disk.smart_results[0]?.smart_status == 'failed' }"
|
||||||
class="relative flex flex-col flex-auto p-6 pr-3 pb-3 bg-card rounded border-l-4 shadow-md overflow-hidden">
|
class="relative flex flex-col flex-auto p-6 pr-3 pb-3 bg-card rounded border-l-4 shadow-md overflow-hidden">
|
||||||
|
|||||||
Reference in New Issue
Block a user