Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Dictor committed Sep 11, 2020
2 parents 3d92a4d + f80972f commit 8261fc8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ With docker-compose:
version: "3"
services:
webannie:
image: imdictor/web-annie
image: kimdictor/web-annie
ports:
- "8080:80"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ func main() {
return c.JSON(http.StatusOK, map[string]int{"count": deleteCnt})
}
})
e.Logger.Fatal(e.Start(":80"))
e.Logger.Fatal(e.Start(CurrentConfig.ListenAddress))
}
4 changes: 4 additions & 0 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ type (
HttpProxy bool `yaml:"http_proxy"`
HttpProxyAddress string `yaml:"http_proxy_address"`
DownloadDirectory string `yaml:"download_path"`
ListenAddress string `yaml:"listen_address"`
IgnoreExitError bool `yaml:"ignore_exit_error"`
}
)

var (
DefaultConfig Config = Config{
HttpProxy: false,
DownloadDirectory: "./download",
ListenAddress: ":80",
IgnoreExitError: false,
}
)
5 changes: 4 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ body {

.task-name {
margin-right: auto;
overflow-x: auto;
}

.task-name p {
margin-bottom: 0;
word-break: break-word;
}

.task-name-address {
Expand All @@ -50,7 +52,7 @@ body {
}

.task-progress {
width: 110px;
min-width: 7rem;
}

.task-progress p {
Expand All @@ -68,6 +70,7 @@ body {
}

.task-control {
min-width: 5.5rem;
}

.task-control button {
Expand Down
6 changes: 5 additions & 1 deletion task.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ func (t *Task) Start() {
log.WriteString(exitString)
t.Info += exitString

t.Status = TASK_STATUS_COMPLETE
if !CurrentConfig.IgnoreExitError && !cmd.ProcessState.Success() {
t.Status = TASK_STATUS_FAIL
} else {
t.Status = TASK_STATUS_COMPLETE
}
}()
}

Expand Down

0 comments on commit 8261fc8

Please sign in to comment.