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 += ''+'操作'+'';