Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
release: 1.2.0. (#59)
Browse files Browse the repository at this point in the history
release: 1.2.0.

Co-authored-by: Ryan Wang <[email protected]>
Co-authored-by: John Niang <[email protected]>
  • Loading branch information
ruibaby and JohnNiang authored Jan 5, 2020
2 parents 31d24cd + 9511071 commit 92e965a
Show file tree
Hide file tree
Showing 83 changed files with 8,584 additions and 8,789 deletions.
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules/*
/.idea/*
/.git/*
/.github/*
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/

notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
11,098 changes: 4,357 additions & 6,741 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 26 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
{
"name": "halo-admin",
"version": "1.1.2",
"private": true,
"version": "1.2.0",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"animate.css": "^3.7.0",
"ant-design-vue": "^1.4.1",
"axios": "^0.18.0",
"ant-design-vue": "^1.4.10",
"axios": "^0.19.0",
"enquire.js": "^2.1.6",
"filepond": "^4.7.2",
"filepond-plugin-image-preview": "^4.5.0",
"halo-editor": "^2.7.6",
"marked": "^0.6.3",
"filepond": "^4.9.2",
"filepond-plugin-image-preview": "^4.6.0",
"halo-editor": "^2.8.2",
"marked": "^0.8.0",
"moment": "^2.24.0",
"nprogress": "^0.2.0",
"verte": "^0.0.12",
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-clipboard2": "^0.3.0",
"vue-codemirror-lite": "^1.0.4",
"vue-count-to": "^1.0.13",
"vue-filepond": "^5.1.3",
"vue-dplayer": "0.0.10",
"vue-filepond": "^6.0.0",
"vue-ls": "^3.2.1",
"vue-router": "^3.1.3",
"vue-video-player": "^5.0.2",
"vuejs-logger": "^1.5.3",
"vuex": "^3.1.1"
},
"devDependencies": {
"@babel/polyfill": "^7.4.4",
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-plugin-unit-jest": "^3.8.0",
"@vue/cli-plugin-unit-jest": "^4.1.1",
"@vue/cli-service": "^3.8.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.20",
Expand All @@ -46,11 +43,13 @@
"eslint": "^5.16.0",
"eslint-plugin-html": "^5.0.5",
"eslint-plugin-vue": "^5.2.3",
"flv.js": "^1.5.0",
"generate-asset-webpack-plugin": "^0.3.0",
"less": "^3.10.0",
"less-loader": "^5.0.0",
"vue-svg-component-runtime": "^1.0.1",
"vue-svg-icon-loader": "^2.1.1",
"vue-template-compiler": "^2.6.10"
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
Expand Down Expand Up @@ -126,5 +125,16 @@
"> 1%",
"last 2 versions",
"not ie <= 10"
]
],
"description": "Halo admin client.",
"repository": {
"type": "git",
"url": "git+https://github.com/halo-dev/halo-admin.git"
},
"author": "halo-dev",
"license": "ISC",
"bugs": {
"url": "https://github.com/halo-dev/halo-admin/issues"
},
"homepage": "https://github.com/halo-dev/halo-admin#readme"
}
Binary file added public/images/placeholder.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/placeholder.png
Binary file not shown.
12 changes: 10 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="robots" content="noindex,nofllow" />
<meta name="generator" content="Halo" />
<meta name="generator" content="Halo 1.2.0" />
<link rel="icon" href="<%= BASE_URL %>logo.png" />
<title>Halo Dashboard</title>
<style>
#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
body {height: 100%;background-color: #f5f5f5;}#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
</style>
<!-- require cdn assets css -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
<% } %>
</head>

<body>
Expand All @@ -22,6 +26,10 @@
<div id="app">
<div id="loader"></div>
</div>
<!-- require cdn assets js -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
<!-- built files will be auto injected -->
</body>

Expand Down
84 changes: 84 additions & 0 deletions src/api/actuator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import service from '@/utils/service'

const baseUrl = '/api/admin/actuator'

const actuatorApi = {}

actuatorApi.logfile = () => {
return service({
url: `${baseUrl}/logfile`,
method: 'get'
})
}

actuatorApi.env = () => {
return service({
url: `${baseUrl}/env`,
method: 'get'
})
}

actuatorApi.getSystemCpuCount = () => {
return service({
url: `${baseUrl}/metrics/system.cpu.count`,
method: 'get'
})
}

actuatorApi.getSystemCpuUsage = () => {
return service({
url: `${baseUrl}/metrics/system.cpu.usage`,
method: 'get'
})
}

actuatorApi.getProcessUptime = () => {
return service({
url: `${baseUrl}/metrics/process.uptime`,
method: 'get'
})
}

actuatorApi.getProcessStartTime = () => {
return service({
url: `${baseUrl}/metrics/process.start.time`,
method: 'get'
})
}

actuatorApi.getProcessCpuUsage = () => {
return service({
url: `${baseUrl}/metrics/process.cpu.usage`,
method: 'get'
})
}

actuatorApi.getJvmMemoryMax = () => {
return service({
url: `${baseUrl}/metrics/jvm.memory.max`,
method: 'get'
})
}

actuatorApi.getJvmMemoryCommitted = () => {
return service({
url: `${baseUrl}/metrics/jvm.memory.committed`,
method: 'get'
})
}

actuatorApi.getJvmMemoryUsed = () => {
return service({
url: `${baseUrl}/metrics/jvm.memory.used`,
method: 'get'
})
}

actuatorApi.getJvmGcPause = () => {
return service({
url: `${baseUrl}/metrics/jvm.gc.pause`,
method: 'get'
})
}

export default actuatorApi
48 changes: 46 additions & 2 deletions src/api/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const adminApi = {}
adminApi.counts = () => {
return service({
url: `${baseUrl}/counts`,
method: 'get',
mute: true
method: 'get'
})
}

Expand Down Expand Up @@ -82,4 +81,49 @@ adminApi.updateAdminAssets = () => {
timeout: 600 * 1000
})
}

adminApi.getApplicationConfig = () => {
return service({
url: `${baseUrl}/spring/application.yaml`,
method: 'get'
})
}

adminApi.updateApplicationConfig = content => {
return service({
url: `${baseUrl}/spring/application.yaml`,
params: {
content: content
},
method: 'put'
})
}

adminApi.restartApplication = () => {
return service({
url: `${baseUrl}/spring/restart`,
method: 'post'
})
}

adminApi.getLogFiles = lines => {
return service({
url: `${baseUrl}/halo/logfile`,
params: {
lines: lines
},
method: 'get'
})
}

adminApi.downloadLogFiles = lines => {
return service({
url: `${baseUrl}/halo/logfile/download`,
params: {
lines: lines
},
method: 'get'
})
}

export default adminApi
42 changes: 30 additions & 12 deletions src/api/attachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ attachmentApi.delete = attachmentId => {
})
}

attachmentApi.deleteInBatch = attachmentIds => {
return service({
url: `${baseUrl}`,
method: 'delete',
data: attachmentIds,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}

attachmentApi.update = (attachmentId, attachment) => {
return service({
url: `${baseUrl}/${attachmentId}`,
Expand All @@ -42,6 +53,13 @@ attachmentApi.getMediaTypes = () => {
})
}

attachmentApi.getTypes = () => {
return service({
url: `${baseUrl}/types`,
method: 'get'
})
}

attachmentApi.CancelToken = axios.CancelToken
attachmentApi.isCancel = axios.isCancel

Expand Down Expand Up @@ -69,31 +87,31 @@ attachmentApi.uploads = (formDatas, uploadProgress, cancelToken) => {

attachmentApi.type = {
LOCAL: {
type: 'local',
type: 'LOCAL',
text: '本地'
},
SMMS: {
type: 'smms',
type: 'SMMS',
text: 'SM.MS'
},
UPYUN: {
type: 'upyun',
UPOSS: {
type: 'UPOSS',
text: '又拍云'
},
QNYUN: {
type: 'qnyun',
QINIUOSS: {
type: 'QINIUOSS',
text: '七牛云'
},
ALIYUN: {
type: 'aliyun',
ALIOSS: {
type: 'ALIOSS',
text: '阿里云'
},
BAIDUYUN: {
type: 'baiduyun',
BAIDUBOS: {
type: 'BAIDUBOS',
text: '百度云'
},
TENCENTYUN: {
type: 'tencentyun',
TENCENTCOS: {
type: 'TENCENTCOS',
text: '腾讯云'
}
}
Expand Down
25 changes: 25 additions & 0 deletions src/api/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,29 @@ backupApi.importMarkdown = (formData, uploadProgress, cancelToken) => {
})
}

backupApi.backupHalo = () => {
return service({
url: `${baseUrl}/halo`,
method: 'post',
timeout: 8640000 // 24 hours
})
}

backupApi.listHaloBackups = () => {
return service({
url: `${baseUrl}/halo`,
method: 'get'
})
}

backupApi.deleteHaloBackup = filename => {
return service({
url: `${baseUrl}/halo`,
params: {
filename: filename
},
method: 'delete'
})
}

export default backupApi
Loading

0 comments on commit 92e965a

Please sign in to comment.