Skip to content

Commit

Permalink
Merge pull request #266 from baifendian/dev
Browse files Browse the repository at this point in the history
DevToMaster
  • Loading branch information
LuPan2015 authored Sep 29, 2016
2 parents 1bf5efd + a403f4c commit 88ff01f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Aries/hdfs/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def postshare(request,path):
path = os.path.realpath("/%s/%s" %(os.path.sep,path))
space_name = request.GET.get("spaceName","")
proxy_link = hashlib.md5("%s%s%s" %(space_name,path,int(time.time()))).hexdigest()
proxy_link = "{0}/{1}/{2}".format(settings.SHARE_PROXY_BASE_URI,"HDFS/ShowShare",proxy_link)
proxy_link = "{0}/{1}/{2}".format(settings.SHARE_PROXY_BASE_URI,"CloudService/HDFS/ShowShare",proxy_link)
hdfs_logger.info("proxy_link:{0}".format(proxy_link))
# 设置目录权限 chmod -R 755 space_path/path
exitCode,data = share_cmd(space_name,path,"755")
Expand Down
2 changes: 1 addition & 1 deletion Aries/openstack/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def instances_search(request):
sys['image'] = '-'
sys['flavor'] = flavorss.show_detail(host['flavor']['id'])['flavor']['name']
sys['created'] = host['created']
sys['status'] = host['OS-EXT-STS:vm_state']
sys['status'] = host['status']
for key, value in host['addresses'].items():
for ip in value:
for keys, values in ip.items():
Expand Down
23 changes: 22 additions & 1 deletion Aries/openstack/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def instances(request):
login.proid_login()
login.token_login()
vm_manage = Vm_manage()
volume_s = Volume()
if request.method == "GET":
imagess = Image()
flavorss = Flavor()
Expand All @@ -107,7 +108,27 @@ def instances(request):
sys['image'] = '-'
sys['flavor'] = flavorss.show_detail(host['flavor']['id'])['flavor']['name']
sys['created'] = ' '.join( host['created'].split('Z')[0].split('T'))
sys['status'] = host['OS-EXT-STS:vm_state']
sys['status'] = host['status']
try:
volumes_list=host['os-extended-volumes:volumes_attached']
volumes_name_list=[]
for volmes_dict in volumes_list:
volumes_name={}
volumes_details=volume_s.show_detail(volmes_dict['id'])
if volumes_details['volume']['displayName'] == None:
volumes_name['disk_name']=volumes_details['volume']['id']
else:
volumes_name['disk_name']=volumes_details['volume']['displayName']
volumes_name['disk_id']=volumes_details['volume']['id']
volumes_name['size'] = volumes_details['volume']['size']
volumes_name['voumetype'] = 'ceph'
volumes_name['device']=volumes_details['volume']['attachments'][0]['device']
volumes_name_list.append(volumes_name)
sys['disk_list']=volumes_name_list
openstack_log.info("虚拟机磁盘:{0}..{1}".format(host['name'],volumes_name_list))
except Exception,e:
sys['disk_list']=[]
openstack_log.error("虚拟机磁盘:{0}".format(e))
for key, value in host['addresses'].items():
for ip in value:
for keys, values in ip.items():
Expand Down
8 changes: 4 additions & 4 deletions docker-k8s/k8s_config/sirius-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
spec:
containers:
- name: sirius
image: docker.baifendian.com/lupan/sirius_lugu:1
image: docker.baifendian.com/lupan/sirius_lugu:1.0
ports:
- containerPort: 10086
volumeMounts:
Expand All @@ -21,13 +21,13 @@ spec:
- mountPath: /opt/Siurs/download
name: siriusdownload
imagePullSecrets:
- name: docker-registry-sys
- name: docker-registry-sys
volumes:
- emptyDir: {}
name: siriuslog
- emptyDir: {}
name: siriusdownload
imagePullSecrets:
- name: docker-registry-sys
nodeSelector:
kubernetes.io/hostname: 192.168.49.46
#nodeSelector:
# kubernetes.io/hostname: 192.168.49.46
2 changes: 1 addition & 1 deletion package/Aries/src/functions/Openstack/instances/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

.ant-btn {
border-radius: 1px !important;
padding: 5px 15px ;
padding: 5px 7px !important;
}

fieldset.test {
Expand Down
32 changes: 27 additions & 5 deletions package/Aries/src/functions/Openstack/instances/instanses_tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {Tabs, TabList, Tab, TabPanel} from 'bfd/Tabs'
import {Row, Col} from 'bfd/Layout'
import echarts from 'echarts'
import {Timeline} from 'antd'
import TextOverflow from 'bfd/TextOverflow'


const Host_Timeline = React.createClass({
Expand Down Expand Up @@ -141,21 +142,36 @@ const Echarts_s = React.createClass({


const Host_details = React.createClass({
getInitialState: function () {
getInitialState() {
return {
name: this.props.host_desc
column: [{ title: 'ID', order: false, key: 'disk_id'},
{ title: '磁盘名', order: false, key: 'disk_name'},
{ title: '盘符', order: false , key: 'device',},
{ title: '大小', order: false , key: 'size',},
{ title: '类型', order: false , key: 'device',}],
}
},
data(){
let host_desd = this.props.host_desc[0]
//console.log(host)
return host_desd
},
render(){
//console.log(this.props.host_desc,'.........aaaa')
//console.log(this.props.host_desc['name'])
const list=[1]
const nav = this.props.host_desc['disk_list'] && this.props.host_desc['disk_list'].map((item,i)=>{
return (
<Row key={i}>
<Col col="md-2" style={{}}>
<TextOverflow>
<p style={{width: '100px'}}>{item['disk_name']}</p>
</TextOverflow>
</Col>
<Col col="md-2" style={{}}>{item['device']}</Col>
<Col col="md-2" style={{}}>{item['size']}GB</Col>
</Row>
)
})
let host_des = this.props.host_desc

return (
<div>
<div>{host_des[0]}</div>
Expand All @@ -180,6 +196,12 @@ const Host_details = React.createClass({
<Col col="md-2" style={{}}>已创建:</Col>
<Col col="md-4" style={{}}>3小时</Col>
</Row>
<Row>
<span>磁盘:</span>
</Row>
<div>
{this.props.host_desc['disk_list'] ? nav : <span></span>}
</div>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion package/Aries/src/functions/Openstack/volumes/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

.ant-btn {
border-radius: 1px !important;
padding: 5px 15px ;
padding: 5px 7px !important;
}

.DataTableFatherDiv_t {
Expand Down

0 comments on commit 88ff01f

Please sign in to comment.