Skip to content

Commit

Permalink
Added time before logs would be purged #21
Browse files Browse the repository at this point in the history
  • Loading branch information
solyutor committed Oct 16, 2014
1 parent 0bf79e2 commit 9506217
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Galaxy/Domain/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public class Options

public string RootDeployFolder { get; set; }

public int PurgeLogsOlderThan { get; set; }

public string GetDeployFolder()
{
if (string.IsNullOrWhiteSpace(RootDeployFolder))
Expand Down
7 changes: 6 additions & 1 deletion src/Galaxy/WebEnd/Models/OptionsModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ public OptionsModel()
public OptionsModel(Options options)
{
DeployFolder = options.RootDeployFolder;
PurgeLogsOlderThan = options.PurgeLogsOlderThan;
}

[Display(Name = "Applications Folder", Prompt = "Path. Leave blank to use default")]
public string DeployFolder { get; set; }


[Display(Name = "Purge log older then", Prompt = "days")]
public int PurgeLogsOlderThan { get; set; }

public void Update(Options options)
{
options.RootDeployFolder = DeployFolder;
options.PurgeLogsOlderThan = PurgeLogsOlderThan;
}
}
}
1 change: 1 addition & 0 deletions src/Galaxy/WebEnd/Views/Options/Options.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div class="row">
<form class="form-horizontal" role="form" method="POST">
@Html.LabeledTextBox(x => x.DeployFolder)
@Html.LabeledTextBox(x => x.PurgeLogsOlderThan)
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-success" value="Submit" />
Expand Down

0 comments on commit 9506217

Please sign in to comment.