style and some fixes

This commit is contained in:
Olivier Lambert
2016-03-24 18:25:36 +01:00
parent e965f222db
commit 6b95c63c1e
4 changed files with 23 additions and 4 deletions

View File

@@ -113,3 +113,22 @@ $fa-font-path: "./";
}
}
}
// TAB STYLE ===================================================================
.react-tabs [role=tablist] {
font-size: 1.2em;
}
.react-tabs [role=tab] {
padding-left: 1em;
padding-right: 1em;
}
// .react-tabs [role=tab][aria-selected=true] {
// }
//
// .react-tabs [role=tab][aria-disabled=true] {
// }
//
// .react-tabs [role=tab]:focus:after {
// }

2
src/node_modules/utils/index.js generated vendored
View File

@@ -161,7 +161,7 @@ assign(propTypes, PropTypes)
// -------------------------------------------------------------------
export const formatSize = (bytes) => humanFormat(bytes, { scale: 'binary' })
export const formatSize = (bytes) => humanFormat(bytes, { scale: 'binary', unit: 'B' })
export const parseSize = (size) => {
let bytes = humanFormat.parse.raw(size, { scale: 'binary' })

View File

@@ -42,7 +42,7 @@ class XoApp extends Component {
status
} = this.props
return <div>
return <div className='container-fluid'>
<h1>Xen Orchestra</h1>
<p>

View File

@@ -2,7 +2,7 @@ import _ from 'messages'
import React, { Component } from 'react'
import xo from 'xo'
import { Row, Col } from 'grid'
import { connectStore, osFamily } from 'utils'
import { connectStore, osFamily, formatSize } from 'utils'
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
import VmActionBar from './action-bar'
@@ -64,7 +64,7 @@ export default class extends Component {
</Col>
<Col size={3}>
{ /* TODO: compute nicely RAM units */ }
<h2>{vm.memory.size / 1073741824}GB <i className='xo-icon-memory fa-lg'></i></h2>
<h2>{formatSize(vm.memory.size)} <i className='xo-icon-memory fa-lg'></i></h2>
</Col>
<Col size={3}>
{ /* TODO: compute total disk usage */ }