Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
cym1102 committed Sep 11, 2022
1 parent c41c19a commit 18e3fe4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 26 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Windows上倒是有不错的svn服务端软件即VisualSVN, 但一来Windows服


#### 安装说明
以Ubuntu操作系统为例,

1.安装java运行环境和Subversion

Expand Down Expand Up @@ -78,9 +77,9 @@ Path : JDK安装目录\bin
2.下载最新版发行包jar

```
Linux: wget -O /home/svnWebUI/svnWebUI.jar http://file.nginxwebui.cn/svnWebUI-1.7.0.jar
Linux: wget -O /home/svnWebUI/svnWebUI.jar http://file.nginxwebui.cn/svnWebUI-1.7.2.jar
Windows: 直接使用浏览器下载 http://file.nginxwebui.cn/svnWebUI-1.7.0.jar
Windows: 直接使用浏览器下载 http://file.nginxwebui.cn/svnWebUI-1.7.2.jar
```

有新版本只需要修改路径中的版本即可
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.cym</groupId>
<artifactId>svnWebUI</artifactId>
<version>1.7.0</version>
<version>1.7.2</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>org.noear</groupId>
<artifactId>solon-parent</artifactId>
<version>1.9.3</version>
<version>1.10.2</version>
</parent>

<dependencies>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/cym/config/InitConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public void init() {
httpdUtils.modHttpdPort(settingService.get("port"));
}

// 服务端启动
// 服务端先杀掉启动
configController.stop();
configController.start(settingService.get("port"), settingService.get("host"), settingService.get("protocol"));

// 预热定时任务
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/cym/controller/RepositoryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ public ModelAndView index(Page page, String keywords) {
url += "/" + repositoryExt.getName();
repositoryExt.setUrl(url);

String path = homeConfig.home + "repo" + File.separator + repositoryExt.getName();
File file = new File(path);
repositoryExt.setSize(FileUtil.readableFileSize(FileUtil.size(file)));
if (StrUtil.isNotEmpty(repositoryExt.getMark())) {
repositoryExt.setMark(repositoryExt.getMark().replace("\n", "<br>").replace(" ", "&nbsp;"));
}
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/com/cym/model/Repository.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public class Repository extends BaseModel {
// 全体权限 'r' 'rw' 'no'
@InitValue("no")
String allPermission;
// 文件夹大小
String size;
// 备注
String mark;
/**
Expand All @@ -38,14 +36,6 @@ public void setMark(String mark) {
this.mark = mark;
}

public String getSize() {
return size;
}

public void setSize(String size) {
this.size = size;
}

public String getAllPermission() {
return allPermission;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
<th>仓库名</th>
<th>url</th>
<th>启用</th>
<th>仓库大小</th>
<th>描述</th>
<th style="width: 250px">描述</th>
<th>全体授权</th>
<th>授权</th>
<th>操作</th>
Expand All @@ -76,7 +75,6 @@
</div>
</td>

<td>${repositoryExt.size}</td>
<td>
<#if repositoryExt.mark != null && repositoryExt.mark != "">
<a href="javascript:editMark('${repositoryExt.id}')" style="color: #bbbbbb; text-decoration: underline;">${repositoryExt.mark}</a>
Expand Down
14 changes: 10 additions & 4 deletions src/main/resources/static/js/adminPage/select_root.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function selectRoot(id, repositoryId) {
$("#selectRootOver").show();
$("#mkdir").show();
$("#rmfile").show();
showTree(data.obj.url);
$("#download").hide();
$("#rmfile").hide();

showTree(data.obj.url, true);
} else {
layer.msg(data.msg);
}
Expand All @@ -66,20 +69,23 @@ function selectRoot(id, repositoryId) {
function seeFile(url, permission) {
$("#selectOver").hide();
$("#selectRootOver").hide();

$("#download").show();
$("#rmfile").show();

if (permission == 'rw') {
$("#mkdir").show();
$("#rmfile").show();
} else {
$("#mkdir").hide();
$("#rmfile").hide();
}
showTree(url);
showTree(url, false);
}

function showTree(url) {
function showTree(url, check) {
svnUrl = url;
rootSelect.setting.async.url = ctx + '/adminPage/selectRoot/getFileList?url=' + encodeURIComponent(url);
rootSelect.setting.check.enable = check;
rootSelect.load();
rootSelect.index = layer.open({
type: 1,
Expand Down

0 comments on commit 18e3fe4

Please sign in to comment.