diff --git a/tibuild/gojenkins/build_history.go b/tibuild/gojenkins/build_history.go index 7fcd4d8..7573845 100644 --- a/tibuild/gojenkins/build_history.go +++ b/tibuild/gojenkins/build_history.go @@ -1,10 +1,11 @@ package gojenkins import ( - "golang.org/x/net/html" "io" "strconv" "strings" + + "golang.org/x/net/html" ) // Parse jenkins ajax response in order find the current jenkins build history @@ -24,7 +25,6 @@ func parseBuildHistory(d io.Reader) []*History { } case html.SelfClosingTagToken: tn, hasAttr := z.TagName() - // fmt.Println("START__", string(tn), hasAttr) if hasAttr { a := attr(z) // @@ -39,7 +39,6 @@ func parseBuildHistory(d io.Reader) []*History { case html.StartTagToken: depth++ tn, hasAttr := z.TagName() - // fmt.Println("START__", string(tn), hasAttr) if hasAttr { a := attr(z) //
- {params.row.pipeline_build_id} -
- } - }, - { - field: 'status', - headerName: 'Status', - }, - { - field: 'begin_time', - headerName: 'Begin Time', - width: 170 - }, - { - field: 'end_time', - headerName: 'End Time', - width: 170 - }, - { - field: 'triggered_by', - headerName: 'Triggered By', - width: 120 - }, - { - field: 'component', - headerName: 'Component', - width: 170 - }, - { - field: 'arch', - headerName: 'Arch', - width: 170 - }, - { - field: 'artifact_type', - headerName: 'Artifact Type', - width: 170 - }, - { - field: 'branch', - headerName: 'Branch', - width: 120 - }, - { - field: 'version', - headerName: 'Version', - width: 170 - }, - { - field: 'push_gcr', - headerName: 'Push GCR', - }, - { - field: 'artifact_meta', - headerName: 'Artifact Meta', - renderCell: function (params) { - return- {params.row.artifact_type===""?"not ready":Artifact Meta} -
- } - }, - { - field: 'jenkins_log', - headerName: 'Jenkins Log', - width: 100, - renderCell: function (params) { - return- {params.row.jenkins_log===""?"not ready":Jenkins Log} -
- } - }, - ] -; + { + field: 'pipeline_build_id', + headerName: 'ID', + width: 70, + renderCell: function (params) { + return+ {params.row.pipeline_build_id} +
+ } + }, + { + field: 'status', + headerName: 'Status', + }, + { + field: 'begin_time', + headerName: 'Begin Time', + width: 170 + }, + { + field: 'end_time', + headerName: 'End Time', + width: 170 + }, + { + field: 'triggered_by', + headerName: 'Triggered By', + width: 120 + }, + { + field: 'component', + headerName: 'Component', + width: 170 + }, + { + field: 'arch', + headerName: 'Arch', + width: 170 + }, + { + field: 'artifact_type', + headerName: 'Artifact Type', + width: 170 + }, + { + field: 'branch', + headerName: 'Branch', + width: 120 + }, + { + field: 'version', + headerName: 'Version', + width: 170 + }, + { + field: 'push_gcr', + headerName: 'Push GCR', + }, + { + field: 'artifact_meta', + headerName: 'Artifact Meta', + renderCell: function (params) { + return+ {params.row.artifact_type === "" ? "not ready" : Artifact Meta} +
+ } + }, + { + field: 'jenkins_log', + headerName: 'Jenkins Log', + width: 100, + renderCell: function (params) { + return+ {params.row.jenkins_log === "" ? "not ready" : Jenkins Log} +
+ } + }, +] + ; const rows = [ { @@ -176,11 +170,11 @@ export default function DataGrid4List(tipipelineId) { ); } const r8 = listQuery.data.map((v) => { - return {...v, id: v.pipeline_build_id} - } + return { ...v, id: v.pipeline_build_id } + } ) return ( -