mirror of https://github.com/statping/statping
fix for https://github.com/statping/statping/issues/842, additional columns for language CSV, modified cache routine to 60 seconds
parent
bdbaf8cbca
commit
4c6b9e6a35
|
@ -2,6 +2,8 @@
|
|||
- Merged PR #806 - Enhance GRPC Monitoring
|
||||
- Merged PR #692 - When login fields are autofilled the sign in button should be enabled
|
||||
- Modified multiple Vue forms to use number models for integer inputs
|
||||
- Fixed page freeze issue for incidents https://github.com/statping/statping/issues/842
|
||||
- Modified cache routine from 5 seconds to 60 seconds
|
||||
|
||||
# 0.90.69 (09-18-2020)
|
||||
- Fixed issue with service view not loading. #808 #811 #800
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
<span class="badge badge-info float-right text-uppercase mt-1">{{notifier.logs.length}}</span>
|
||||
</div>
|
||||
<div class="card-body" :class="{'d-none': !expanded_logs}">
|
||||
<div v-for="(log, i) in notifier.logs.reverse()" class="alert" :class="{'alert-danger': log.error, 'alert-dark': !log.success && !log.error, 'alert-success': log.success && !log.error}">
|
||||
<div v-for="(log, i) in notifier.logs" class="alert" :class="{'alert-danger': log.error, 'alert-dark': !log.success && !log.error, 'alert-success': log.success && !log.error}">
|
||||
<span class="d-block">
|
||||
Service {{log.service}}
|
||||
{{log.success ? "Success Triggered" : "Failure Triggered"}}
|
||||
|
@ -197,9 +197,7 @@ export default {
|
|||
required: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
watch: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
@ -227,7 +225,7 @@ export default {
|
|||
autoRefresh: true,
|
||||
mime: this.notifier.data_type === "json" ? "application/json" : "text/plain"
|
||||
},
|
||||
beautifySettings: { indent_size: 2, space_in_empty_paren: true },
|
||||
beautifySettings: {indent_size: 2, space_in_empty_paren: true},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -254,18 +252,18 @@ export default {
|
|||
if (this.notifier.data_type === "json") {
|
||||
this.success_data = beautify(this.notifier.success_data, this.beautifySettings)
|
||||
}
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
cm.refresh();
|
||||
},1);
|
||||
}, 1);
|
||||
},
|
||||
onCmFailureReady(cm) {
|
||||
this.failure_data = this.notifier.failure_data
|
||||
if (this.notifier.data_type === "json") {
|
||||
this.failure_data = beautify(this.notifier.failure_data, this.beautifySettings)
|
||||
}
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
cm.refresh();
|
||||
},1);
|
||||
}, 1);
|
||||
},
|
||||
async enableToggle() {
|
||||
this.notifier.enabled = !!this.notifier.enabled
|
||||
|
@ -298,7 +296,7 @@ export default {
|
|||
this.saved = true
|
||||
this.loading = false
|
||||
},
|
||||
async testNotifier(method="success") {
|
||||
async testNotifier(method = "success") {
|
||||
this.success = false
|
||||
this.loadingTest = true
|
||||
this.form.method = this.notifier.method
|
||||
|
|
|
@ -27,7 +27,7 @@ type Item struct {
|
|||
|
||||
// cleanRoutine is a go routine to automatically remove expired caches that haven't been hit recently
|
||||
func cleanRoutine(s *Storage) {
|
||||
duration := 5 * time.Second
|
||||
duration := 60 * time.Second
|
||||
|
||||
CacheRoutine:
|
||||
for {
|
||||
|
@ -40,7 +40,7 @@ CacheRoutine:
|
|||
s.Delete(k)
|
||||
}
|
||||
}
|
||||
duration = 5 * time.Second
|
||||
duration = 60 * time.Second
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,8 @@ func (s Storage) List() map[string]Item {
|
|||
|
||||
//Get a cached content by key
|
||||
func (s Storage) Get(key string) []byte {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
item := s.items[key]
|
||||
if item.Expired() {
|
||||
CacheStorage.Delete(key)
|
||||
|
|
Loading…
Reference in New Issue