feature: add sync state for devops

Signed-off-by: shaowenchen <mail@chenshaowen.com>
This commit is contained in:
shaowenchen
2020-11-17 19:47:02 +08:00
parent 89de94dbf8
commit 38ca2ea39b
12 changed files with 121 additions and 92 deletions

View File

@@ -21,6 +21,7 @@ import (
"github.com/fatih/structs"
"kubesphere.io/kubesphere/pkg/simple/client/devops"
"kubesphere.io/kubesphere/pkg/utils/stringutils"
"time"
)
func GetColumnsFromStruct(s interface{}) []string {
@@ -315,3 +316,8 @@ func GetProjectRolePattern(projectId string) string {
func GetPipelineRolePattern(projectId string) string {
return fmt.Sprintf("^%s/.*", projectId)
}
// get unified sync current time
func GetSyncNowTime() string {
return time.Now().String()
}