mirror of https://github.com/1Panel-dev/1Panel
fix: 移除调试打印信息
parent
2462ffdbab
commit
e55af04568
|
@ -3,6 +3,14 @@ package v1
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/backend/app/api/v1/helper"
|
||||
"github.com/1Panel-dev/1Panel/backend/app/dto"
|
||||
"github.com/1Panel-dev/1Panel/backend/app/dto/request"
|
||||
|
@ -14,13 +22,6 @@ import (
|
|||
websocket2 "github.com/1Panel-dev/1Panel/backend/utils/websocket"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gorilla/websocket"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// @Tags File
|
||||
|
@ -584,7 +585,6 @@ func (b *BaseApi) UploadChunkFiles(c *gin.Context) {
|
|||
if chunkIndex+1 == chunkCount {
|
||||
err = mergeChunks(filename, fileDir, c.PostForm("path"), chunkCount)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrAppDelete, err)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ func (u *BackupService) DownloadRecord(info dto.DownloadRecord) (string, error)
|
|||
tempPath := fmt.Sprintf("%sdownload%s", constant.DataDir, info.FileDir)
|
||||
if _, err := os.Stat(tempPath); err != nil && os.IsNotExist(err) {
|
||||
if err = os.MkdirAll(tempPath, os.ModePerm); err != nil {
|
||||
fmt.Println(err)
|
||||
global.LOG.Errorf("mkdir %s failed, err: %v", tempPath, err)
|
||||
}
|
||||
}
|
||||
targetPath := tempPath + info.FileName
|
||||
|
|
|
@ -2,7 +2,6 @@ package service
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -122,12 +121,8 @@ func (u *ContainerService) CreateVolume(req dto.VolumeCreat) error {
|
|||
DriverOpts: stringsToMap(req.Options),
|
||||
Labels: stringsToMap(req.Labels),
|
||||
}
|
||||
stat, err := client.VolumeCreate(context.TODO(), options)
|
||||
if err != nil {
|
||||
if _, err := client.VolumeCreate(context.TODO(), options); err != nil {
|
||||
return err
|
||||
}
|
||||
// if len(stat.CreatedAt) != 0 {
|
||||
fmt.Println(stat)
|
||||
// }
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ func (u *CronjobService) Download(down dto.CronjobDownload) (string, error) {
|
|||
tempPath := fmt.Sprintf("%s/download/%s", constant.DataDir, commonDir)
|
||||
if _, err := os.Stat(tempPath); err != nil && os.IsNotExist(err) {
|
||||
if err = os.MkdirAll(tempPath, os.ModePerm); err != nil {
|
||||
fmt.Println(err)
|
||||
global.LOG.Errorf("mkdir %s failed, err: %v", tempPath, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/backend/constant"
|
||||
|
@ -35,12 +34,12 @@ func createDir(fileOp files.FileOp, dirPath string) {
|
|||
func createDefaultDockerNetwork() {
|
||||
cli, err := docker.NewClient()
|
||||
if err != nil {
|
||||
fmt.Println("init docker client error", err.Error())
|
||||
global.LOG.Errorf("init docker client error", err.Error())
|
||||
return
|
||||
}
|
||||
if !cli.NetworkExist("1panel-network") {
|
||||
if err := cli.CreateNetwork("1panel-network"); err != nil {
|
||||
fmt.Println("init docker client error", err.Error())
|
||||
global.LOG.Errorf("init docker client error", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package business
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/1Panel-dev/1Panel/backend/app/service"
|
||||
"github.com/1Panel-dev/1Panel/backend/global"
|
||||
)
|
||||
|
@ -13,7 +12,6 @@ func Init() {
|
|||
return
|
||||
}
|
||||
if setting.AppStoreVersion != "" {
|
||||
fmt.Println(setting.AppStoreVersion)
|
||||
global.LOG.Info("do not sync")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/1Panel-dev/1Panel/backend/global"
|
||||
"github.com/1Panel-dev/1Panel/backend/utils/files"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
@ -14,6 +11,9 @@ import (
|
|||
"sync/atomic"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/backend/global"
|
||||
"github.com/1Panel-dev/1Panel/backend/utils/files"
|
||||
)
|
||||
|
||||
type Writer struct {
|
||||
|
@ -261,7 +261,6 @@ func (w *Writer) CompressFile(logFile string) error {
|
|||
comFileName := path.Base(logFile) + ".gz"
|
||||
filePath := path.Dir(logFile)
|
||||
|
||||
fmt.Println(path.Dir(logFile))
|
||||
if err := op.Compress([]string{logFile}, filePath, comFileName, files.Gz); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -96,7 +96,6 @@ func OperationLog() gin.HandlerFunc {
|
|||
var names []string
|
||||
if funcs.IsList {
|
||||
sql := fmt.Sprintf("SELECT %s FROM %s where %s in (?);", funcs.OutputColume, funcs.DB, funcs.InputColume)
|
||||
fmt.Println(value)
|
||||
_ = global.DB.Raw(sql, value).Scan(&names)
|
||||
} else {
|
||||
_ = global.DB.Raw(fmt.Sprintf("select %s from %s where %s = ?;", funcs.OutputColume, funcs.DB, funcs.InputColume), value).Scan(&names)
|
||||
|
|
|
@ -53,7 +53,6 @@ defineProps({
|
|||
const emit = defineEmits(['search', 'update:selects']);
|
||||
const condition = ref({});
|
||||
function search(conditions: any, e: any) {
|
||||
console.log(conditions);
|
||||
if (conditions) {
|
||||
condition.value = conditions;
|
||||
}
|
||||
|
|
|
@ -100,7 +100,6 @@ const props = defineProps({
|
|||
const em = defineEmits(['choose']);
|
||||
|
||||
const checkFile = (row: any) => {
|
||||
console.log(row.path);
|
||||
rowName.value = row.name;
|
||||
em('choose', row.path);
|
||||
popoverVisible.value = false;
|
||||
|
|
|
@ -101,7 +101,6 @@ const get = async () => {
|
|||
if (res.data && res.data.length > 0) {
|
||||
res.data.forEach((d) => {
|
||||
if (d.edit) {
|
||||
console.log(d.edit);
|
||||
canEdit.value = true;
|
||||
}
|
||||
let value = d.value;
|
||||
|
|
|
@ -306,7 +306,6 @@ const buttons = [
|
|||
{
|
||||
label: i18n.global.t('container.rename'),
|
||||
click: (row: Container.ContainerInfo) => {
|
||||
console.log(row.name);
|
||||
dialogReNameRef.value!.acceptParams({ container: row.name });
|
||||
},
|
||||
disabled: (row: any) => {
|
||||
|
|
|
@ -272,7 +272,6 @@ const onSubmitSave = async () => {
|
|||
const loadDockerConf = async () => {
|
||||
const res = await loadDaemonJsonFile();
|
||||
if (res.data === 'daemon.json is not find in path') {
|
||||
console.log(res.data);
|
||||
showDaemonJsonAlert.value = true;
|
||||
} else {
|
||||
dockerConf.value = res.data;
|
||||
|
|
|
@ -401,7 +401,6 @@ function hasScript() {
|
|||
|
||||
function checkScript() {
|
||||
let row = dialogData.value.rowData;
|
||||
console.log(row.specType, row.week, row.day, row.hour, row.minute);
|
||||
switch (row.specType) {
|
||||
case 'perMonth':
|
||||
return row.day > 0 && row.day < 32 && row.hour >= 0 && row.hour < 24 && row.minute >= 0 && row.minute < 60;
|
||||
|
|
|
@ -244,7 +244,6 @@ const onChangePort = async (formEl: FormInstance | undefined) => {
|
|||
if (!formEl) return;
|
||||
const result = await formEl.validateField('port', callback);
|
||||
if (!result) {
|
||||
console.log('daqdwq');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
|
|
|
@ -44,7 +44,6 @@ let items = ref([]);
|
|||
const acceptParams = async (props: InstallRrops) => {
|
||||
items.value = props.items;
|
||||
open.value = true;
|
||||
console.log(items);
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
|
|
|
@ -261,7 +261,6 @@ const changeType = (type: string) => {
|
|||
if (type == 'deployemnt') {
|
||||
if (appInstalles.value && appInstalles.value.length > 0) {
|
||||
website.value.appInstallId = appInstalles.value[0].id;
|
||||
console.log(website.value);
|
||||
}
|
||||
} else {
|
||||
website.value.appInstallId = undefined;
|
||||
|
|
Loading…
Reference in New Issue