Skip to content

Commit

Permalink
- GoDoc updated, fixed some spelling mistakes;
Browse files Browse the repository at this point in the history
- Readme update, add new todo list;
- Improve coverage of code;
- HTML update
  • Loading branch information
xuri committed Dec 12, 2016
1 parent c44f6b4 commit 9031252
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Contributions are welcome! Open a pull request to fix a bug, or open an issue to

## Todo

- Handle 404 error page
- Filter the tubes by name in the overview
- Logout support when Basic Auth has been enabled
- Custom job content hightlight display theme support
Expand Down
2 changes: 1 addition & 1 deletion currentTubeJobsActionsRow.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func currentTubeJobsActionsRowSample(server string, tube string) string {
}
}
if sample.String() == "" {
return `<li><a href="#">There are no sample jobs</a></li>`
return `<li><a href="javascript:void(0);">There are no sample jobs</a></li>`
}
sample.WriteString(`<li class="divider"></li><li><a href="./sample?action=manageSamples">Manage samples</a></li>`)
return sample.String()
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

// main function defines the entry point for the program
// if read cong file or init fail, the application will be exit.
// if read config file or init failed, the application will be exit.
func main() {
parseFlags()
var err error
Expand Down
10 changes: 10 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,16 @@ func TestStatistic(t *testing.T) {
t.SkipNow()
}

func TestMain(t *testing.T) {
once.Do(testSetup)
go func() {
openPage()
handleSignals()
}()
time.Sleep(5 * time.Second)
t.SkipNow()
}

func createFile(path string) {
// Detect if file exists
var _, err = os.Stat(path)
Expand Down
2 changes: 1 addition & 1 deletion modalClearTubes.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func modalClearTubes(server string) string {
}
buf.WriteString(`<div class="modal fade" id="clear-tubes" data-cookie="tubefilter" tabindex="-1" role="dialog" aria-labelledby="clear-tubes-label" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button><h4 class="modal-title" id="clear-tubes-label">Clear multiple tubes</h4></div><div class="modal-body"><form><fieldset><div class="form-group"><label>Tube name <small class="text-muted">(supports <a href="http://james.padolsey.com/javascript/regex-selector-for-jquery/" target="_blank">jQuery regexp</a> syntax)</small></label><div class="input-group"><input class="form-control focused" id="tubeSelector" type="text" placeholder="prefix*" value="`)
buf.WriteString(selfConf.TubeSelector)
buf.WriteString(`"><div class="input-group-btn"><a href="#" class="btn btn-info" id="clearTubesSelect">Select</a></div></div></div></fieldset><div><strong>Tube list</strong>`)
buf.WriteString(`"><div class="input-group-btn"><a href="javascript:void(0);" class="btn btn-info" id="clearTubesSelect">Select</a></div></div></div></fieldset><div><strong>Tube list</strong>`)
buf.WriteString(tubeList.String())
buf.WriteString(`</div></form></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button><a href="#" class="btn btn-success" id="clearTubes">Clear selected tubes</a><br/><br/><p class="text-muted text-right small">* Tube clear works by peeking to all jobs and deleting them in a loop.</p></div></div></div></div>`)
return buf.String()
Expand Down

0 comments on commit 9031252

Please sign in to comment.