-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from unarxiv/dashboard
Dashboard
- Loading branch information
Showing
31 changed files
with
758 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/shirou/gopsutil/cpu" | ||
"github.com/shirou/gopsutil/host" | ||
"github.com/shirou/gopsutil/mem" | ||
) | ||
|
||
type SystemInfo struct { | ||
CpuName string `json:"cpu"` | ||
Memory uint64 `json:"memory"` | ||
Platform string `json:"platform"` | ||
Os string `json:"os"` | ||
PlatformVersion string `json:"platformVersion"` | ||
} | ||
|
||
func getSystemInfo() SystemInfo { | ||
var systemInfo SystemInfo | ||
v, _ := mem.VirtualMemory() | ||
systemInfo.Memory = v.Total | ||
platform, _ := host.Info() | ||
systemInfo.Platform = platform.Platform | ||
systemInfo.PlatformVersion = platform.PlatformVersion | ||
systemInfo.Os = platform.OS | ||
|
||
// Handle CPU | ||
cpuInfo, _ := cpu.Info() | ||
systemInfo.CpuName = cpuInfo[0].ModelName | ||
return systemInfo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package main | ||
|
||
import ( | ||
"strconv" | ||
"net" | ||
"os" | ||
"os/user" | ||
"path/filepath" | ||
"strconv" | ||
"time" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<v-card> | ||
<v-card-title> | ||
<h2>Actions</h2> | ||
</v-card-title> | ||
<v-card-actions> | ||
<v-btn color="indigo darken-1" outline @click="triggerDialog('test')">Test</v-btn> | ||
</v-card-actions> | ||
<v-dialog v-model="enableTest"> | ||
<cvpm-request | ||
v-if="enableTest" | ||
v-on:closeDialog="triggerDialog('test')" | ||
:config="config" | ||
:vendor="vendor" | ||
:packageName="packageName" | ||
></cvpm-request> | ||
</v-dialog> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
import cvpmRequest from '@/components/CVPM-Request' | ||
export default { | ||
data () { | ||
return { | ||
enableTest: false | ||
} | ||
}, | ||
methods: { | ||
triggerDialog (name) { | ||
if (name === 'test') { | ||
this.enableTest = !this.enableTest | ||
} else { | ||
} | ||
} | ||
}, | ||
components: { | ||
'cvpm-request': cvpmRequest | ||
}, | ||
props: ['config', 'vendor', 'packageName'] | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.