1
// Copyright 2016 - 2020 The aurora Authors. All rights reserved. Use of this
2
// source code is governed by a MIT license that can be found in the LICENSE
3
// file.
4
//
5
// The aurora is a web-based beanstalkd queue server console written in Go
6
// and works on macOS, Linux and Windows machines. Main idea behind using Go
7
// for backend development is to utilize ability of the compiler to produce
8
// zero-dependency binaries for multiple platforms. aurora was created as an
9
// attempt to build very simple and portable application to work with local or
10
// remote beanstalkd server.
11

12
package main
13

14
import "strings"
15

16
// currentTubeJobs call currentTubeJobsSummaryTable, currentTubeJobsActionsRow
17
// and currentTubeJobsShowcase functions by given server and tube config, and
18
// merge these functions return value.
19
func currentTubeJobs(server string, tube string) string {
20 10
	var table = currentTubeJobsSummaryTable(server, tube)
21 10
	buf := strings.Builder{}
22 10
	if table == `` {
23 10
		buf.WriteString(`Tube "`)
24 10
		buf.WriteString(tube)
25 10
		buf.WriteString(`" not found or it is empty <br><br><a href="./server?server=`)
26 10
		buf.WriteString(server)
27 10
		buf.WriteString(`"> &lt;&lt; back </a>`)
28 10
		return buf.String()
29
	}
30 10
	buf.WriteString(table)
31 10
	buf.WriteString(currentTubeJobsActionsRow(server, tube))
32 10
	buf.WriteString(currentTubeJobsShowcase(server, tube))
33 10
	return buf.String()
34
}

Read our documentation on viewing source code .

Loading