3 Commits

Author SHA1 Message Date
Andrei Pohilko
7de7c85426 Release 0.2.8 2022-11-24 16:01:36 +00:00
Andrei Pohilko
8e65c555e0 Fix analytics is enabled while in dev 2022-11-24 15:22:50 +00:00
Andrei Pohilko
2557e6b73d Don't complain if repo is not found for chart
Fixes #116
2022-11-24 15:15:20 +00:00
5 changed files with 12 additions and 11 deletions

View File

@@ -27,12 +27,12 @@ jobs:
needs: pre_release needs: pre_release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Plugin version/Tag name Check #- name: Plugin version/Tag name Check
if: needs.pre_release.outputs.release_tag != needs.pre_release.outputs.plugin_version # if: needs.pre_release.outputs.release_tag != needs.pre_release.outputs.plugin_version
uses: actions/github-script@v3 # uses: actions/github-script@v3
with: # with:
script: | # script: |
core.setFailed('Plugin version and tag name are not equivalent!') # core.setFailed('Plugin version and tag name are not equivalent!')
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:

View File

@@ -36,7 +36,7 @@ func (s Server) StartServer() (string, utils.ControlChan) {
os.Exit(1) // TODO: propagate error instead? os.Exit(1) // TODO: propagate error instead?
} }
isDevModeWithAnalytics := os.Getenv("HD_DEV_ANALYTICS") == "true" isDevModeWithAnalytics := os.Getenv("HD_DEV_ANALYTICS") == "true"
enableAnalytics := !s.NoTracking || isDevModeWithAnalytics enableAnalytics := (!s.NoTracking && s.Version != "0.0.0") || isDevModeWithAnalytics
data.StatusInfo = &subproc.StatusInfo{ data.StatusInfo = &subproc.StatusInfo{
CurVer: s.Version, CurVer: s.Version,
Analytics: enableAnalytics, Analytics: enableAnalytics,

View File

@@ -48,11 +48,12 @@ function buildChartCard(elm) {
const chartNameRegex = 'v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?' const chartNameRegex = 'v?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?'
const chartName = elm.chart.substring(0, elm.chart.match(chartNameRegex).index - 1) const chartName = elm.chart.substring(0, elm.chart.match(chartNameRegex).index - 1)
$.getJSON("/api/helm/repo/search?name=" + chartName).fail(function (xhr) { $.getJSON("/api/helm/repo/search?name=" + chartName).fail(function (xhr) {
reportError("Failed to get repo name for charts", xhr) // we're ok if we can't show icon and description
console.log("Failed to get repo name for charts", xhr)
}).done(function (data) { }).done(function (data) {
if (data.length > 0) { if (data.length > 0) {
$.getJSON("/api/helm/charts/show?name=" + data[0].name).fail(function (xhr) { $.getJSON("/api/helm/charts/show?name=" + data[0].name).fail(function (xhr) {
reportError("Failed to get list of charts", xhr) console.log("Failed to get chart", xhr)
}).done(function (data) { }).done(function (data) {
if (data) { if (data) {
const res = data[0]; const res = data[0];

View File

@@ -28,7 +28,7 @@ type Cache struct {
} }
func NewCache() *Cache { func NewCache() *Cache {
gocacheClient := gocache.New(5*time.Minute, 10*time.Minute) gocacheClient := gocache.New(60*time.Minute, 10*time.Minute)
gocacheStore := store.NewGoCache(gocacheClient) gocacheStore := store.NewGoCache(gocacheClient)
// TODO: use tiered cache with some disk backend, allow configuring that static cache folder // TODO: use tiered cache with some disk backend, allow configuring that static cache folder

View File

@@ -1,5 +1,5 @@
name: "dashboard" name: "dashboard"
version: "0.2.7" version: "0.2.8"
usage: "A simplified way of working with Helm" usage: "A simplified way of working with Helm"
description: "View HELM situation in nice web UI" description: "View HELM situation in nice web UI"
command: "$HELM_PLUGIN_DIR/bin/helm-dashboard" command: "$HELM_PLUGIN_DIR/bin/helm-dashboard"