Skip to content

Commit

Permalink
update views
Browse files Browse the repository at this point in the history
  • Loading branch information
hzwy23 committed Jun 28, 2017
1 parent 64d4669 commit c0396ab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
7 changes: 7 additions & 0 deletions hauth/hrpc/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ func DomainAuth(req *http.Request, domain_id string, pattern string) bool {
return false
}
}

func IsRoot(domainId string) bool {
if domainId == "vertex_root" {
return true
}
return false
}
7 changes: 6 additions & 1 deletion hauth/models/domainShareModels.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"net/url"

"github.com/hzwy23/asofdate/hauth/hrpc"
"github.com/hzwy23/dbobj"
"github.com/hzwy23/utils/logs"
"github.com/hzwy23/utils/validator"
Expand Down Expand Up @@ -147,6 +148,11 @@ func (this DomainShareModel) GetList(domain_id string) ([]DomainMmodel, error) {
logs.Error(err)
return nil, err
}
var dslice []DomainMmodel

if hrpc.IsRoot(domain_id) {
return rst, nil
}

// 获取指定域能够访问到的域信息
ret, err := this.get(domain_id)
Expand All @@ -161,7 +167,6 @@ func (this DomainShareModel) GetList(domain_id string) ([]DomainMmodel, error) {
dmap[val.Project_id] = true
}

var dslice []DomainMmodel
for _, val := range rst {
if _, ok := dmap[val.Project_id]; ok && val.Domain_status_cd == "0" {
dslice = append(dslice, val)
Expand Down
17 changes: 9 additions & 8 deletions views/hauth/domain_share_info.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<span style="font-size: 14px;">域信息共享配置管理</span>
</div>
</div>

<div class="row subsystem-toolbar">
<div class="pull-left" style="height: 44px; line-height: 44px; width: 260px;">
<span style="height: 30px; line-height: 30px; margin-top: 7px;display: inline"
Expand Down Expand Up @@ -212,21 +211,22 @@

$(document).ready(function(){
var hwindow = document.documentElement.clientHeight;
$("#h-domain-info-shareid").height(hwindow-139)
$("#h-domain-share-info-details").height(hwindow-130)
$("#h-domain-info-shareid").height(hwindow-139);
$("#h-domain-share-info-details").height(hwindow-130);

/*
* 初始化左边工具栏中,域选择框
* */
$.getJSON("/v1/auth/domain/owner",function(data){
var arr = new Array()
var arr = new Array();
$(data).each(function(index,element){
var ijs = {}
ijs.id=element.domain_id
ijs.text=element.domain_desc
ijs.upId="####hzwy23###"
var ijs = {};
ijs.id=element.domain_id;
ijs.text=element.domain_desc;
ijs.upId="####hzwy23###";
arr.push(ijs)
});

$("#h-domain-share-domain-list").Hselect({
data:arr,
height:"24px",
Expand All @@ -237,6 +237,7 @@
if (domain_id==null){
return
}

//刷新左侧公告栏信息
$.getJSON("/v1/auth/domain/row/details",{domain_id:domain_id},function(data){
$(data).each(function(index,element){
Expand Down

0 comments on commit c0396ab

Please sign in to comment.