提交 68b8f1ed 编写于 作者: Z zhaoke

* Fix add site issue.

上级 ed13fd67
......@@ -3,6 +3,12 @@ package scriptHelper
import (
"encoding/json"
"fmt"
"io/ioutil"
"path"
"regexp"
"strconv"
"strings"
commConsts "github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain "github.com/easysoft/zentaoatf/internal/pkg/domain"
langHelper "github.com/easysoft/zentaoatf/internal/pkg/helper/lang"
......@@ -15,11 +21,6 @@ import (
logUtils "github.com/easysoft/zentaoatf/pkg/lib/log"
stringUtils "github.com/easysoft/zentaoatf/pkg/lib/string"
"github.com/kataras/iris/v12"
"io/ioutil"
"path"
"regexp"
"strconv"
"strings"
)
func LoadScriptTreeByDir(workspace model.Workspace, scriptIdsFromZentao map[int]string) (asset serverDomain.TestAsset, err error) {
......@@ -36,7 +37,7 @@ func LoadScriptTreeByDir(workspace model.Workspace, scriptIdsFromZentao map[int]
WorkspaceId: workspaceId,
WorkspaceType: workspace.Type,
Path: workspaceDir,
Title: fileUtils.GetDirName(workspaceDir),
Title: workspace.Name,
Slots: iris.Map{"icon": "icon"},
Checkable: true,
......
......@@ -352,7 +352,11 @@ func FixSiteUlt(url string) (ret string) {
ret = url
} else {
index := strings.LastIndex(url, "/")
ret = url[:index+1]
if url[index+1:] != "zentao" {
ret = url[:index+1]
} else {
ret = url
}
}
return
......
......@@ -17,7 +17,7 @@ BUILD_CMD=go build -ldflags "-X 'commConsts.appVersion=${VERSION}' -X 'commConst
default: win64 win32 linux mac
win64: prepare build_gui_win64 compile_command_win64 copy_files_win64 create_shortcut_win64 zip_win64
win32: prepare build_gui_win32 compile_command_win32 copy_files_win32 create_shortcut_win32 zip_win32
win32: prepare compile_ui build_gui_win32 compile_command_win32 copy_files_win32 create_shortcut_win32 zip_win32
linux: prepare build_gui_linux compile_command_linux copy_files_linux create_shortcut_linux zip_linux
mac: prepare build_gui_mac compile_command_mac copy_files_mac create_shortcut_mac zip_mac
......
......@@ -602,7 +602,7 @@ const syncFromZentaoSubmit = (model) => {
store.dispatch("Script/syncFromZentao", model).then((resp) => {
if (resp.code === 0) {
notification.success({
message: t("sync_success"),
message: t("sync_success", {success: resp.data.length, ignore:0}),
});
showSyncFromZentaoModal.value = false;
syncFromZentaoRef.value.clearFormData()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册