mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-02 04:51:22 +01:00
updates for create time localization of image detail and i18n of index title
This commit is contained in:
parent
321ca7e56a
commit
aef3d6cbef
@ -169,7 +169,6 @@ func (ra *RepositoryAPI) GetManifests() {
|
||||
ra.RenderError(http.StatusInternalServerError, "Internal Server Error")
|
||||
return
|
||||
}
|
||||
item.CreatedStr = item.Created.Format("2006-01-02 15:04:05")
|
||||
item.DurationDays = strconv.Itoa(int(time.Since(item.Created).Hours()/24)) + " days"
|
||||
|
||||
ra.Data["json"] = item
|
||||
|
@ -29,7 +29,6 @@ type RepoItem struct {
|
||||
ID string `json:"Id"`
|
||||
Parent string `json:"Parent"`
|
||||
Created time.Time `json:"Created"`
|
||||
CreatedStr string `json:"CreatedStr"`
|
||||
DurationDays string `json:"Duration Days"`
|
||||
Author string `json:"Author"`
|
||||
Architecture string `json:"Architecture"`
|
||||
|
@ -82,4 +82,4 @@ index_desc_2 = 2. Efficiency: A private registry server is set up within the org
|
||||
index_desc_3 = 3. Access Control: RBAC (Role Based Access Control) is provided. User management can be integrated with existing enterprise identity services like AD/LDAP.
|
||||
index_desc_4 = 4. Audit: All access to the registry are logged and can be used for audit purpose.
|
||||
index_desc_5 = 5. GUI: User friendly single-pane-of-glass management console.
|
||||
|
||||
index_title = An enterprise-class registry server
|
||||
|
@ -82,3 +82,4 @@ index_desc_2 = 2. 效率: 搭建组织内部的私有容器Registry服务,可
|
||||
index_desc_3 = 3. 访问控制: 提供基于角色的访问控制,可集成企业目前拥有的用户管理系统(如:AD/LDAP)。
|
||||
index_desc_4 = 4. 审计: 所有访问Registry服务的操作均被记录,便于日后审计。
|
||||
index_desc_5 = 5. 管理界面: 具有友好易用图形管理界面。
|
||||
index_title = 企业级 Registry 服务
|
@ -124,17 +124,15 @@ jQuery(function(){
|
||||
url: "/api/repositories/manifests?repo_name=" + repoName + "&tag=" + imageId,
|
||||
type: "get",
|
||||
success: function(data, status, xhr){
|
||||
if(data){
|
||||
for(var i in data){
|
||||
if(data[i] == ""){
|
||||
data[i] = "N/A";
|
||||
}
|
||||
}
|
||||
data.Created = data.CreatedStr;
|
||||
delete data.CreatedStr;
|
||||
|
||||
$("#dlgModal").dialogModal({"title": i18n.getMessage("image_details"), "content": data});
|
||||
}
|
||||
if(data){
|
||||
for(var i in data){
|
||||
if(data[i] == ""){
|
||||
data[i] = "N/A";
|
||||
}
|
||||
}
|
||||
data.Created = moment(new Date(data.Created)).format("YYYY-MM-DD HH:mm:ss");
|
||||
$("#dlgModal").dialogModal({"title": i18n.getMessage("image_details"), "content": data});
|
||||
}
|
||||
}
|
||||
}).exec();
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<img class="pull-left" src="static/resources/image/Harbor_Logo_rec.png" alt="Harbor's Logo" height="180" width="360"/>
|
||||
<p class="pull-left" style="margin-top: 85px; color: #245580; font-size: 30pt;">An enterprise-class registry server</p>
|
||||
<p class="pull-left" style="margin-top: 85px; color: #245580; font-size: 30pt; text-align: center; width: 60%;">{{i18n .Lang "index_title"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user