Skip to content
Snippets Groups Projects
Commit 90312521 authored by Ri Xu's avatar Ri Xu
Browse files

- GoDoc updated, fixed some spelling mistakes;

- Readme update, add new todo list;
- Improve coverage of code;
- HTML update
parent c44f6b46
No related branches found
Tags 1.6
No related merge requests found
......@@ -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
......
......@@ -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()
......
......@@ -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
......
......@@ -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)
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment