Browse Source

Merge branch 'master' into issue-2899

bubble
Tony Tam 7 years ago
committed by GitHub
parent
commit
4da6126d10
8 changed files with 28 additions and 20 deletions
  1. +9
    -9
      dist/swagger-ui-bundle.js
  2. +1
    -1
      dist/swagger-ui-bundle.js.map
  3. +6
    -6
      dist/swagger-ui.js
  4. +1
    -1
      dist/swagger-ui.js.map
  5. +4
    -0
      src/core/components/auth/authorize-operation-btn.jsx
  6. +4
    -0
      src/core/plugins/auth/selectors.js
  7. +1
    -1
      src/core/plugins/view/root-injects.js
  8. +2
    -2
      src/core/utils.js

+ 9
- 9
dist/swagger-ui-bundle.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/swagger-ui-bundle.js.map View File

@@ -1 +1 @@
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AA66IA;AA27FA;AAuwGA;AAilFA;AAikFA;AAs9CA;AA8jDA;AA2qCA;AA4tEA;AAgkIA;;;;;;;;;;;;;;AAw4GA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAyxDA;AAw6BA;;;;;;AA8vEA;AA+zFA;;;;;AA23CA;AA2qFA;AAq2CA;AA0kCA;AAs/CA;AA0wEA;AA49FA;;;;;;;;;AA20BA;AA2zIA;AAi4DA;AA6tDA","sourceRoot":""}
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AA66IA;AA27FA;AAuwGA;AAilFA;AAikFA;AAs9CA;AA8jDA;AA2qCA;AA4tEA;AAgkIA;;;;;;;;;;;;;;AAw4GA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAyxDA;AAw6BA;;;;;;AA8vEA;AAm0FA;;;;;AA23CA;AA2qFA;AAw2CA;AA2kCA;AAq/CA;AAwwEA;AA48FA;;;;;;;;;AA81BA;AA2zIA;AAi4DA;AA6tDA","sourceRoot":""}

+ 6
- 6
dist/swagger-ui.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/swagger-ui.js.map View File

@@ -1 +1 @@
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAuwCA;AAoyHA;AA2wHA;AA07FA;AA+nCA;AAohCA;AAghCA;AAk4BA","sourceRoot":""}
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;;;;;;AAuwCA;AAoyHA;AA2wHA;AA07FA;AAmoCA;AAghCA;AA0gCA;AAw4BA","sourceRoot":""}

+ 4
- 0
src/core/components/auth/authorize-operation-btn.jsx View File

@@ -16,6 +16,10 @@ export default class AuthorizeOperationBtn extends React.Component {


let isAuthorized = authSelectors.isAuthorized(security) let isAuthorized = authSelectors.isAuthorized(security)


if(isAuthorized === null) {
return null
}

return ( return (
<button className={isAuthorized ? "authorization__btn locked" : "authorization__btn unlocked"} onClick={ this.onClick }> <button className={isAuthorized ? "authorization__btn locked" : "authorization__btn unlocked"} onClick={ this.onClick }>
<svg width="20" height="20"> <svg width="20" height="20">


+ 4
- 0
src/core/plugins/auth/selectors.js View File

@@ -67,6 +67,10 @@ export const authorized = createSelector(
export const isAuthorized = ( state, securities ) =>( { authSelectors } ) => { export const isAuthorized = ( state, securities ) =>( { authSelectors } ) => {
let authorized = authSelectors.authorized() let authorized = authSelectors.authorized()


if(!List.isList(securities)) {
return null
}

return !!securities.toJS().filter( ( security ) => { return !!securities.toJS().filter( ( security ) => {
let isAuthorized = true let isAuthorized = true




+ 1
- 1
src/core/plugins/view/root-injects.js View File

@@ -74,7 +74,7 @@ const createClass = component => React.createClass({
const Fallback = ({ name }) => <div style={{ // eslint-disable-line react/prop-types const Fallback = ({ name }) => <div style={{ // eslint-disable-line react/prop-types
padding: "1em", padding: "1em",
"color": "#aaa" "color": "#aaa"
}}>😱 <i>Could not render { name || name === "t" ? name : "this component" }, see the console.</i></div>
}}>😱 <i>Could not render { name === "t" ? "this component" : name }, see the console.</i></div>


const wrapRender = (component) => { const wrapRender = (component) => {
const isStateless = component => !(component.prototype && component.prototype.isReactComponent) const isStateless = component => !(component.prototype && component.prototype.isReactComponent)


+ 2
- 2
src/core/utils.js View File

@@ -453,13 +453,13 @@ export const propChecker = (props, nextProps, objectList=[], ignoreList=[]) => {
} }


const validateNumber = ( val ) => { const validateNumber = ( val ) => {
if ( !/^\d+(.?\d+)?$/.test(val)) {
if ( !/^-?\d+(.?\d+)?$/.test(val)) {
return "Value must be a number" return "Value must be a number"
} }
} }


const validateInteger = ( val ) => { const validateInteger = ( val ) => {
if ( !/^\d+$/.test(val)) {
if ( !/^-?\d+$/.test(val)) {
return "Value must be integer" return "Value must be integer"
} }
} }


Loading…
Cancel
Save