Skip to content
Permalink
Browse files

fix loading time

  • Loading branch information...
mlabouardy committed Apr 22, 2019
1 parent c5f6220 commit c166eccc00cfa330db2edd1486d9b81c428ebfc0
@@ -44,7 +44,7 @@
<li>
<div class="notif-center">
<a href="#" *ngFor="let notification of notifications">
<div class="notif-icon notif-primary">
<div class="notif-icon notif-danger">
<i class="la la-user-plus"></i>
</div>
<div class="notif-content">
@@ -145,10 +145,10 @@
<a class="nav-link" href="https://www.github.com/komiser">GitHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Help</a>
<a class="nav-link" href="https://docs.komiser.io">Help</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Licenses</a>
<a class="nav-link" href="https://www.komiser.io">Licenses</a>
</li>
</ul>
</nav>
@@ -234,9 +234,15 @@ export class ComputeComponent implements OnInit, AfterViewInit {
let serie = []
for (let j = 0; j < periods.length; j++) {
let item = data.history[j].groups[i]
serie.push({
meta: item.key, value: item.amount.toFixed(2)
})
if(item){
serie.push({
meta: item.key, value: item.amount.toFixed(2)
})
}else{
serie.push({
meta: 'others', value: 0
})
}
}
series.push(serie)
}
@@ -238,7 +238,7 @@ export class DashboardComponent implements OnInit, AfterViewInit {

? (Math.abs(Number(labelValue)) / 1.0e+3).toFixed(2) + " K"

: Math.abs(Number(labelValue));
: Math.abs(Number(labelValue)).toFixed(2);

}

@@ -171,7 +171,7 @@ export class StorageComponent implements OnInit {
});

this.awsService.getRDSInstances().subscribe(data => {
this.docdbInstances = data.docdb;
this.docdbInstances = data.docdb ? data.docdb : 0;
let total = 0;
Object.keys(data).forEach(key => {
if (key != "docdb") {
@@ -1,6 +1,7 @@
package cache

import (
"log"
"time"

memoryCache "github.com/patrickmn/go-cache"
@@ -12,13 +13,14 @@ type Memory struct {
}

func (m *Memory) Connect() {
m.cache = memoryCache.New(m.Expiration*time.Minute, m.Expiration*time.Minute)
m.cache = memoryCache.New(time.Duration(m.Expiration)*time.Minute, time.Duration(m.Expiration)*time.Minute)
log.Println("Using in-memory cache")
}

func (m *Memory) Get(key string) (interface{}, bool) {
return m.cache.Get(key)
}

func (m *Memory) Set(key string, value interface{}) {
m.cache.Set(key, value, m.Expiration)
m.cache.Set(key, value, time.Duration(m.Expiration)*time.Minute)
}

0 comments on commit c166ecc

Please sign in to comment.
You can’t perform that action at this time.