From 003449eb0a846de9e3c4f4e40e3ba90975cb887a Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 30 Jun 2023 12:30:28 +0800 Subject: [PATCH] update --- plugins/docker/index.py | 12 ++++++++++++ plugins/docker/js/docker.js | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/docker/index.py b/plugins/docker/index.py index 1650a670f..1556d3fcc 100755 --- a/plugins/docker/index.py +++ b/plugins/docker/index.py @@ -209,6 +209,18 @@ def imageList(): return imageList +# 登陆验证 +def dockerLoginCheck(user_name, user_pass, registry): + login_test = mw.execShell('docker login -u=%s -p %s %s' % + (user_name, user_pass, registry)) + ret = 'required$|Error' + ret2 = re.findall(ret, login_test[-1]) + if len(ret2) == 0: + return True + else: + return False + + def imageListData(): try: ilist = imageList() diff --git a/plugins/docker/js/docker.js b/plugins/docker/js/docker.js index 7925bc5f7..d1e7d7890 100755 --- a/plugins/docker/js/docker.js +++ b/plugins/docker/js/docker.js @@ -161,7 +161,7 @@ function dockerImageList(){ list += ''; list += ''+rlist[i]['RepoTags']+''; list += ''+tag+''; - list += ''+rlist[i]['Size']+''; + list += ''+toSize(rlist[i]['Size'])+''; list += ''+license+''; list += ''+desc+''; list += ''+'操作'+''; @@ -222,7 +222,7 @@ function repoList(){ list += ''; list += ''+rlist[i]['RepoTags']+''; list += ''+tag+''; - list += ''+rlist[i]['Size']+''; + list += ''+toSize(rlist[i]['Size'])+''; list += ''+license+''; list += ''+desc+''; list += ''+'操作'+'';