updates newer-ui codes.

This commit is contained in:
kunw 2016-04-11 16:07:16 +08:00
parent 4ebc4233f3
commit 779a4bf1be
33 changed files with 1289 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ Deploy/config/ui/env
Deploy/config/ui/app.conf
Deploy/config/db/env
Deploy/harbor.cfg
.DS_Store

28
controllers/ng/base.go Normal file
View File

@ -0,0 +1,28 @@
package ng
import (
"path/filepath"
"github.com/astaxie/beego"
)
type BaseController struct {
beego.Controller
}
const (
viewPath = "sections"
prefixNg = "ng"
)
func (bc *BaseController) Forward(title, templateName string) {
bc.Layout = filepath.Join(prefixNg, "layout.htm")
bc.TplName = filepath.Join(prefixNg, templateName)
bc.Data["Title"] = title
bc.LayoutSections = make(map[string]string)
bc.LayoutSections["HeaderInclude"] = filepath.Join(prefixNg, viewPath, "headerInclude.htm")
bc.LayoutSections["FooterInclude"] = filepath.Join(prefixNg, viewPath, "footerInclude.htm")
bc.LayoutSections["HeaderContent"] = filepath.Join(prefixNg, viewPath, "headerContent.htm")
bc.LayoutSections["FooterContent"] = filepath.Join(prefixNg, viewPath, "footerContent.htm")
}

View File

@ -0,0 +1,9 @@
package ng
type DashboardController struct {
BaseController
}
func (dc *DashboardController) Get() {
dc.Forward("Dashboard", "dashboard.htm")
}

9
controllers/ng/index.go Normal file
View File

@ -0,0 +1,9 @@
package ng
type IndexController struct {
BaseController
}
func (c *IndexController) Get() {
c.Forward("Index", "index.htm")
}

View File

@ -0,0 +1,9 @@
package ng
type ProjectController struct {
BaseController
}
func (pc *ProjectController) Get() {
pc.Forward("My Projects", "project.htm")
}

View File

@ -0,0 +1,9 @@
package ng
type RepositoryController struct {
BaseController
}
func (rc *RepositoryController) Get() {
rc.Forward("Repository", "repository.htm")
}

78
main.go Normal file
View File

@ -0,0 +1,78 @@
/*
Copyright (c) 2016 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"fmt"
log "github.com/vmware/harbor/utils/log"
"os"
_ "github.com/vmware/harbor/auth/db"
_ "github.com/vmware/harbor/auth/ldap"
"github.com/vmware/harbor/dao"
"github.com/vmware/harbor/models"
"github.com/astaxie/beego"
)
const (
adminUserID = 1
)
func updateInitPassword(userID int, password string) error {
queryUser := models.User{UserID: userID}
user, err := dao.GetUser(queryUser)
if err != nil {
return fmt.Errorf("Failed to get user, userID: %d %v", userID, err)
}
if user == nil {
return fmt.Errorf("User id: %d does not exist.", userID)
}
if user.Salt == "" {
salt, err := dao.GenerateRandomString()
if err != nil {
return fmt.Errorf("Failed to generate salt for encrypting password, %v", err)
}
user.Salt = salt
user.Password = password
err = dao.ChangeUserPassword(*user)
if err != nil {
return fmt.Errorf("Failed to update user encrypted password, userID: %d, err: %v", userID, err)
}
log.Infof("User id: %d updated its encypted password successfully.", userID)
} else {
log.Infof("User id: %d already has its encrypted password.", userID)
}
return nil
}
func main() {
beego.BConfig.WebConfig.Session.SessionOn = true
beego.AddTemplateExt("htm")
beego.AddTemplateExt("tpl")
dao.InitDB()
if err := updateInitPassword(adminUserID, os.Getenv("HARBOR_ADMIN_PASSWORD")); err != nil {
log.Error(err)
}
initRouters()
initNgRouters()
beego.Run()
}

15
ngrouter.go Normal file
View File

@ -0,0 +1,15 @@
package main
import (
"github.com/astaxie/beego"
"github.com/vmware/harbor/controllers/ng"
)
func initNgRouters() {
beego.SetStaticPath("ng/static", "ng")
beego.Router("/ng", &ng.IndexController{})
beego.Router("/ng/dashboard", &ng.DashboardController{})
beego.Router("/ng/project", &ng.ProjectController{})
beego.Router("/ng/repository", &ng.RepositoryController{})
}

67
router.go Normal file
View File

@ -0,0 +1,67 @@
/*
Copyright (c) 2016 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"github.com/vmware/harbor/api"
"github.com/vmware/harbor/controllers"
"github.com/vmware/harbor/service"
"github.com/astaxie/beego"
)
func initRouters() {
beego.SetStaticPath("registry/static/i18n", "static/i18n")
beego.SetStaticPath("registry/static/resources", "static/resources")
beego.SetStaticPath("registry/static/vendors", "static/vendors")
beego.Router("/login", &controllers.CommonController{}, "post:Login")
beego.Router("/logout", &controllers.CommonController{}, "get:Logout")
beego.Router("/language", &controllers.CommonController{}, "get:SwitchLanguage")
beego.Router("/signUp", &controllers.CommonController{}, "post:SignUp")
beego.Router("/userExists", &controllers.CommonController{}, "post:UserExists")
beego.Router("/reset", &controllers.CommonController{}, "post:ResetPassword")
beego.Router("/sendEmail", &controllers.CommonController{}, "get:SendEmail")
beego.Router("/updatePassword", &controllers.CommonController{}, "post:UpdatePassword")
beego.Router("/", &controllers.IndexController{})
beego.Router("/signIn", &controllers.SignInController{})
beego.Router("/register", &controllers.RegisterController{})
beego.Router("/addUser", &controllers.AddUserController{})
beego.Router("/forgotPassword", &controllers.ForgotPasswordController{})
beego.Router("/resetPassword", &controllers.ResetPasswordController{})
beego.Router("/changePassword", &controllers.ChangePasswordController{})
beego.Router("/registry/project", &controllers.ProjectController{})
beego.Router("/registry/detail", &controllers.ItemDetailController{})
beego.Router("/search", &controllers.SearchController{})
//API:
beego.Router("/api/search", &api.SearchAPI{})
beego.Router("/api/projects/:pid/members/?:mid", &api.ProjectMemberAPI{})
beego.Router("/api/projects/?:id", &api.ProjectAPI{})
beego.Router("/api/projects/:id/logs/filter", &api.ProjectAPI{}, "post:FilterAccessLog")
beego.Router("/api/users/?:id", &api.UserAPI{})
beego.Router("/api/repositories", &api.RepositoryAPI{})
beego.Router("/api/repositories/tags", &api.RepositoryAPI{}, "get:GetTags")
beego.Router("/api/repositories/manifests", &api.RepositoryAPI{}, "get:GetManifests")
//external service that hosted on harbor process:
beego.Router("/service/notifications", &service.NotificationHandler{})
beego.Router("/service/token", &service.TokenHandler{})
}

BIN
static/ng/resources/.DS_Store vendored Normal file

Binary file not shown.

BIN
static/ng/resources/css/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,18 @@
.up-section .up-table-pane {
overflow-y: scroll;
height: 180px;
}
.up-section .dl-horizontal dt{
line-height: 25px;
}
.up-section .dl-horizontal dt {
text-align: left;
}
.single {
margin-left: -15px;
margin-right: 0;
}

View File

@ -0,0 +1,18 @@
.footer{
position: absolute;
bottom: 0;
left: 0;
padding: 0;
margin: 0;
width: 100%;
clear: both;
background-color: #A8A8A8;
height: 35px;
}
.footer p {
margin-top: 8px;
color: #FFFFFF;
margin-left: auto;
margin-right: auto;
width: 385px;
}

View File

@ -0,0 +1,58 @@
.navbar-custom {
background-image: none;
background-color: #057ac9;
height: 66px;
margin-bottom: 0;
}
nav .container {
margin-top: 15px;
}
nav .container-custom {
min-width: 1024px;
}
.navbar-custom .navbar-nav > li > a,
.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus,
.navbar-custom .navbar-nav > li > a:active {
color: white; /*Change active text color here*/
}
.navbar-brand > img {
height: 60px;
width: 100px;
margin-top: -30px;
filter: brightness(0) invert(1);
-webkit-filter: brightness(0) invert(1);
}
.navbar-form {
margin-top: 0;
padding-right: 0;
}
.search-icon {
background: url("/static/ng/resources/img/magnitude-glass.jpg") no-repeat 97% 6px;
background-size: 1.5em;
background-color: #FFFFFF;
}
.nav-custom li {
float: left;
padding: 10px 0 0 0;
margin-right: 12px;
list-style: none;
display: inline-block;
}
.nav-custom li a {
font-size: 14px;
color: #FFFFFF;
text-decoration: none;
}
.nav-custom .active {
border-bottom: 3px solid #EFEFEF;
}

View File

@ -0,0 +1,85 @@
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
position: fixed;
}
.container-fluid-custom {
background-color: #EFEFEF;
height: 100%;
}
.up-section {
position: relative;
padding: 15px 15px 15px;
margin: 20px 0 20px 0;
background-color: #FFFFFF;
height: 257px;
overflow: auto;
}
.up-section h4 label {
margin-left: 5px;
}
.thumbnail {
display: inline-block;
border: none;
box-shadow: none;
}
.down-section {
position: relative;
padding: 15px 15px 15px;
margin: 0 0 20px 0;
background-color: #FFFFFF;
height: 350px;
}
.down-section ul {
padding: 0;
margin-left: 30px;
margin-right: 20px;
}
.long-line {
overflow: hidden;
width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
}
.down-table-pane {
overflow-y: auto;
height: auto;
padding-left: 10px;
padding-right: 10px;
}
.page-header {
padding-bottom: 10px;
margin: 0 10px 10px 10px;
border-bottom: none;
}
.underlined {
border-bottom: 2px solid #EFEFEF;
}
.step-content {
width: 210px;
}
.display-inline-block {
display: inline-block;
}
.title-color {
color: #057ac9;
}
.page-content {
margin: 0 20px 0 20px;
}

View File

@ -0,0 +1,50 @@
.container-custom {
position: relative;
height: 100%;
}
.extend-height {
height: 100%;
}
.section {
position: relative;
padding: 15px 15px 0;
margin: 20px 0 20px 0;
background-color: #FFFFFF;
height: 100%;
width: 100%;
}
.search-pane {
margin: 0 10px 0 10px;
height: 3em;
}
.table>tbody>tr>td, .table>tbody>tr>th {
vertical-align: middle;
}
.gutter {
margin: 0 1em 0 1em;
}
.project-pane {
margin: 0 10px 0 10px;
}
.pane {
height: 80%;
overflow-y: auto;
}
.sub-pane {
margin: 0 10px 0 10px;
height: 60%;
overflow-y: auto;
}
.well-custom {
margin-top: 10px;
}

View File

@ -0,0 +1,84 @@
.panel {
margin-bottom: 0;
}
.pane-container {
overflow-y: auto;
}
.pane-container .list-group-item {
border: none;
}
.item-line {
margin: 0 0 10px 0;
}
.switch-pane {
padding: 10px 15px 0 15px;
margin: 0 10px 10px 10px;
height: 3em;
background-color: rgb(231,244,254);
}
.switch-pane-projects {
float: left;
}
.switch-pane-tabs {
width: 25%;
float: right;
list-style-type: none;
}
.switch-pane-tabs a, .switch-pane-tabs span {
display: inline-block;
text-decoration: none;
float: left;
}
.switch-pane-tabs li .active {
border-bottom: 2px solid rgb(0, 84, 190);
}
.switch-pane-drop-down {
display: block;
position: absolute;
margin: -10px 0 0 10px;
z-index: 1000;
}
.search-projects {
padding: 15px 10px 10px;
}
.project-list {
height: 440px;
}
.project-selected {
margin-left: -1.2em;
}
.list-group-item {
text-align: left;
margin-left: 20%;
}
.panel-group {
margin-top: 10px;
}
.repository-table {
width: 100%;
}
.repository-table th, .repository-table td {
padding: 10px;
text-align: left;
}
.each-tab-pane {
padding: 0 10px;
}

BIN
static/ng/resources/img/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

71
views/ng/dashboard.htm Normal file
View File

@ -0,0 +1,71 @@
<div class="container-fluid container-fluid-custom">
<div class="container">
<div class="row row-custom">
<div class="col-xs-4 col-md-4">
<div class="row">
<div class="up-section">
<h4 class="page-header title-color underlined">Summary</h4>
<dl class="page-content dl-horizontal">
<dt>Projects:</dt><dd>40</dd>
<dt>Public Projects:</dt><dd>30</dd>
<dt>Total Projects:</dt><dd>60</dd>
<dt>Repositories:</dt><dd>20</dd>
<dt>Public Repositories:</dt><dd>18</dd>
<dt>Total Repositories:</dt><dd>32</dd>
</dl>
</div>
</div>
</div>
<div class="col-xs-8 col-md-8">
<div class="up-section">
<h4 class="page-header title-color underlined">Logs</h4>
<div class="col-xs-4 col-md-12 up-table-pane">
<table class="table">
<thead>
<th>Username</th><th>Repository Name</th><th>Operation</th><th>Timestamp</th>
</thead>
<tbody>
<tr>
<td>Haox</td><td>myrepo/Ubuntu</td><td>Create</td><td>2016-03-22 12:35:00</td>
</tr>
<tr>
<td>Haox</td><td>myrepo/MySQL</td><td>Push</td><td>2016-03-22 12:35:00</td>
</tr>
<tr>
<td>Daniel</td><td>myproject/Golang</td><td>Create</td><td>2016-03-12 12:35:00</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row row-custom">
<div class="col-xs-12 col-md-12">
<div class="down-section single">
<h4 class="page-header title-color underlined">Total Projects and Repositories Trends</h4>
<p class="page-content text-justify">
Project Harbor is to build an enterprise-class,
reliable registry server. Enterprises can set
up a private registry server in their own environment
to improve productivity as well as security.
Project Harbor can be used in both development
and production environment.
</p>
<ul>
<li title="Security: Keep their intellectual properties within their organizations.">Security: Keep their intellectual properties ...</li>
<li title="Efficiency: A private registry server is set up within the organization's network and can reduce significantly the internet traffic to the public service.">Efficiency: A private registry server is set up ...</li>
<li title="Access Control: RBAC (Role Based Access Control) is provided. User management can be integrated with existing enterprise identity services like AD/LDAP.">Access Control: RBAC (Role Based Access ...</li>
<li title="Audit: All access to the registry are logged and can be used for audit purpose.">Audit: All access to the registry are logged ...</li>
<li title="GUI: User friendly single-pane-of-glass management console.">GUI: User friendly single-pane-of-glass ...</li>
</ul>
<div class="page-content pull-right">
<a href="#">Learn more...</a>
</div>
</div>
</div>
</div>
</div>
</div>

127
views/ng/index.htm Normal file
View File

@ -0,0 +1,127 @@
<div class="container-fluid container-fluid-custom">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="row">
<div class="up-section">
<div class="col-sm-offset-1 col-sm-10">
<span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<h4 class="title-color display-inline-block">Login now</h4>
</div>
<form class="form-horizontal">
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<div class="pull-right">
<button class="btn btn-default">Sign In</button>
<button class="btn btn-success">Sign Up</button>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-1 col-sm-10">
<div class="pull-right">
<a href="#">Forgot Password</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8">
<div class="up-section">
<h4 class="page-header">It's easy to get started ...</h4>
<div class="page-content">
<div style="margin-left: auto; margin-right: auto; width: 100%;">
<div class="thumbnail display-inline-block">
<img src="static/ng/resources/img/Step1.png" alt="Step 1">
<h5 class="step-content">Anybody can read public projects</h5>
</div>
<div class="thumbnail display-inline-block">
<img src="static/ng/resources/img/Step2.png" alt="Step 2">
<h5 class="step-content">Create projects and connect repositories</h5>
</div>
<div class="thumbnail display-inline-block">
<img src="static/ng/resources/img/Step3.png" alt="Step 3">
<h5 class="step-content">User management and role assignment.</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="row">
<div class="down-section">
<h4 class="page-header underlined">Why use Harbor?</h4>
<p class="page-content text-justify">
Project Harbor is to build an enterprise-class,
reliable registry server. Enterprises can set
up a private registry server in their own environment
to improve productivity as well as security.
Project Harbor can be used in both development
and production environment.
</p>
<ul>
<li class="long-line">▪︎ Security: Keep their intellectual properties within their organizations.</li>
<li class="long-line">▪︎ Efficiency: A private registry server is set up within the organization's network and can reduce significantly the internet traffic to the public service.</li>
<li class="long-line">▪︎ Access Control: RBAC (Role Based Access Control) is provided. User management can be integrated with existing enterprise identity services like AD/LDAP.</li>
<li class="long-line">▪︎ Audit: All access to the registry are logged and can be used for audit purpose.</li>
<li class="long-line">▪︎ GUI: User friendly single-pane-of-glass management console.</li>
</ul>
<div class="page-content pull-right">
<a href="#"><span class="glyphicon glyphicon-triangle-right"></span> Learn more...</a>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="down-section">
<h4 class="page-header title-color underlined">Repositories</h4>
<div class="down-table-pane">
<table class="table">
<thead>
<th>Project/Repository Name</th><th>Creation Time</th><th>Author</th>
</thead>
<tbody>
<tr>
<td>myrepo/Ubuntu</td><td>2016-03-22 12:35:00</td><td>Haox</td>
</tr>
<tr>
<td>myrepo/MySQL</td><td>2016-03-22 12:35:00</td><td>Haox</td>
</tr>
<tr>
<td>harbor/Nginx</td><td>2016-03-21 11:25:30</td><td>Wenkai Yin</td>
</tr>
<tr>
<td>harbor/Registry</td><td>2016-03-21 11:25:30</td><td>Wenkai Yin</td>
</tr>
<tr>
<td>myproject/Alpine</td><td>2016-03-23 09:40:20</td><td>Daniel</td>
</tr>
<tr>
<td>myproject/Golang</td><td>2016-03-23 09:40:20</td><td>Daniel</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>

13
views/ng/layout.htm Normal file
View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
{{.HeaderInclude}}
<title>{{.Title}}</title>
</head>
<body>
{{.HeaderContent}}
{{.LayoutContent}}
{{.FooterContent}}
{{.FooterInclude}}
</body>
</html>

78
views/ng/project.htm Normal file
View File

@ -0,0 +1,78 @@
<div class="container-fluid container-fluid-custom">
<div class="container container-custom">
<div class="row extend-height">
<div class="col-xs-12 col-md-12 extend-height">
<div class="section">
<h4 class="page-header">My Projects<span class="gutter">|</span><a href="#" class="title-color">Public Projects</a></h4>
<div class="search-pane">
<div class="form-inline">
<div class="input-group">
<input type="text" class="form-control" placeholder="" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
<button class="btn btn-success" type="button"><span class="glyphicon glyphicon-plus"></span>New Project</button>
</div>
</div>
<div class="pane project-pane">
<div class="well panel-group">
<div class="row">
<div class="col-xs-10 col-md-10">
<form>
<div class="form-group">
<input type="text" class="form-control" id="addUsername" placeholder="Project Name">
</div>
</form>
<form class="form-inline">
<div class="form-group">
<input type="checkbox" name="roleId" value="1">&nbsp;Public Project
</div>
</form>
</div>
<div class="col-xs-2 col-md-2">
<form>
<div class="form-group" style="margin-top: 20%;">
<button type="button" class="btn btn-default" id="btnCancel">Cancel</button>
<button type="button" class="btn btn-primary" id="btnSave">Save</button>
</div>
</form>
</div>
</div>
</div>
<div class="sub-pane">
<table class="table">
<thead>
<th>Project Name</th><th>Repositories</th><th>Role</th><th>Creation Time</th><th>Publicity</th>
</thead>
<tbody>
<tr>
<td><a href="#">myrepo</a></td><td>3</td><td>Project Admin</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-success" type="button">On</button></td>
</tr>
<tr>
<td><a href="#">target1</a></td><td>5</td><td>Guest</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-success" type="button" disabled="disabled">On</button></td>
</tr>
<tr>
<td><a href="#">myproject</a></td><td>1</td><td>Project Admin</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-danger" type="button">Off</button></td>
</tr>
<tr>
<td><a href="#">test</a></td><td>3</td><td>Developer</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-danger" type="button">Off</button></td>
</tr>
<tr>
<td><a href="#">demo</a></td><td>3</td><td>Guest</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-danger" type="button">Off</button></td>
</tr>
<tr>
<td><a href="#">distribution</a></td><td>3</td><td>Project Admin</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-success" type="button">On</button></td>
</tr>
<tr>
<td><a href="#">undefined</a></td><td>3</td><td>Project Admin</td><td>2016-03-22 12:35:00</td><td><button class="btn btn-success" type="button">On</button></td>
</tr>
</tbody>
</table>
</div>
<div class="col-xs-4 col-md-12 well well-sm well-custom"><div class="col-md-offset-10">7 items</div></div>
</div>
</div>
</div>
</div>
</div>

384
views/ng/repository.htm Normal file
View File

@ -0,0 +1,384 @@
<div class="container-fluid container-fluid-custom">
<div class="container container-custom">
<div class="row extend-height">
<div class="col-xs-12 col-md-12 extend-height">
<div class="section">
<h4 class="page-header">My Projects<span class="gutter">|</span><a href="#" class="title-color">Public Projects</a></h4>
<div class="switch-pane">
<div class="switch-pane-projects">myrepo</div>
<ul class="switch-pane-tabs" role="tablist">
<li><a role="presentation" href="#repositories" aria-controls="repositories" role="tab" data-toggle="tab">Repositories</a><span class="gutter">|</span></li>
<li><a role="presentation" href="#users" aria-controls="users" role="tab" data-toggle="tab">Users</a><span class="gutter">|</span></li>
<li><a role="presentation" href="#logs" aria-controls="logs" role="tab" data-toggle="tab">Logs</a></li>
</ul>
</div>
<div class="switch-pane-drop-down" style="visibility: visible;">
<div class="row">
<div class="col-xs-12 col-md-12">
<div class="panel panel-default">
<div class="form-inline search-projects">
<div class="input-group">
<input type="text" class="form-control search-icon" placeholder="" size="30">
</div>
</div>
<h5 class="page-header">My Projects: <span class="badge">23</span></h5>
<div class="project-list pane-container">
<ul class="list-group">
<li class="list-group-item">
<span class="glyphicon glyphicon-ok project-selected"></span> myrepo
</li>
<li class="list-group-item">
target1
</li>
<li class="list-group-item">
test
</li>
<li class="list-group-item">
harbor
</li>
<li class="list-group-item">
distribution
</li>
<li class="list-group-item">
demo
</li>
<li class="list-group-item">
undefined
</li>
<li class="list-group-item">
myrepo
</li>
<li class="list-group-item">
target1
</li>
<li class="list-group-item">
test
</li>
<li class="list-group-item">
harbor
</li>
<li class="list-group-item">
distribution
</li>
<li class="list-group-item">
demo
</li>
<li class="list-group-item">
undefined
</li>
<li class="list-group-item">
myrepo
</li>
<li class="list-group-item">
target1
</li>
<li class="list-group-item">
test
</li>
<li class="list-group-item">
harbor
</li>
<li class="list-group-item">
distribution
</li>
<li class="list-group-item">
demo
</li>
<li class="list-group-item">
undefined
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="repositories">
<div class="col-xs-12 col-md-12 each-tab-pane">
<div class="form-inline">
<div class="input-group">
<input type="text" class="form-control" placeholder="" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</div>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading1">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse1" aria-expanded="true" aria-controls="collapse1">
<span class="glyphicon glyphicon-book"></span> myrepo/ubuntu
</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading1">
<div class="panel-body">
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> Tag</th>
<th width="30%">Image Details</th>
<th width="40%">Pull Command</th>
<th width="10%"></th>
</thead>
<tbody>
<tr>
<td>latest</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/ubuntu:latest</td>
<td><a href="#">Copy</a></td>
</tr>
<tr>
<td>14.04</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/ubuntu:14.04</td>
<td><a href="#">Copy</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel-heading" role="tab" id="heading2">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse2" aria-expanded="true" aria-controls="collapse2">
<span class="glyphicon glyphicon-book"></span> myrepo/mysql
</a>
</h4>
</div>
<div id="collapse2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading2">
<div class="panel-body">
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> Tag</th>
<th width="30%">Image Details</th>
<th width="40%">Pull Command</th>
<th width="10%"></th>
</thead>
<tbody>
<tr>
<td>latest</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/mysql:latest</td>
<td><a href="#">Copy</a></td>
</tr>
<tr>
<td>5.6</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/mysql:5.6</td>
<td><a href="#">Copy</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel-heading" role="tab" id="heading3">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse3" aria-expanded="true" aria-controls="collapse3">
<span class="glyphicon glyphicon-book"></span> myrepo/nginx
</a>
</h4>
</div>
<div id="collapse3" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading3">
<div class="panel-body">
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> Tag</th>
<th width="30%">Image Details</th>
<th width="40%">Pull Command</th>
<th width="10%"></th>
</thead>
<tbody>
<tr>
<td>latest</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/nginx:latest</td>
<td><a href="#">Copy</a></td>
</tr>
<tr>
<td>1.9</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/nginx:1.9</td>
<td><a href="#">Copy</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel-heading" role="tab" id="heading4">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse4" aria-expanded="true" aria-controls="collapse4">
<span class="glyphicon glyphicon-book"></span> myrepo/registry
</a>
</h4>
</div>
<div id="collapse4" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading4">
<div class="panel-body">
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> Tag</th>
<th width="30%">Image Details</th>
<th width="40%">Pull Command</th>
<th width="10%"></th>
</thead>
<tbody>
<tr>
<td>latest</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/registry:latest</td>
<td><a href="#">Copy</a></td>
</tr>
<tr>
<td>2.3</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/registry:2.3</td>
<td><a href="#">Copy</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="panel-heading" role="tab" id="heading5">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse5" aria-expanded="true" aria-controls="collapse5">
<span class="glyphicon glyphicon-book"></span> myrepo/alpine
</a>
</h4>
</div>
<div id="collapse5" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading5">
<div class="panel-body">
<table class="repository-table">
<thead>
<th width="20%"><span class="glyphicon glyphicon-tags"></span> Tag</th>
<th width="30%">Image Details</th>
<th width="40%">Pull Command</th>
<th width="10%"></th>
</thead>
<tbody>
<tr>
<td>latest</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/alpine:latest</td>
<td><a href="#">Copy</a></td>
</tr>
<tr>
<td>1.2</td>
<td><a href="#"><span class="glyphicon glyphicon-info-sign"></span></a></td>
<td>docker pull myrepo/alpine:1.2</td>
<td><a href="#">Copy</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="users">
<div class="col-xs-12 col-md-12 each-tab-pane">
<div class="form-inline">
<div class="input-group">
<input type="text" class="form-control" placeholder="" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
<button class="btn btn-success" type="button"><span class="glyphicon glyphicon-plus"></span>Add Member</button>
</div>
<div class="pane">
<div class="well panel-group">
<div class="row">
<div class="col-xs-10 col-md-10">
<form>
<div class="form-group">
<input type="text" class="form-control" id="addUsername" placeholder="Username">
</div>
</form>
<form class="form-inline clearfix">
<div class="form-group">
<label for="roleIdList">Role:</label>&nbsp;&nbsp;
<input type="radio" name="roleId" value="1">&nbsp;Project Admin&nbsp;&nbsp;
<input type="radio" name="roleId" value="2">&nbsp;Developer&nbsp;&nbsp;
<input type="radio" name="roleId" value="3">&nbsp;Guest
</div>
</form>
</div>
<div class="col-xs-2 col-md-2">
<form>
<div class="form-group" style="margin-top: 20%;">
<button type="button" class="btn btn-default" id="btnCancel">Cancel</button>
<button type="button" class="btn btn-primary" id="btnSave">Save</button>
</div>
</form>
</div>
</div>
</div>
<div class="sub-pane">
<table class="table table-pane">
<thead>
<th>Username</th><th>Role</th><th>Operation</th>
</thead>
<tbody>
<tr>
<td>user1</td><td>3</td><td>Project Admin</td><td><a href="#"><span class="glyphicon glyphicon-pencil"></span></a><a href="#"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
<tr>
<td>tester1</td><td>3</td><td>Project Admin</td><td><a href="#"><span class="glyphicon glyphicon-pencil"></span></a><a href="#"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
<tr>
<td>user1</td><td>3</td><td>Project Admin</td><td><a href="#"><span class="glyphicon glyphicon-pencil"></span></a><a href="#"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="logs">
<div class="col-xs-12 col-md-12 each-tab-pane">
<div class="form-inline">
<div class="input-group">
<input type="text" class="form-control" placeholder="" size="30">
<span class="input-group-btn">
<button class="btn btn-primary" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</div>
<table class="table table-pane">
<thead>
<th>Username</th><th>Repository Name</th><th>Operation</th><th>Timestamp</th>
</thead>
<tbody>
<tr>
<td>Haox</td><td>myrepo/Ubuntu</td><td>Create</td><td>2016-03-22 12:35:00</td>
</tr>
<tr>
<td>Haox</td><td>myrepo/MySQL</td><td>Push</td><td>2016-03-22 12:35:00</td>
</tr>
<tr>
<td>Daniel</td><td>myproject/Golang</td><td>Create</td><td>2016-03-12 12:35:00</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
<div class="footer">
<p>Copyright © 2015-2016 VMware, Inc. All Rights Reserved.</p>
</div>

View File

View File

@ -0,0 +1,54 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container container-custom">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-harbor-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><img class="img-responsive" src="/static/ng/resources/img/Harbor_Logo_rec.png" alt="Harbor's Logo"/></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-harbor-navbar-collapse-1">
<ul class="nav navbar-nav navbar-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-globe"></span>
Language<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">English</a></li>
<li><a href="#">中文</a></li>
</ul>
</li>
</ul>
<!--ul class="nav navbar-nav navbar-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span>
admin<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Change Password</a></li>
<li><a href="#">Log Out</a></li>
</ul>
</li>
</ul-->
<ul class="nav navbar-nav navbar-right">
<li>
<ul class="nav-custom">
<li><a href="#">Dashboard</a></li>
<li class="active"><a href="#">My Projects</a></li>
<li><a href="#">Admin Options</a></li>
</ul>
</li>
<li>
<form class="navbar-form pull-right" role="search">
<div class="form-group">
<input type="text" class="form-control search-icon" placeholder="projects or repositories" size="35">
</div>
</form>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>

View File

@ -0,0 +1,21 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Include meta tag to ensure proper rendering and touch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<link rel="stylesheet" href="/static/ng/resources/css/header.css">
<link rel="stylesheet" href="/static/ng/resources/css/footer.css">
<link rel="stylesheet" href="/static/ng/resources/css/index.css">
<link rel="stylesheet" href="/static/ng/resources/css/dashboard.css">
<link rel="stylesheet" href="/static/ng/resources/css/project.css">
<link rel="stylesheet" href="/static/ng/resources/css/repository.css">