Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
Signed-off-by: DESKTOP-O5B4JN6\ooeeo <[email protected]>
  • Loading branch information
Teeoo committed May 25, 2021
0 parents commit 37983de
Show file tree
Hide file tree
Showing 49 changed files with 10,644 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WS_SERVER=ws://127.0.0.1:3399
34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/essential',
'eslint:recommended',
'@vue/typescript/recommended',
'@vue/prettier',
'@vue/prettier/@typescript-eslint',
'plugin:prettier/recommended'
],
parserOptions: {
ecmaVersion: 2020
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'prettier/prettier': [
'warn',
{
singleQuote: true,
semi: false,
trailingComma: 'none'
}
],
'no-empty': 0,
'@typescript-eslint/ban-types': 'error',
quotes: [1, 'single'],
semi: [2, 'never'],
'space-before-function-paren': [0, 'always']
}
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
semi: false,
trailingComma: 'none',
singleQuote: true,
printWidth: 100,
tabWidth: 4,
useTabs: true,
bracketSpacing: true,
eslintIntegration: true
}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# panel

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn serve
```

### Compiles and minifies for production
```
yarn build
```

### Lints and fixes files
```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@vue/cli-plugin-babel/preset']
}
55 changes: 55 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "panel",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"dayjs": "^1.10.4",
"echarts": "4.9.0",
"register-service-worker": "^1.7.1",
"socket.io-client": "^2.1.1",
"v-charts": "^1.19.0",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-codemirror": "^4.0.6",
"vue-count-to": "^1.0.13",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.2.0",
"vue-snotify": "^3.2.1",
"vue-socket.io": "^3.0.10",
"vuetify": "^2.4.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@mdi/font": "^5.9.55",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"material-design-icons-iconfont": "^6.1.0",
"prettier": "^2.2.1",
"sass": "^1.32.0",
"sass-loader": "^10.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"typescript": "~4.1.5",
"vue-cli-plugin-vuetify": "~2.3.1",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.0"
}
}
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/img/icons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/msapplication-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/img/icons/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
2 changes: 2 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:
8 changes: 8 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div>
<vue-snotify></vue-snotify>
<transition name="scroll-y-transition">
<router-view />
</transition>
</div>
</template>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions src/components/WidgetItems.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<template>
<v-col cols="12" xs="6" sm="6" md="3">
<v-card class="mx-auto" flat>
<v-list-item three-line>
<v-list-item-avatar size="80">
<v-icon size="64" :color="color">
{{ icon }}
</v-icon>
</v-list-item-avatar>

<v-list-item-content>
<v-list-item-title class="title font-weight-light">
{{ title }}
</v-list-item-title>
<v-list-item-subtitle>
<count-to
:start-val="start"
:end-val="end"
:duration="duration"
class="title font-weight-bold"
/>
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</v-card>
</v-col>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import CountTo from 'vue-count-to'
@Component<WidgetItems>({
components: {
CountTo
}
})
export default class WidgetItems extends Vue {
@Prop({ type: String, required: true })
title!: string
@Prop({ type: String, required: true })
icon!: string
@Prop({ type: String, required: true })
color!: string
@Prop({ type: String, required: true })
chart!: string
@Prop({ type: Number, required: true })
start!: number
@Prop({ type: Number, required: true })
end!: number
@Prop({ type: Number, required: true })
duration!: number
}
</script>
69 changes: 69 additions & 0 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<v-app>
<v-navigation-drawer app hide-overlay floating inverted-scroll v-model="drawer">
<v-list dense nav shaped>
<v-list-item>
<v-list-item-avatar>
<v-avatar>
<v-icon>mdi-robot-outline</v-icon>
</v-avatar>
</v-list-item-avatar>

<v-list-item-content>
<v-list-item-title class="title">OPQ</v-list-item-title>
<v-list-item-subtitle>panel</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<template v-for="item in menu">
<v-subheader
v-if="item.header"
:key="item.header"
v-text="item.header"
></v-subheader>
<v-list-item v-else :key="item.title" link :to="item.path">
<v-list-item-icon>
<v-icon :color="item.color">{{ item.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</template>
</v-list>
</v-navigation-drawer>
<v-app-bar app color="white" flat>
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-github</v-icon>
</v-btn>
</v-app-bar>
<v-main>
<v-container fluid>
<transition>
<router-view></router-view>
</transition>
</v-container>
</v-main>
<v-footer app>
<!-- -->
</v-footer>
</v-app>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component<Layout>({
sockets: {
connect: () => {
// TODO:
}
}
})
export default class Layout extends Vue {
drawer = true
menu = [
{ icon: 'home', color: 'purple', title: '控制台', path: '/dashboard' },
{ icon: 'mdi-eye-settings-outline', color: 'pink', title: '插件', path: '/plugins' }
]
}
</script>
15 changes: 15 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import { vuetify } from '@/plugins'

Vue.config.productionTip = false

new Vue({
router,
store,
vuetify,
render: (h) => h(App)
}).$mount('#app')
43 changes: 43 additions & 0 deletions src/models/SystemInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export interface SystemInfo {
isLoading?: boolean
CPUH?: number
CPUName?: string
ClusterInfo?: ClusterInfo
IP?: string
MMInfo?: string
MoneyCount?: string
OPQVersion?: string
OS?: string
OSSName?: string
Plugins?: number
QQUsersCounts?: number
RunTime?: string
SystemUsage?: SystemUsage
TotalMoney?: string
UPtime?: string
}

export interface ClusterInfo {
Alloc?: string
CpuNum?: number
FreesTimes?: number
GCTime?: string
GoArch?: string
GoVersion?: string
GoroutineNum: number
LastGCTime?: string
MallocsTimes?: number
NextGC?: string
Platform?: string
ServerRuntime?: string
Sys?: string
TotalAlloc?: string
}

export interface SystemUsage {
data?: string
CpuUsage: string
MemUsage: string
NetReceive: number
NetSend: number
}
Loading

0 comments on commit 37983de

Please sign in to comment.