Deprecate showing drive capacity and total free (#5976)

This addresses a situation that we shouldn't be
displaying Total/Free anymore, instead we should simply
show the total usage.
This commit is contained in:
Harshavardhana authored and kannappanr committed 2018-05-23 17:30:25 -07:00
1 parent e6ec645035
commit 000e360196
15 files changed
+54 -163

No files matched your search

+2 -8
View File
@@ -25,23 +25,17 @@ export class StorageInfo extends React.Component {
fetchStorageInfo() fetchStorageInfo()
} }
render() { render() {
const { total, used } = this.props.storageInfo const { used } = this.props.storageInfo
const usedPercent = used / total * 100 + "%"
const freePercent = (total - used) * 100 / total
return ( return (
<div className="feh-used"> <div className="feh-used">
<div className="fehu-chart"> <div className="fehu-chart">
<div style={{ width: usedPercent }} /> <div style={{ width: 0 }} />
</div> </div>
<ul> <ul>
<li> <li>
<span>Used: </span> <span>Used: </span>
{humanize.filesize(used)} {humanize.filesize(used)}
</li> </li>
<li className="pull-right">
<span>Free: </span>
{humanize.filesize(total - used)}
</li>
</ul> </ul>
</div> </div>
) )
@@ -22,7 +22,7 @@ describe("StorageInfo", () => {
it("should render without crashing", () => { it("should render without crashing", () => {
shallow( shallow(
<StorageInfo <StorageInfo
storageInfo={{ total: 100, used: 60 }} storageInfo={{ used: 60 }}
fetchStorageInfo={jest.fn()} fetchStorageInfo={jest.fn()}
/> />
) )
@@ -32,7 +32,7 @@ describe("StorageInfo", () => {
const fetchStorageInfo = jest.fn() const fetchStorageInfo = jest.fn()
shallow( shallow(
<StorageInfo <StorageInfo
storageInfo={{ total: 100, used: 60 }} storageInfo={{ used: 60 }}
fetchStorageInfo={fetchStorageInfo} fetchStorageInfo={fetchStorageInfo}
/> />
) )
@@ -20,7 +20,7 @@ import * as actionsCommon from "../actions"
jest.mock("../../web", () => ({ jest.mock("../../web", () => ({
StorageInfo: jest.fn(() => { StorageInfo: jest.fn(() => {
return Promise.resolve({ storageInfo: { Total: 100, Used: 60 } }) return Promise.resolve({ storageInfo: { Used: 60 } })
}), }),
ServerInfo: jest.fn(() => { ServerInfo: jest.fn(() => {
return Promise.resolve({ return Promise.resolve({
@@ -40,7 +40,7 @@ describe("Common actions", () => {
it("creates common/SET_STORAGE_INFO after fetching the storage details ", () => { it("creates common/SET_STORAGE_INFO after fetching the storage details ", () => {
const store = mockStore() const store = mockStore()
const expectedActions = [ const expectedActions = [
{ type: "common/SET_STORAGE_INFO", storageInfo: { total: 100, used: 60 } } { type: "common/SET_STORAGE_INFO", storageInfo: { used: 60 } }
] ]
return store.dispatch(actionsCommon.fetchStorageInfo()).then(() => { return store.dispatch(actionsCommon.fetchStorageInfo()).then(() => {
const actions = store.getActions() const actions = store.getActions()
+23 -23
View File
@@ -4,7 +4,7 @@
// production/favicon.ico // production/favicon.ico
// production/firefox.png // production/firefox.png
// production/index.html // production/index.html
// production/index_bundle-2018-05-23T09-12-50Z.js // production/index_bundle-2018-05-23T22-34-20Z.js
// production/loader.css // production/loader.css
// production/logo.svg // production/logo.svg
// production/safari.png // production/safari.png
@@ -65,7 +65,7 @@ func productionChromePng() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -82,7 +82,7 @@ func productionFaviconIco() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/favicon.ico", size: 501, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/favicon.ico", size: 501, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -99,7 +99,7 @@ func productionFirefoxPng() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -156,8 +156,8 @@ var _productionIndexHTML = []byte(`<!DOCTYPE html>
</div> </div>
<![endif]--> <![endif]-->
<script>currentUiVersion = '2018-05-23T09:12:50Z'</script> <script>currentUiVersion = '2018-05-23T22:34:20Z'</script>
<script src="index_bundle-2018-05-23T09-12-50Z.js"></script> <script src="index_bundle-2018-05-23T22-34-20Z.js"></script>
</body> </body>
</html> </html>
`) `)
@@ -172,17 +172,17 @@ func productionIndexHTML() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/index.html", size: 1954, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/index.html", size: 1954, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
var _productionIndex_bundle20180523t091250zJs = []byte(`!function(A){function t(e){if(M[e])return M[e].exports;var I=M[e]={i:e,l:!1,exports:{}};return A[e].call(I.exports,I,I.exports,t),I.l=!0,I.exports}var M={};t.m=A,t.c=M,t.d=function(A,M,e){t.o(A,M)||Object.defineProperty(A,M,{configurable:!1,enumerable:!0,get:e})},t.n=function(A){var M=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(M,"a",M),M},t.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},t.p="",t(t.s=316)}([function(A,t,M){"use strict";A.exports=M(522)},function(A,t,M){var e=M(11),I=M(50),g=M(29),i=M(30),n=M(51),o=function(A,t,M){var E,c,T,N,a=A&o.F,r=A&o.G,C=A&o.S,D=A&o.P,B=A&o.B,s=r?e:C?e[t]||(e[t]={}):(e[t]||{}).prototype,Q=r?I:I[t]||(I[t]={}),u=Q.prototype||(Q.prototype={});r&&(M=t);for(E in M)c=!a&&s&&void 0!==s[E],T=(c?s:M)[E],N=B&&c?n(T,e):D&&"function"==typeof T?n(Function.call,T):T,s&&i(s,E,T,A&o.U),Q[E]!=T&&g(Q,E,N),D&&u[E]!=T&&(u[E]=T)};e.core=I,o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,A.exports=o},function(A,t,M){"use strict";t.__esModule=!0,t.default=function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}},function(A,t,M){"use strict";t.__esModule=!0;var e=M(185),I=function(A){return A&&A.__esModule?A:{default:A}}(e);t.default=function(A,t){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,I.default)(t))&&"function"!=typeof t?A:t}},function(A,t,M){"use strict";function e(A){return A&&A.__esModule?A:{default:A}}t.__esModule=!0;var I=M(649),g=e(I),i=M(653),n=e(i),o=M(185),E=e(o);t.default=function(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,E.default)(t)));A.prototype=(0,n.default)(t&&t.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),t&&(g.default?(0,g.default)(A,t):A.__proto__=t)}},function(A,t,M){var e,I;/*! var _productionIndex_bundle20180523t223420zJs = []byte(`!function(A){function t(e){if(M[e])return M[e].exports;var I=M[e]={i:e,l:!1,exports:{}};return A[e].call(I.exports,I,I.exports,t),I.l=!0,I.exports}var M={};t.m=A,t.c=M,t.d=function(A,M,e){t.o(A,M)||Object.defineProperty(A,M,{configurable:!1,enumerable:!0,get:e})},t.n=function(A){var M=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(M,"a",M),M},t.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},t.p="",t(t.s=316)}([function(A,t,M){"use strict";A.exports=M(522)},function(A,t,M){var e=M(11),I=M(50),g=M(29),i=M(30),n=M(51),o=function(A,t,M){var E,c,T,N,a=A&o.F,r=A&o.G,C=A&o.S,D=A&o.P,B=A&o.B,s=r?e:C?e[t]||(e[t]={}):(e[t]||{}).prototype,Q=r?I:I[t]||(I[t]={}),u=Q.prototype||(Q.prototype={});r&&(M=t);for(E in M)c=!a&&s&&void 0!==s[E],T=(c?s:M)[E],N=B&&c?n(T,e):D&&"function"==typeof T?n(Function.call,T):T,s&&i(s,E,T,A&o.U),Q[E]!=T&&g(Q,E,N),D&&u[E]!=T&&(u[E]=T)};e.core=I,o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,A.exports=o},function(A,t,M){"use strict";t.__esModule=!0,t.default=function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}},function(A,t,M){"use strict";t.__esModule=!0;var e=M(185),I=function(A){return A&&A.__esModule?A:{default:A}}(e);t.default=function(A,t){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,I.default)(t))&&"function"!=typeof t?A:t}},function(A,t,M){"use strict";function e(A){return A&&A.__esModule?A:{default:A}}t.__esModule=!0;var I=M(649),g=e(I),i=M(653),n=e(i),o=M(185),E=e(o);t.default=function(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,E.default)(t)));A.prototype=(0,n.default)(t&&t.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),t&&(g.default?(0,g.default)(A,t):A.__proto__=t)}},function(A,t,M){var e,I;/*!
Copyright (c) 2016 Jed Watson. Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames http://jedwatson.github.io/classnames
*/ */
!function(){"use strict";function M(){for(var A=[],t=0;t<arguments.length;t++){var e=arguments[t];if(e){var I=typeof e;if("string"===I||"number"===I)A.push(e);else if(Array.isArray(e))A.push(M.apply(null,e));else if("object"===I)for(var i in e)g.call(e,i)&&e[i]&&A.push(i)}}return A.join(" ")}var g={}.hasOwnProperty;void 0!==A&&A.exports?A.exports=M:(e=[],void 0!==(I=function(){return M}.apply(t,e))&&(A.exports=I))}()},function(A,t,M){"use strict";t.__esModule=!0;var e=M(258),I=function(A){return A&&A.__esModule?A:{default:A}}(e);t.default=I.default||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A}},function(A,t,M){"use strict";t.__esModule=!0,t.default=function(A,t){var M={};for(var e in A)t.indexOf(e)>=0||Object.prototype.hasOwnProperty.call(A,e)&&(M[e]=A[e]);return M}},function(A,t,M){A.exports=M(565)()},function(A,t,M){"use strict";function e(A){return function(){for(var t=arguments.length,M=Array(t),e=0;e<t;e++)M[e]=arguments[e];return"function"==typeof M[M.length-1]?A.apply(void 0,M):function(t){return A.apply(void 0,M.concat([t]))}}}function I(A,t){var M=(A.bsClass||"").trim();return null==M&&D()(!1),M+(t?"-"+t:"")}function g(A){var t,M=(t={},t[I(A)]=!0,t);if(A.bsSize){M[I(A,Q.b[A.bsSize]||A.bsSize)]=!0}return A.bsStyle&&(M[I(A,A.bsStyle)]=!0),M}function i(A){return{bsClass:A.bsClass,bsSize:A.bsSize,bsStyle:A.bsStyle,bsRole:A.bsRole}}function n(A){return"bsClass"===A||"bsSize"===A||"bsStyle"===A||"bsRole"===A}function o(A){var t={};return N()(A).forEach(function(A){var M=A[0],e=A[1];n(M)||(t[M]=e)}),[i(A),t]}function E(A,t){var M={};t.forEach(function(A){M[A]=!0});var e={};return N()(A).forEach(function(A){var t=A[0],I=A[1];n(t)||M[t]||(e[t]=I)}),[i(A),e]}function c(A){for(var t=arguments.length,M=Array(t>1?t-1:0),e=1;e<t;e++)M[e-1]=arguments[e];l(M,A)}Object.defineProperty(t,"__esModule",{value:!0}),t.prefix=I,M.d(t,"bsClass",function(){return u}),M.d(t,"bsStyles",function(){return l}),M.d(t,"bsSizes",function(){return y}),t.getClassSet=g,t.splitBsProps=o,t.splitBsPropsAndOmit=E,t.addStyle=c,M.d(t,"_curry",function(){return x});var T=M(191),N=M.n(T),a=M(6),r=M.n(a),C=M(23),D=M.n(C),B=M(8),s=M.n(B),Q=M(25),u=e(function(A,t){var M=t.propTypes||(t.propTypes={}),e=t.defaultProps||(t.defaultProps={});return M.bsClass=s.a.string,e.bsClass=A,t}),l=e(function(A,t,M){"string"!=typeof t&&(M=t,t=void 0);var e=M.STYLES||[],I=M.propTypes||{};A.forEach(function(A){-1===e.indexOf(A)&&e.push(A)});var g=s.a.oneOf(e);if(M.STYLES=e,g._values=e,M.propTypes=r()({},I,{bsStyle:g}),void 0!==t){(M.defaultProps||(M.defaultProps={})).bsStyle=t}return M}),y=e(function(A,t,M){"string"!=typeof t&&(M=t,t=void 0);var e=M.SIZES||[],I=M.propTypes||{};A.forEach(function(A){-1===e.indexOf(A)&&e.push(A)});var g=[];e.forEach(function(A){var t=Q.b[A];t&&t!==A&&g.push(t),g.push(A)});var i=s.a.oneOf(g);return i._values=g,M.SIZES=e,M.propTypes=r()({},I,{bsSize:i}),void 0!==t&&(M.defaultProps||(M.defaultProps={}),M.defaultProps.bsSize=t),M}),x=e},function(A,t,M){var e=M(16);A.exports=function(A){if(!e(A))throw TypeError(A+" is not an object!");return A}},function(A,t){var M=A.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=M)},function(A,t){A.exports=function(A){try{return!!A()}catch(A){return!0}}},function(A,t,M){"use strict";var e=function(){};A.exports=e},function(A,t,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=M(564),I=M(246),g=M(569);M.d(t,"Provider",function(){return e.b}),M.d(t,"createProvider",function(){return e.a}),M.d(t,"connectAdvanced",function(){return I.a}),M.d(t,"connect",function(){return g.a})},function(A,t,M){"use strict";function e(A){return A&&A.__esModule?A:{default:A}}function I(A,t,M,e,I){var i=A[t],o=void 0===i?"undefined":g(i);return n.default.isValidElement(i)?new Error("Invalid "+e+" ` + "`" + `"+I+"` + "`" + ` of type ReactElement supplied to ` + "`" + `"+M+"` + "`" + `, expected an element type (a string or a ReactClass)."):"function"!==o&&"string"!==o?new Error("Invalid "+e+" ` + "`" + `"+I+"` + "`" + ` of value ` + "`" + `"+i+"` + "`" + ` supplied to ` + "`" + `"+M+"` + "`" + `, expected an element type (a string or a ReactClass)."):null}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},i=M(0),n=e(i),o=M(106),E=e(o);t.default=(0,E.default)(I),A.exports=t.default},function(A,t){A.exports=function(A){return"object"==typeof A?null!==A:"function"==typeof A}},function(A,t,M){var e=M(110)("wks"),I=M(63),g=M(11).Symbol,i="function"==typeof g;(A.exports=function(A){return e[A]||(e[A]=i&&g[A]||(i?g:I)("Symbol."+A))}).store=e},function(A,t,M){A.exports=!M(12)(function(){return 7!=ObjLine truncated !function(){"use strict";function M(){for(var A=[],t=0;t<arguments.length;t++){var e=arguments[t];if(e){var I=typeof e;if("string"===I||"number"===I)A.push(e);else if(Array.isArray(e))A.push(M.apply(null,e));else if("object"===I)for(var i in e)g.call(e,i)&&e[i]&&A.push(i)}}return A.join(" ")}var g={}.hasOwnProperty;void 0!==A&&A.exports?A.exports=M:(e=[],void 0!==(I=function(){return M}.apply(t,e))&&(A.exports=I))}()},function(A,t,M){"use strict";t.__esModule=!0;var e=M(258),I=function(A){return A&&A.__esModule?A:{default:A}}(e);t.default=I.default||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A}},function(A,t,M){"use strict";t.__esModule=!0,t.default=function(A,t){var M={};for(var e in A)t.indexOf(e)>=0||Object.prototype.hasOwnProperty.call(A,e)&&(M[e]=A[e]);return M}},function(A,t,M){A.exports=M(565)()},function(A,t,M){"use strict";function e(A){return function(){for(var t=arguments.length,M=Array(t),e=0;e<t;e++)M[e]=arguments[e];return"function"==typeof M[M.length-1]?A.apply(void 0,M):function(t){return A.apply(void 0,M.concat([t]))}}}function I(A,t){var M=(A.bsClass||"").trim();return null==M&&D()(!1),M+(t?"-"+t:"")}function g(A){var t,M=(t={},t[I(A)]=!0,t);if(A.bsSize){M[I(A,Q.b[A.bsSize]||A.bsSize)]=!0}return A.bsStyle&&(M[I(A,A.bsStyle)]=!0),M}function i(A){return{bsClass:A.bsClass,bsSize:A.bsSize,bsStyle:A.bsStyle,bsRole:A.bsRole}}function n(A){return"bsClass"===A||"bsSize"===A||"bsStyle"===A||"bsRole"===A}function o(A){var t={};return N()(A).forEach(function(A){var M=A[0],e=A[1];n(M)||(t[M]=e)}),[i(A),t]}function E(A,t){var M={};t.forEach(function(A){M[A]=!0});var e={};return N()(A).forEach(function(A){var t=A[0],I=A[1];n(t)||M[t]||(e[t]=I)}),[i(A),e]}function c(A){for(var t=arguments.length,M=Array(t>1?t-1:0),e=1;e<t;e++)M[e-1]=arguments[e];l(M,A)}Object.defineProperty(t,"__esModule",{value:!0}),t.prefix=I,M.d(t,"bsClass",function(){return u}),M.d(t,"bsStyles",function(){return l}),M.d(t,"bsSizes",function(){return y}),t.getClassSet=g,t.splitBsProps=o,t.splitBsPropsAndOmit=E,t.addStyle=c,M.d(t,"_curry",function(){return x});var T=M(191),N=M.n(T),a=M(6),r=M.n(a),C=M(23),D=M.n(C),B=M(8),s=M.n(B),Q=M(25),u=e(function(A,t){var M=t.propTypes||(t.propTypes={}),e=t.defaultProps||(t.defaultProps={});return M.bsClass=s.a.string,e.bsClass=A,t}),l=e(function(A,t,M){"string"!=typeof t&&(M=t,t=void 0);var e=M.STYLES||[],I=M.propTypes||{};A.forEach(function(A){-1===e.indexOf(A)&&e.push(A)});var g=s.a.oneOf(e);if(M.STYLES=e,g._values=e,M.propTypes=r()({},I,{bsStyle:g}),void 0!==t){(M.defaultProps||(M.defaultProps={})).bsStyle=t}return M}),y=e(function(A,t,M){"string"!=typeof t&&(M=t,t=void 0);var e=M.SIZES||[],I=M.propTypes||{};A.forEach(function(A){-1===e.indexOf(A)&&e.push(A)});var g=[];e.forEach(function(A){var t=Q.b[A];t&&t!==A&&g.push(t),g.push(A)});var i=s.a.oneOf(g);return i._values=g,M.SIZES=e,M.propTypes=r()({},I,{bsSize:i}),void 0!==t&&(M.defaultProps||(M.defaultProps={}),M.defaultProps.bsSize=t),M}),x=e},function(A,t,M){var e=M(16);A.exports=function(A){if(!e(A))throw TypeError(A+" is not an object!");return A}},function(A,t){var M=A.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=M)},function(A,t){A.exports=function(A){try{return!!A()}catch(A){return!0}}},function(A,t,M){"use strict";var e=function(){};A.exports=e},function(A,t,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=M(564),I=M(246),g=M(569);M.d(t,"Provider",function(){return e.b}),M.d(t,"createProvider",function(){return e.a}),M.d(t,"connectAdvanced",function(){return I.a}),M.d(t,"connect",function(){return g.a})},function(A,t,M){"use strict";function e(A){return A&&A.__esModule?A:{default:A}}function I(A,t,M,e,I){var i=A[t],o=void 0===i?"undefined":g(i);return n.default.isValidElement(i)?new Error("Invalid "+e+" ` + "`" + `"+I+"` + "`" + ` of type ReactElement supplied to ` + "`" + `"+M+"` + "`" + `, expected an element type (a string or a ReactClass)."):"function"!==o&&"string"!==o?new Error("Invalid "+e+" ` + "`" + `"+I+"` + "`" + ` of value ` + "`" + `"+i+"` + "`" + ` supplied to ` + "`" + `"+M+"` + "`" + `, expected an element type (a string or a ReactClass)."):null}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},i=M(0),n=e(i),o=M(106),E=e(o);t.default=(0,E.default)(I),A.exports=t.default},function(A,t){A.exports=function(A){return"object"==typeof A?null!==A:"function"==typeof A}},function(A,t,M){var e=M(110)("wks"),I=M(63),g=M(11).Symbol,i="function"==typeof g;(A.exports=function(A){return e[A]||(e[A]=i&&g[A]||(i?g:I)("Symbol."+A))}).store=e},function(A,t,M){A.exports=!M(12)(function(){return 7!=ObjLine truncated
* Programatically add the following * Programatically add the following
*/ */
for(I=97;I<123;I++)M[String.fromCharCode(I)]=I-32;for(var I=48;I<58;I++)M[I-48]=I;for(I=1;I<13;I++)M["f"+I]=I+111;for(I=0;I<10;I++)M["numpad "+I]=I+96;var g=t.names=t.title={};for(I in M)g[M[I]]=I;for(var i in e)M[i]=e[i]},function(A,t,M){"use strict";function e(A){function t(t,M,e,I,g,i){var n=I||"<<anonymous>>",o=i||e;if(null==M[e])return t?new Error("Required "+g+" ` + "`" + `"+o+"` + "`" + ` was not specified in ` + "`" + `"+n+"` + "`" + `."):null;for(var E=arguments.length,c=Array(E>6?E-6:0),T=6;T<E;T++)c[T-6]=arguments[T];return A.apply(void 0,[M,e,n,g,o].concat(c))}var M=t.bind(null,!1);return M.isRequired=t.bind(null,!0),M}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";function e(A){return function(t,M,e,I,g){var i=e||"<<anonymous>>",n=g||M;if(null==t[M])return new Error("The "+I+" ` + "`" + `"+n+"` + "`" + ` is required to make ` + "`" + `"+i+"` + "`" + ` accessible for users of assistive technologies such as screen readers.");for(var o=arguments.length,E=Array(o>5?o-5:0),c=5;c<o;c++)E[c-5]=arguments[c];return A.apply(void 0,[t,M,e,I,g].concat(E))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";function e(A){return A&&A.ownerDocument||document}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";var e=M(62),I=M.n(e),g=M(7),i=M.n(g),n=M(6),o=M.n(n),E=M(2),c=M.n(E),T=M(3),N=M.n(T),a=M(4),r=M.n(a),C=M(5),D=M.n(C),B=M(0),s=M.n(B),Q=M(8),u=M.n(Q),l=M(15),y=M.n(l),x=M(9),j=M(25),w=M(40),d={active:u.a.bool,disabled:u.a.bool,block:u.a.bool,onClick:u.a.func,componentClass:y.a,href:u.a.string,type:u.a.oneOf(["button","reset","submit"])},Y={active:!1,block:!1,disabled:!1},h=function(A){function t(){return c()(this,t),N()(this,A.apply(this,arguments))}return r()(t,A),t.prototype.renderAnchor=function(A,t){return s.a.createElement(w.a,o()({},A,{className:D()(t,A.disabled&&"disabled")}))},t.prototype.renderButton=function(A,t){var M=A.componentClass,e=i()(A,["componentClass"]),I=M||"button";return s.a.createElement(I,o()({},e,{type:e.type||"button",className:t}))},t.prototype.render=function(){var A,t=this.props,M=t.active,e=t.block,I=t.className,g=i()(t,["active","block","className"]),n=Object(x.splitBsProps)(g),E=n[0],c=n[1],T=o()({},Object(x.getClassSet)(E),(A={active:M},A[Object(x.prefix)(E,"block")]=e,A)),N=D()(I,T);return c.href?this.renderAnchor(c,N):this.renderButton(c,N)},t}(s.a.Component);h.propTypes=d,h.defaultProps=Y,t.a=Object(x.bsClass)("btn",Object(x.bsSizes)([j.c.LARGE,j.c.SMALL,j.c.XSMALL],Object(x.bsStyles)([].concat(I()(j.d),[j.e.DEFAULT,j.e.PRIMARY,j.e.LINK]),j.e.DEFAULT,h)))},function(A,t,M){var e=M(11),I=e["__core-js_shared__"]||(e["__core-js_shared__"]={});A.exports=function(A){return I[A]||(I[A]={})}},function(A,t,M){var e=M(32),I=M(22),g=M(66);A.exports=function(A){return function(t,M,i){var n,o=e(t),E=I(o.length),c=g(i,E);if(A&&M!=M){for(;E>c;)if((n=o[c++])!=n)return!0}else for(;E>c;c++)if((A||c in o)&&o[c]===M)return A||c||0;return!A&&-1}}},function(A,t){t.f=Object.getOwnPropertySymbols},function(A,t){A.exports=function(A,t,M){var e=void 0===M;switch(t.length){case 0:return e?A():A.call(M);case 1:return e?A(t[0]):A.call(M,t[0]);case 2:return e?A(t[0],t[1]):A.call(M,t[0],t[1]);case 3:return e?A(t[0],t[1],t[2]):A.call(M,t[0],t[1],t[2]);case 4:return e?A(t[0],t[1],t[2],t[3]):A.call(M,t[0],t[1],t[2],t[3])}return A.apply(M,t)}},function(A,t,M){var e=M(16),I=M(37),g=M(17)("match");A.exports=function(A){var t;return e(A)&&(void 0!==(t=A[g])?!!t:"RegExp"==I(A))}},function(A,t,M){var e=M(17)("iterator"),I=!1;try{var g=[7][e]();g.return=function(){I=!0},Array.from(g,function(){throw 2})}catch(A){}A.exports=function(A,t){if(!t&&!I)return!1;var M=!1;try{var g=[7],i=g[e]();i.next=function(){return{done:M=!0}},g[e]=function(){return i},A(g)}catch(A){}return M}},function(A,t,M){"use strict";var e=M(10);A.exports=function(){var A=e(this),t="";return A.global&&(t+="g"),A.ignoreCase&&(t+="i"),A.multiline&&(t+="m"),A.unicode&&(t+="u"),A.sticky&&(t+="y"),t}},function(A,t,M){"use strict";var e=M(29),I=M(30),g=M(12),i=M(38),n=M(17);A.exports=function(A,t,M){var o=n(A),E=M(i,o,""[A]),c=E[0],T=E[1];g(function(){var t={};return t[o]=function(){return 7},7!=""[A](t)})&&(I(String.prototype,A,c),e(RegExp.prototype,o,2==t?function(A,t){return T.call(A,this,t)}:function(A){return T.call(A,this)}))}},function(A,t,M){"use strict";var e=M(11),I=M(1),g=M(30),i=M(71),n=M(55),o=M(80),E=M(70),c=M(16),T=M(12),N=M(115),a=M(76),r=M(143);A.exports=function(A,t,M,C,D,B){var s=e[A],Q=s,u=D?"set":"add",l=Q&&Q.prototype,y={},x=function(A){var t=l[A];g(l,A,"delete"==A?function(A){return!(B&&!c(A))&&t.call(this,0===A?0:A)}:"has"==A?function(A){return!(B&&!c(A))&&t.call(this,0===A?0:A)}:"get"==A?function(A){return B&&!c(A)?void 0:t.call(this,0===A?0:A)}:"add"==A?function(A){return t.call(this,0===A?0:A),this}:function(A,M){return t.call(this,0===A?0Line truncated for(I=97;I<123;I++)M[String.fromCharCode(I)]=I-32;for(var I=48;I<58;I++)M[I-48]=I;for(I=1;I<13;I++)M["f"+I]=I+111;for(I=0;I<10;I++)M["numpad "+I]=I+96;var g=t.names=t.title={};for(I in M)g[M[I]]=I;for(var i in e)M[i]=e[i]},function(A,t,M){"use strict";function e(A){function t(t,M,e,I,g,i){var n=I||"<<anonymous>>",o=i||e;if(null==M[e])return t?new Error("Required "+g+" ` + "`" + `"+o+"` + "`" + ` was not specified in ` + "`" + `"+n+"` + "`" + `."):null;for(var E=arguments.length,c=Array(E>6?E-6:0),T=6;T<E;T++)c[T-6]=arguments[T];return A.apply(void 0,[M,e,n,g,o].concat(c))}var M=t.bind(null,!1);return M.isRequired=t.bind(null,!0),M}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";function e(A){return function(t,M,e,I,g){var i=e||"<<anonymous>>",n=g||M;if(null==t[M])return new Error("The "+I+" ` + "`" + `"+n+"` + "`" + ` is required to make ` + "`" + `"+i+"` + "`" + ` accessible for users of assistive technologies such as screen readers.");for(var o=arguments.length,E=Array(o>5?o-5:0),c=5;c<o;c++)E[c-5]=arguments[c];return A.apply(void 0,[t,M,e,I,g].concat(E))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";function e(A){return A&&A.ownerDocument||document}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,A.exports=t.default},function(A,t,M){"use strict";var e=M(62),I=M.n(e),g=M(7),i=M.n(g),n=M(6),o=M.n(n),E=M(2),c=M.n(E),T=M(3),N=M.n(T),a=M(4),r=M.n(a),C=M(5),D=M.n(C),B=M(0),s=M.n(B),Q=M(8),u=M.n(Q),l=M(15),y=M.n(l),x=M(9),j=M(25),w=M(40),d={active:u.a.bool,disabled:u.a.bool,block:u.a.bool,onClick:u.a.func,componentClass:y.a,href:u.a.string,type:u.a.oneOf(["button","reset","submit"])},Y={active:!1,block:!1,disabled:!1},h=function(A){function t(){return c()(this,t),N()(this,A.apply(this,arguments))}return r()(t,A),t.prototype.renderAnchor=function(A,t){return s.a.createElement(w.a,o()({},A,{className:D()(t,A.disabled&&"disabled")}))},t.prototype.renderButton=function(A,t){var M=A.componentClass,e=i()(A,["componentClass"]),I=M||"button";return s.a.createElement(I,o()({},e,{type:e.type||"button",className:t}))},t.prototype.render=function(){var A,t=this.props,M=t.active,e=t.block,I=t.className,g=i()(t,["active","block","className"]),n=Object(x.splitBsProps)(g),E=n[0],c=n[1],T=o()({},Object(x.getClassSet)(E),(A={active:M},A[Object(x.prefix)(E,"block")]=e,A)),N=D()(I,T);return c.href?this.renderAnchor(c,N):this.renderButton(c,N)},t}(s.a.Component);h.propTypes=d,h.defaultProps=Y,t.a=Object(x.bsClass)("btn",Object(x.bsSizes)([j.c.LARGE,j.c.SMALL,j.c.XSMALL],Object(x.bsStyles)([].concat(I()(j.d),[j.e.DEFAULT,j.e.PRIMARY,j.e.LINK]),j.e.DEFAULT,h)))},function(A,t,M){var e=M(11),I=e["__core-js_shared__"]||(e["__core-js_shared__"]={});A.exports=function(A){return I[A]||(I[A]={})}},function(A,t,M){var e=M(32),I=M(22),g=M(66);A.exports=function(A){return function(t,M,i){var n,o=e(t),E=I(o.length),c=g(i,E);if(A&&M!=M){for(;E>c;)if((n=o[c++])!=n)return!0}else for(;E>c;c++)if((A||c in o)&&o[c]===M)return A||c||0;return!A&&-1}}},function(A,t){t.f=Object.getOwnPropertySymbols},function(A,t){A.exports=function(A,t,M){var e=void 0===M;switch(t.length){case 0:return e?A():A.call(M);case 1:return e?A(t[0]):A.call(M,t[0]);case 2:return e?A(t[0],t[1]):A.call(M,t[0],t[1]);case 3:return e?A(t[0],t[1],t[2]):A.call(M,t[0],t[1],t[2]);case 4:return e?A(t[0],t[1],t[2],t[3]):A.call(M,t[0],t[1],t[2],t[3])}return A.apply(M,t)}},function(A,t,M){var e=M(16),I=M(37),g=M(17)("match");A.exports=function(A){var t;return e(A)&&(void 0!==(t=A[g])?!!t:"RegExp"==I(A))}},function(A,t,M){var e=M(17)("iterator"),I=!1;try{var g=[7][e]();g.return=function(){I=!0},Array.from(g,function(){throw 2})}catch(A){}A.exports=function(A,t){if(!t&&!I)return!1;var M=!1;try{var g=[7],i=g[e]();i.next=function(){return{done:M=!0}},g[e]=function(){return i},A(g)}catch(A){}return M}},function(A,t,M){"use strict";var e=M(10);A.exports=function(){var A=e(this),t="";return A.global&&(t+="g"),A.ignoreCase&&(t+="i"),A.multiline&&(t+="m"),A.unicode&&(t+="u"),A.sticky&&(t+="y"),t}},function(A,t,M){"use strict";var e=M(29),I=M(30),g=M(12),i=M(38),n=M(17);A.exports=function(A,t,M){var o=n(A),E=M(i,o,""[A]),c=E[0],T=E[1];g(function(){var t={};return t[o]=function(){return 7},7!=""[A](t)})&&(I(String.prototype,A,c),e(RegExp.prototype,o,2==t?function(A,t){return T.call(A,this,t)}:function(A){return T.call(A,this)}))}},function(A,t,M){"use strict";var e=M(11),I=M(1),g=M(30),i=M(71),n=M(55),o=M(80),E=M(70),c=M(16),T=M(12),N=M(115),a=M(76),r=M(143);A.exports=function(A,t,M,C,D,B){var s=e[A],Q=s,u=D?"set":"add",l=Q&&Q.prototype,y={},x=function(A){var t=l[A];g(l,A,"delete"==A?function(A){return!(B&&!c(A))&&t.call(this,0===A?0:A)}:"has"==A?function(A){return!(B&&!c(A))&&t.call(this,0===A?0:A)}:"get"==A?function(A){return B&&!c(A)?void 0:t.call(this,0===A?0:A)}:"add"==A?function(A){return t.call(this,0===A?0:A),this}:function(A,M){return t.call(this,0===A?0Line truncated
@@ -212,7 +212,7 @@ var sM=M(0),QM=M(524),uM=M(234),lM=M(121),yM=M(525),xM=M(526),jM=M(527),wM=M(528
* Copyright(c) 2015 Douglas Christopher Wilson * Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed * MIT Licensed
*/ */
t.parse=e,t.serialize=I;var i=decodeURIComponent,n=encodeURIComponent,o=/; */,E=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},function(A,t,M){"use strict";function e(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function A(A,t){for(var M=0;M<t.length;M++){var e=t[M];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(A,e.key,e)}}return function(t,M,e){return M&&A(t.prototype,M),e&&A(t,e),t}}(),g=function(){function A(){e(this,A),this._data={}}return I(A,[{key:"getItem",value:function(A){return this._data.hasOwnProperty(A)?this._data[A]:void 0}},{key:"setItem",value:function(A,t){return this._data[A]=String(t)}},{key:"removeItem",value:function(A){return delete this._data[A]}},{key:"clear",value:function(){return this._data={}}}]),A}();t.default=g},function(A,t,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=M(45),I=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(e),g={show:!1,type:"danger"};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments[1];switch(t.type){case I.SET:return{show:!0,id:t.alert.id,type:t.alert.type,message:t.alert.message};case I.CLEAR:return t.alert&&t.alert.id!=A.id?A:g;default:return A}}},function(A,t,M){"use strict";function e(A){if(Array.isArray(A)){for(var t=0,M=Array(A.length);t<A.length;t++)M[t]=A[t];return M}return Array.from(A)}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A},g=M(46),i=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(g),n=function(A,t){var M=A.findIndex(function(A){return A===t.bucket});return-1==M?A:[].concat(e(A.slice(0,M)),e(A.slice(M+1)))};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{list:[],filter:"",currentBucket:"",showMakeBucketModal:!1,policies:[],showBucketPolicy:!1},t=arguments[1];switch(t.type){case i.SET_LIST:return I({},A,{list:t.buckets});case i.ADD:return I({},A,{list:[t.bucket].concat(e(A.list))});case i.REMOVE:return I({},A,{list:n(A.list,t)});case i.SET_FILTER:return I({},A,{filter:t.filter});case i.SET_CURRENT_BUCKET:return I({},A,{currentBucket:t.bucket});case i.SHOW_MAKE_BUCKET_MODAL:return I({},A,{showMakeBucketModal:t.show});case i.SET_POLICIES:return I({},A,{policies:t.policies});case i.SHOW_BUCKET_POLICY:return I({},A,{showBucketPolicy:t.show});default:return A}}},function(A,t,M){"use strict";function e(A){if(Array.isArray(A)){for(var t=0,M=Array(A.length);t<A.length;t++)M[t]=A[t];return M}return Array.from(A)}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A},g=M(36),i=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(g),n=function(A,t,M){var I=A.findIndex(function(A){return M(A)===t});return-1==I?A:[].concat(e(A.slice(0,I)),e(A.slice(I+1)))};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{list:[],sortBy:"",sortOrder:!1,currentPrefix:"",marker:"",isTruncated:!1,prefixWritable:!1,shareObject:{show:!1,object:"",url:""},checkedList:[]},t=arguments[1];switch(t.type){case i.SET_LIST:return I({},A,{list:t.objects,marker:t.marker,isTruncated:t.isTruncated});case i.APPEND_LIST:return I({},A,{list:[].concat(e(A.list),e(t.objects)),marker:t.marker,isTruncated:t.isTruncated});case i.REMOVE:return I({},A,{list:n(A.list,t.object,function(A){return A.name})});case i.SET_SORT_BY:return I({},A,{sortBy:t.sortBy});case i.SET_SORT_ORDER:return I({},A,{sortOrder:t.sortOrder});case i.SET_CURRENT_PREFIX:return I({},A,{currentPrefix:t.prefix,marker:"",isTruncated:!1});case i.SET_PREFIX_WRITABLE:return I({},A,{prefixWritable:t.prefixWritable});case i.SET_SHARE_OBJECT:return I({},A,{shareObject:{show:t.show,object:t.object,url:t.url}});case i.CHECKED_LIST_ADD:return I({},A,{checkedList:[].concat(e(A.checkedList),[t.object])});case i.CHECKED_LIST_REMOVE:return I({},A,{checkedList:n(A.checkedList,t.object,function(A){return A})});case i.CHECKED_LIST_RESET:return I({},A,{checkedList:[]});default:return A}}},function(A,t,M){"use strict";function e(A,t,M){return t in A?Object.defineProperty(A,t,{value:M,enumerable:!0,configurable:!0,writable:!0}):A[t]=M,A}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[Line truncated t.parse=e,t.serialize=I;var i=decodeURIComponent,n=encodeURIComponent,o=/; */,E=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},function(A,t,M){"use strict";function e(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function A(A,t){for(var M=0;M<t.length;M++){var e=t[M];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(A,e.key,e)}}return function(t,M,e){return M&&A(t.prototype,M),e&&A(t,e),t}}(),g=function(){function A(){e(this,A),this._data={}}return I(A,[{key:"getItem",value:function(A){return this._data.hasOwnProperty(A)?this._data[A]:void 0}},{key:"setItem",value:function(A,t){return this._data[A]=String(t)}},{key:"removeItem",value:function(A){return delete this._data[A]}},{key:"clear",value:function(){return this._data={}}}]),A}();t.default=g},function(A,t,M){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=M(45),I=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(e),g={show:!1,type:"danger"};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments[1];switch(t.type){case I.SET:return{show:!0,id:t.alert.id,type:t.alert.type,message:t.alert.message};case I.CLEAR:return t.alert&&t.alert.id!=A.id?A:g;default:return A}}},function(A,t,M){"use strict";function e(A){if(Array.isArray(A)){for(var t=0,M=Array(A.length);t<A.length;t++)M[t]=A[t];return M}return Array.from(A)}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A},g=M(46),i=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(g),n=function(A,t){var M=A.findIndex(function(A){return A===t.bucket});return-1==M?A:[].concat(e(A.slice(0,M)),e(A.slice(M+1)))};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{list:[],filter:"",currentBucket:"",showMakeBucketModal:!1,policies:[],showBucketPolicy:!1},t=arguments[1];switch(t.type){case i.SET_LIST:return I({},A,{list:t.buckets});case i.ADD:return I({},A,{list:[t.bucket].concat(e(A.list))});case i.REMOVE:return I({},A,{list:n(A.list,t)});case i.SET_FILTER:return I({},A,{filter:t.filter});case i.SET_CURRENT_BUCKET:return I({},A,{currentBucket:t.bucket});case i.SHOW_MAKE_BUCKET_MODAL:return I({},A,{showMakeBucketModal:t.show});case i.SET_POLICIES:return I({},A,{policies:t.policies});case i.SHOW_BUCKET_POLICY:return I({},A,{showBucketPolicy:t.show});default:return A}}},function(A,t,M){"use strict";function e(A){if(Array.isArray(A)){for(var t=0,M=Array(A.length);t<A.length;t++)M[t]=A[t];return M}return Array.from(A)}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[e])}return A},g=M(36),i=function(A){if(A&&A.__esModule)return A;var t={};if(null!=A)for(var M in A)Object.prototype.hasOwnProperty.call(A,M)&&(t[M]=A[M]);return t.default=A,t}(g),n=function(A,t,M){var I=A.findIndex(function(A){return M(A)===t});return-1==I?A:[].concat(e(A.slice(0,I)),e(A.slice(I+1)))};t.default=function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{list:[],sortBy:"",sortOrder:!1,currentPrefix:"",marker:"",isTruncated:!1,prefixWritable:!1,shareObject:{show:!1,object:"",url:""},checkedList:[]},t=arguments[1];switch(t.type){case i.SET_LIST:return I({},A,{list:t.objects,marker:t.marker,isTruncated:t.isTruncated});case i.APPEND_LIST:return I({},A,{list:[].concat(e(A.list),e(t.objects)),marker:t.marker,isTruncated:t.isTruncated});case i.REMOVE:return I({},A,{list:n(A.list,t.object,function(A){return A.name})});case i.SET_SORT_BY:return I({},A,{sortBy:t.sortBy});case i.SET_SORT_ORDER:return I({},A,{sortOrder:t.sortOrder});case i.SET_CURRENT_PREFIX:return I({},A,{currentPrefix:t.prefix,marker:"",isTruncated:!1});case i.SET_PREFIX_WRITABLE:return I({},A,{prefixWritable:t.prefixWritable});case i.SET_SHARE_OBJECT:return I({},A,{shareObject:{show:t.show,object:t.object,url:t.url}});case i.CHECKED_LIST_ADD:return I({},A,{checkedList:[].concat(e(A.checkedList),[t.object])});case i.CHECKED_LIST_REMOVE:return I({},A,{checkedList:n(A.checkedList,t.object,function(A){return A})});case i.CHECKED_LIST_RESET:return I({},A,{checkedList:[]});default:return A}}},function(A,t,M){"use strict";function e(A,t,M){return t in A?Object.defineProperty(A,t,{value:M,enumerable:!0,configurable:!0,writable:!0}):A[t]=M,A}Object.defineProperty(t,"__esModule",{value:!0});var I=Object.assign||function(A){for(var t=1;t<arguments.length;t++){var M=arguments[t];for(var e in M)Object.prototype.hasOwnProperty.call(M,e)&&(A[e]=M[Line truncated
* mime-types * mime-types
* Copyright(c) 2014 Jonathan Ong * Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson * Copyright(c) 2015 Douglas Christopher Wilson
@@ -225,17 +225,17 @@ var n=M(831),o=M(833).extname,E=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;t.charset
*/ */
A.exports=M(832)},function(A,t){A.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iaLine truncated A.exports=M(832)},function(A,t){A.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.control+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emergencycalldata.veds+xml":{source:"iaLine truncated
func productionIndex_bundle20180523t091250zJsBytes() ([]byte, error) { func productionIndex_bundle20180523t223420zJsBytes() ([]byte, error) {
return _productionIndex_bundle20180523t091250zJs, nil return _productionIndex_bundle20180523t223420zJs, nil
} }
func productionIndex_bundle20180523t091250zJs() (*asset, error) { func productionIndex_bundle20180523t223420zJs() (*asset, error) {
bytes, err := productionIndex_bundle20180523t091250zJsBytes() bytes, err := productionIndex_bundle20180523t223420zJsBytes()
if err != nil { if err != nil {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/index_bundle-2018-05-23T09-12-50Z.js", size: 2806972, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/index_bundle-2018-05-23T22-34-20Z.js", size: 2806819, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -350,7 +350,7 @@ func productionLoaderCss() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/loader.css", size: 1738, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/loader.css", size: 1738, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -382,7 +382,7 @@ func productionLogoSvg() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/logo.svg", size: 1972, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/logo.svg", size: 1972, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -399,7 +399,7 @@ func productionSafariPng() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "production/safari.png", size: 4971, mode: os.FileMode(436), modTime: time.Unix(1527066786, 0)} info := bindataFileInfo{name: "production/safari.png", size: 4971, mode: os.FileMode(436), modTime: time.Unix(1527114884, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@@ -460,7 +460,7 @@ var _bindata = map[string]func() (*asset, error){
"production/favicon.ico": productionFaviconIco, "production/favicon.ico": productionFaviconIco,
"production/firefox.png": productionFirefoxPng, "production/firefox.png": productionFirefoxPng,
"production/index.html": productionIndexHTML, "production/index.html": productionIndexHTML,
"production/index_bundle-2018-05-23T09-12-50Z.js": productionIndex_bundle20180523t091250zJs, "production/index_bundle-2018-05-23T22-34-20Z.js": productionIndex_bundle20180523t223420zJs,
"production/loader.css": productionLoaderCss, "production/loader.css": productionLoaderCss,
"production/logo.svg": productionLogoSvg, "production/logo.svg": productionLogoSvg,
"production/safari.png": productionSafariPng, "production/safari.png": productionSafariPng,
@@ -512,7 +512,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
"favicon.ico": {productionFaviconIco, map[string]*bintree{}}, "favicon.ico": {productionFaviconIco, map[string]*bintree{}},
"firefox.png": {productionFirefoxPng, map[string]*bintree{}}, "firefox.png": {productionFirefoxPng, map[string]*bintree{}},
"index.html": {productionIndexHTML, map[string]*bintree{}}, "index.html": {productionIndexHTML, map[string]*bintree{}},
"index_bundle-2018-05-23T09-12-50Z.js": {productionIndex_bundle20180523t091250zJs, map[string]*bintree{}}, "index_bundle-2018-05-23T22-34-20Z.js": {productionIndex_bundle20180523t223420zJs, map[string]*bintree{}},
"loader.css": {productionLoaderCss, map[string]*bintree{}}, "loader.css": {productionLoaderCss, map[string]*bintree{}},
"logo.svg": {productionLogoSvg, map[string]*bintree{}}, "logo.svg": {productionLogoSvg, map[string]*bintree{}},
"safari.png": {productionSafariPng, map[string]*bintree{}}, "safari.png": {productionSafariPng, map[string]*bintree{}},
@@ -576,6 +576,6 @@ func assetFS() *assetfs.AssetFS {
panic("unreachable") panic("unreachable")
} }
var UIReleaseTag = "RELEASE.2018-05-23T09-12-50Z" var UIReleaseTag = "RELEASE.2018-05-23T22-34-20Z"
var UICommitID = "c6429e7b0f050683636b4d247b361896f32b71df" var UICommitID = "cf17840db753126eaa0413dbc3b062cc6ee0655e"
var UIVersion = "2018-05-23T09:12:50Z" var UIVersion = "2018-05-23T22:34:20Z"
-3
View File
@@ -929,9 +929,6 @@ func TestAdminServerInfo(t *testing.T) {
if serverInfo.Error != "" { if serverInfo.Error != "" {
t.Errorf("Unexpected error = %v\n", serverInfo.Error) t.Errorf("Unexpected error = %v\n", serverInfo.Error)
} }
if serverInfo.Data.StorageInfo.Free == 0 {
t.Error("Expected StorageInfo.Free to be non empty")
}
if serverInfo.Data.Properties.Region != globalMinioDefaultRegion { if serverInfo.Data.Properties.Region != globalMinioDefaultRegion {
t.Errorf("Expected %s, got %s", globalMinioDefaultRegion, serverInfo.Data.Properties.Region) t.Errorf("Expected %s, got %s", globalMinioDefaultRegion, serverInfo.Data.Properties.Region)
} }
+13 -15
View File
@@ -176,35 +176,39 @@ func (fs *FSObjects) diskUsage(doneCh chan struct{}) {
ticker := time.NewTicker(fs.usageCheckInterval) ticker := time.NewTicker(fs.usageCheckInterval)
defer ticker.Stop() defer ticker.Stop()
var usage uint64
usageFn := func(ctx context.Context, entry string) error { usageFn := func(ctx context.Context, entry string) error {
var fi os.FileInfo
var err error
if hasSuffix(entry, slashSeparator) { if hasSuffix(entry, slashSeparator) {
return nil fi, err = fsStatDir(ctx, entry)
} else {
fi, err = fsStatFile(ctx, entry)
} }
fi, err := fsStatFile(ctx, entry)
if err != nil { if err != nil {
return err return err
} }
usage = usage + uint64(fi.Size()) atomic.AddUint64(&fs.totalUsed, uint64(fi.Size()))
return nil return nil
} }
if err := getDiskUsage(context.Background(), fs.fsPath, usageFn); err != nil { if err := getDiskUsage(context.Background(), fs.fsPath, usageFn); err != nil {
return return
} }
atomic.StoreUint64(&fs.totalUsed, usage)
for { for {
select { select {
case <-doneCh: case <-doneCh:
return return
case <-ticker.C: case <-ticker.C:
usage = 0 var usage uint64
usageFn = func(ctx context.Context, entry string) error { usageFn = func(ctx context.Context, entry string) error {
var fi os.FileInfo
var err error
if hasSuffix(entry, slashSeparator) { if hasSuffix(entry, slashSeparator) {
return nil fi, err = fsStatDir(ctx, entry)
} else {
fi, err = fsStatFile(ctx, entry)
} }
fi, err := fsStatFile(ctx, entry)
if err != nil { if err != nil {
return err return err
} }
@@ -221,14 +225,8 @@ func (fs *FSObjects) diskUsage(doneCh chan struct{}) {
// StorageInfo - returns underlying storage statistics. // StorageInfo - returns underlying storage statistics.
func (fs *FSObjects) StorageInfo(ctx context.Context) StorageInfo { func (fs *FSObjects) StorageInfo(ctx context.Context) StorageInfo {
info, err := getDiskInfo(fs.fsPath)
logger.GetReqInfo(ctx).AppendTags("path", fs.fsPath)
logger.LogIf(ctx, err)
storageInfo := StorageInfo{ storageInfo := StorageInfo{
Total: info.Total, Used: atomic.LoadUint64(&fs.totalUsed),
Free: info.Free,
Used: atomic.LoadUint64(&fs.totalUsed),
} }
storageInfo.Backend.Type = FS storageInfo.Backend.Type = FS
return storageInfo return storageInfo
+2 -10
View File
@@ -319,20 +319,16 @@ func (s *posix) diskUsage() {
ticker := time.NewTicker(s.usageCheckInterval) ticker := time.NewTicker(s.usageCheckInterval)
defer ticker.Stop() defer ticker.Stop()
var usage uint64
usageFn := func(ctx context.Context, entry string) error { usageFn := func(ctx context.Context, entry string) error {
select { select {
case <-s.stopUsageCh: case <-s.stopUsageCh:
return errWalkAbort return errWalkAbort
default: default:
if hasSuffix(entry, slashSeparator) {
return nil
}
fi, err := os.Stat(entry) fi, err := os.Stat(entry)
if err != nil { if err != nil {
return err return err
} }
usage = usage + uint64(fi.Size()) atomic.AddUint64(&s.totalUsage, uint64(fi.Size()))
return nil return nil
} }
} }
@@ -340,7 +336,6 @@ func (s *posix) diskUsage() {
if err := getDiskUsage(context.Background(), s.diskPath, usageFn); err != nil { if err := getDiskUsage(context.Background(), s.diskPath, usageFn); err != nil {
return return
} }
atomic.StoreUint64(&s.totalUsage, usage)
for { for {
select { select {
@@ -349,15 +344,12 @@ func (s *posix) diskUsage() {
case <-globalServiceDoneCh: case <-globalServiceDoneCh:
return return
case <-ticker.C: case <-ticker.C:
usage = 0 var usage uint64
usageFn = func(ctx context.Context, entry string) error { usageFn = func(ctx context.Context, entry string) error {
select { select {
case <-s.stopUsageCh: case <-s.stopUsageCh:
return errWalkAbort return errWalkAbort
default: default:
if hasSuffix(entry, slashSeparator) {
return nil
}
fi, err := os.Stat(entry) fi, err := os.Stat(entry)
if err != nil { if err != nil {
return err return err
+5 -5
View File
@@ -173,19 +173,19 @@ func printObjectAPIMsg() {
// Get formatted disk/storage info message. // Get formatted disk/storage info message.
func getStorageInfoMsg(storageInfo StorageInfo) string { func getStorageInfoMsg(storageInfo StorageInfo) string {
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"), var msg string
humanize.IBytes(uint64(storageInfo.Free)),
humanize.IBytes(uint64(storageInfo.Total)))
if storageInfo.Backend.Type == Erasure { if storageInfo.Backend.Type == Erasure {
diskInfo := fmt.Sprintf(" %d Online, %d Offline. ", storageInfo.Backend.OnlineDisks, storageInfo.Backend.OfflineDisks) diskInfo := fmt.Sprintf(" %d Online, %d Offline. ", storageInfo.Backend.OnlineDisks, storageInfo.Backend.OfflineDisks)
msg += colorBlue("\nStatus:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo) msg += colorBlue("Status:") + fmt.Sprintf(getFormatStr(len(diskInfo), 8), diskInfo)
} }
return msg return msg
} }
// Prints startup message of storage capacity and erasure information. // Prints startup message of storage capacity and erasure information.
func printStorageInfo(storageInfo StorageInfo) { func printStorageInfo(storageInfo StorageInfo) {
logger.StartupMessage(getStorageInfoMsg(storageInfo) + "\n") if msg := getStorageInfoMsg(storageInfo); msg != "" {
logger.StartupMessage(msg)
}
} }
func printCacheStorageInfo(storageInfo StorageInfo) { func printCacheStorageInfo(storageInfo StorageInfo) {
+1 -5
View File
@@ -25,20 +25,16 @@ import (
"strings" "strings"
"testing" "testing"
"time" "time"
humanize "github.com/dustin/go-humanize"
) )
// Tests if we generate storage info. // Tests if we generate storage info.
func TestStorageInfoMsg(t *testing.T) { func TestStorageInfoMsg(t *testing.T) {
infoStorage := StorageInfo{} infoStorage := StorageInfo{}
infoStorage.Total = 10 * humanize.GiByte
infoStorage.Free = 2 * humanize.GiByte
infoStorage.Backend.Type = Erasure infoStorage.Backend.Type = Erasure
infoStorage.Backend.OnlineDisks = 7 infoStorage.Backend.OnlineDisks = 7
infoStorage.Backend.OfflineDisks = 1 infoStorage.Backend.OfflineDisks = 1
if msg := getStorageInfoMsg(infoStorage); !strings.Contains(msg, "2.0 GiB Free, 10 GiB Total") || !strings.Contains(msg, "7 Online, 1 Offline") { if msg := getStorageInfoMsg(infoStorage); !strings.Contains(msg, "7 Online, 1 Offline") {
t.Fatal("Unexpected storage info message, found:", msg) t.Fatal("Unexpected storage info message, found:", msg)
} }
} }
+1 -5
View File
@@ -221,13 +221,9 @@ func testStorageInfoWebHandler(obj ObjectLayer, instanceType string, t TestErrHa
if rec.Code != http.StatusOK { if rec.Code != http.StatusOK {
t.Fatalf("Expected the response status to be 200, but instead found `%d`", rec.Code) t.Fatalf("Expected the response status to be 200, but instead found `%d`", rec.Code)
} }
err = getTestWebRPCResponse(rec, &storageInfoReply) if err = getTestWebRPCResponse(rec, &storageInfoReply); err != nil {
if err != nil {
t.Fatalf("Failed %v", err) t.Fatalf("Failed %v", err)
} }
if storageInfoReply.StorageInfo.Total <= 0 {
t.Fatalf("Got a zero or negative total free space disk")
}
} }
// Wrapper for calling ServerInfo Web Handler // Wrapper for calling ServerInfo Web Handler
-2
View File
@@ -280,8 +280,6 @@ func (s *xlSets) StorageInfo(ctx context.Context) StorageInfo {
storageInfo.Backend.Type = Erasure storageInfo.Backend.Type = Erasure
for _, set := range s.sets { for _, set := range s.sets {
lstorageInfo := set.StorageInfo(ctx) lstorageInfo := set.StorageInfo(ctx)
storageInfo.Total = storageInfo.Total + lstorageInfo.Total
storageInfo.Free = storageInfo.Free + lstorageInfo.Free
storageInfo.Used = storageInfo.Used + lstorageInfo.Used storageInfo.Used = storageInfo.Used + lstorageInfo.Used
storageInfo.Backend.OnlineDisks = storageInfo.Backend.OnlineDisks + lstorageInfo.Backend.OnlineDisks storageInfo.Backend.OnlineDisks = storageInfo.Backend.OnlineDisks + lstorageInfo.Backend.OnlineDisks
storageInfo.Backend.OfflineDisks = storageInfo.Backend.OfflineDisks + lstorageInfo.Backend.OfflineDisks storageInfo.Backend.OfflineDisks = storageInfo.Backend.OfflineDisks + lstorageInfo.Backend.OfflineDisks
-40
View File
@@ -98,46 +98,6 @@ func TestNewXLSets(t *testing.T) {
} }
} }
// TestStorageInfoSets - tests storage info for erasure coded sets of disks.
func TestStorageInfoSets(t *testing.T) {
var nDisks = 16 // Maximum disks.
var erasureDisks []string
for i := 0; i < nDisks; i++ {
// Do not attempt to create this path, the test validates
// so that newXLSets initializes non existing paths
// and successfully returns initialized object layer.
disk := filepath.Join(globalTestTmpDir, "minio-"+nextSuffix())
erasureDisks = append(erasureDisks, disk)
defer os.RemoveAll(disk)
}
endpoints := mustGetNewEndpointList(erasureDisks...)
// Initializes all erasure disks
format, err := waitForFormatXL(context.Background(), true, endpoints, 1, 16)
if err != nil {
t.Fatalf("Unable to format disks for erasure, %s", err)
}
objLayer, err := newXLSets(endpoints, format, 1, 16)
if err != nil {
t.Fatal(err)
}
// Get storage info first attempt.
disks16Info := objLayer.StorageInfo(context.Background())
// This test assumes homogeneity between all disks,
// i.e if we loose one disk the effective storage
// usage values is assumed to decrease. If we have
// heterogenous environment this is not true all the time.
if disks16Info.Free <= 0 {
t.Fatalf("Diskinfo total free values should be greater 0")
}
if disks16Info.Total <= 0 {
t.Fatalf("Diskinfo total values should be greater 0")
}
}
// TestHashedLayer - tests the hashed layer which will be returned // TestHashedLayer - tests the hashed layer which will be returned
// consistently for a given object name. // consistently for a given object name.
func TestHashedLayer(t *testing.T) { func TestHashedLayer(t *testing.T) {
+2 -11
View File
@@ -173,10 +173,7 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
validDisksInfo := sortValidDisksInfo(disksInfo) validDisksInfo := sortValidDisksInfo(disksInfo)
// If there are no valid disks, set total and free disks to 0 // If there are no valid disks, set total and free disks to 0
if len(validDisksInfo) == 0 { if len(validDisksInfo) == 0 {
return StorageInfo{ return StorageInfo{}
Total: 0,
Free: 0,
}
} }
_, sscParity := getRedundancyCount(standardStorageClass, len(disks)) _, sscParity := getRedundancyCount(standardStorageClass, len(disks))
@@ -192,13 +189,7 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
availableDataDisks = uint64(onlineDisks) availableDataDisks = uint64(onlineDisks)
} }
// Return calculated storage info, choose the lowest Total and storageInfo := StorageInfo{}
// Free as the total aggregated values. Total capacity is always
// the multiple of smallest disk among the disk list.
storageInfo := StorageInfo{
Total: validDisksInfo[0].Total * availableDataDisks,
Free: validDisksInfo[0].Free * availableDataDisks,
}
// Combine all disks to get total usage. // Combine all disks to get total usage.
var used uint64 var used uint64
-29
View File
@@ -17,39 +17,10 @@
package cmd package cmd
import ( import (
"context"
"os"
"reflect" "reflect"
"testing" "testing"
) )
// TestStorageInfo - tests storage info.
func TestStorageInfo(t *testing.T) {
objLayer, fsDirs, err := prepareXL16()
if err != nil {
t.Fatalf("Unable to initialize 'XL' object layer.")
}
// Remove all dirs.
for _, dir := range fsDirs {
defer os.RemoveAll(dir)
}
// Get storage info first attempt.
disks16Info := objLayer.StorageInfo(context.Background())
// This test assumes homogenity between all disks,
// i.e if we loose one disk the effective storage
// usage values is assumed to decrease. If we have
// heterogenous environment this is not true all the time.
if disks16Info.Free <= 0 {
t.Fatalf("Diskinfo total free values should be greater 0")
}
if disks16Info.Total <= 0 {
t.Fatalf("Diskinfo total values should be greater 0")
}
}
// Sort valid disks info. // Sort valid disks info.
func TestSortingValidDisks(t *testing.T) { func TestSortingValidDisks(t *testing.T) {
testCases := []struct { testCases := []struct {
+1 -3
View File
@@ -44,9 +44,7 @@ type DriveInfo HealDriveInfo
// StorageInfo - represents total capacity of underlying storage. // StorageInfo - represents total capacity of underlying storage.
type StorageInfo struct { type StorageInfo struct {
Total uint64 // Total disk space. Used uint64 // Total used spaced per tenant.
Free uint64 // Free space available.
Used uint64 // Total used spaced per tenant.
// Backend type. // Backend type.
Backend struct { Backend struct {