webpackJsonp([14],{1053:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=a(747),o=a(316),l=a(834),c=a(91),s=a(65),m=function(e){var t=e.rowData,a=e.cellData,r=t.refresh_state;return r.id!==l.b.NORMAL?n.a.createElement(s.a,{size:"small",inline:!0,text:r.str}):n.a.createElement("div",null,n.a.createElement("i",{className:"icon large link green refresh",onClick:function(){return o.a.refreshPaths([t.path])}}),0===a?"Unknown":c.a.formatRelativeTime(a))};t.a=a.i(i.a)(m)},1078:function(e,t,a){"use strict";var r=a(7),n=a.n(r),i=a(734),o=a(834);t.a=n.a.createStore({_viewName:"share_root_view",_apiUrl:o.a.MODULE_URL,mixins:[a.i(i.a)("path")]})},768:function(e,t,a){"use strict";var r=a(0),n=a.n(r),i=a(316),o=a(990),l=a(1078),c=a(733),s=a(300),m=a(182),d=(a.n(m),a(997)),u=a(180),f=a(1053),h=a(11),p=a(27),E=a(119),_=n.a.createClass({displayName:"ShareDirectoryLayout",mixins:[E.c],render:function(){var e=p.a.hasAccess(h.a.SETTINGS_EDIT);return n.a.createElement(c.a,{store:l.a,customFilter:n.a.createElement(d.a,null),footerData:n.a.createElement(u.a,{className:"top left pointing",caption:"Actions...",actions:o.a,header:"Share actions",triggerIcon:"chevron up",ids:["create"],button:!0},n.a.createElement(u.a,{actions:i.a,ids:["refresh"]}))},n.a.createElement(m.Column,{name:"Path",width:200,columnKey:"path",cell:n.a.createElement(s.e,{actions:o.a,ids:["edit","remove"]}),flexGrow:10}),n.a.createElement(m.Column,{name:"Size",width:60,columnKey:"size",cell:n.a.createElement(s.f,null),flexGrow:2}),n.a.createElement(m.Column,{name:"Content",width:150,columnKey:"type",hideWidth:1e3}),n.a.createElement(m.Column,{name:"Virtual name",width:120,columnKey:"virtual_name",flexGrow:5}),n.a.createElement(m.Column,{name:"Profiles",width:65,columnKey:"profiles"}),n.a.createElement(m.Column,{name:"Last refreshed",width:80,flexGrow:3,columnKey:"last_refresh_time",cell:e?n.a.createElement(f.a,null):n.a.createElement(s.j,null)}))}});t["default"]=_},834:function(e,t,a){"use strict";a.d(t,"b",function(){return n});var r="share_roots/v0",n={NORMAL:0,PENDING:1,RUNNING:2};t.a={MODULE_URL:r,ROOTS_URL:r+"/roots",ROOT_POST_URL:r+"/root/add",ROOT_UPDATE_URL:r+"/root/update",ROOT_DELETE_URL:r+"/root/remove",CREATED:"share_root_created",UPDATED:"share_root_updated",REMOVED:"share_root_removed"}},990:function(e,t,a){"use strict";var r=a(7),n=a.n(r),i=a(10),o=a(181),l=a(16),c=a(66),s=a(834),m=a(14),d=a(11),u=n.a.createActions([{create:{displayName:"Add directory",access:d.a.SETTINGS_EDIT,icon:m.a.CREATE}},{edit:{displayName:"Edit directory",access:d.a.SETTINGS_EDIT,icon:m.a.EDIT}},{remove:{asyncResult:!0,children:["confirmed"],displayName:"Remove directory",access:d.a.SETTINGS_EDIT,icon:m.a.REMOVE}}]);u.create.listen(function(e,t){l.a.pushModal(t,t.pathname+"/add",c.a.SHARE_ROOT_MODAL_ID)}),u.edit.listen(function(e,t){l.a.pushModal(t,t.pathname+"/edit",c.a.SHARE_ROOT_MODAL_ID,{rootEntry:e})}),u.remove.listen(function(e){var t={title:this.displayName,content:"Are you sure that you want to remove the directory "+e.virtual_name+" from share? It will be removed from all share profiles.",icon:this.icon,approveCaption:"Remove directory",rejectCaption:"Don't remove"};a.i(o.a)(t,this.confirmed.bind(this,e))}),u.remove.confirmed.listen(function(e){var t=this;return i.a.post(s.a.ROOT_DELETE_URL,{path:e.path}).then(u.remove.completed.bind(t,e))["catch"](u.remove.failed.bind(t,e))}),t.a=u},997:function(e,t,a){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}var n=a(0),i=a.n(n),o=a(67),l=a(58),c=a(736),s=a(328),m={name:"All profiles",id:null},d=i.a.createClass({displayName:"ShareProfileFilter",propTypes:{onFilterUpdated:i.a.PropTypes.func},getInitialState:function(){return{selectedProfile:m}},onClick:function(e){this.props.onFilterUpdated(e.id),this.setState({selectedProfile:e})},getDropdownItem:function(e){var t=this;return i.a.createElement(l.a,{key:e.id,active:!!this.state.selectedProfile&&this.state.selectedProfile.id===e.id,onClick:function(){return t.onClick(e)}},e.name)},getCaption:function(){return this.state.selectedProfile.name},render:function(){return i.a.createElement(o.a,{className:"top right pointing",caption:this.getCaption(),triggerIcon:"filter",button:!0},i.a.createElement("div",{className:"header"},i.a.createElement("i",{className:"filter icon"}),"Filter by profile"),[m].concat(r(this.props.profiles)).map(this.getDropdownItem))}});t.a=a.i(c.a)(a.i(s.a)(d,"profiles"),!1)}});
//# sourceMappingURL=share.chunk.js.map