Skip to content

Commit

Permalink
Format code before release
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Dec 18, 2020
1 parent 70483b4 commit 52fa999
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 31 deletions.
4 changes: 2 additions & 2 deletions otoroshi/javascript/src/backoffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ window.fetch = function (...params) {
}
throw new Error("You're not allowed to do that !");
} else if (r.status > 499 && window.toast) {
return r.then(text => {
window.toast('Server error', "An error occured server side: " + text, 'error');
return r.then((text) => {
window.toast('Server error', 'An error occured server side: ' + text, 'error');
});
} else {
return r;
Expand Down
10 changes: 5 additions & 5 deletions otoroshi/javascript/src/components/ReloadNewVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export class ReloadNewVersion extends Component {
if (this.state.unlogged) {
return (
<div className="loggedOutVeil">
<div className="topbar-popup" style={{justifyContent:'center'}}>
<div style={{display:'flex', alignItems:'center',marginLeft:10}}>
<div className="topbar-popup" style={{ justifyContent: 'center' }}>
<div style={{ display: 'flex', alignItems: 'center', marginLeft: 10 }}>
Your session has expired and you're now logged out. You will be asked to login in 20
seconds.
<button
Expand All @@ -79,14 +79,14 @@ export class ReloadNewVersion extends Component {
<button
type="button"
className="btn btn-xs"
style={{ alignSelf: 'flex-end',marginTop:5 }}
style={{ alignSelf: 'flex-end', marginTop: 5 }}
onClick={(e) => {
e.preventDefault();
this.setState({ display: false, versionClosed: true });
}}>
<i className="fas fa-times" />
<i className="fas fa-times" />
</button>
<div style={{display:'flex', alignItems:'center', justifyContent:'center'}}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
A new version of Otoroshi has been deployed
<button
type="button"
Expand Down
8 changes: 7 additions & 1 deletion otoroshi/javascript/src/components/TopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,13 @@ export class TopBar extends Component {
: null;
return (
<div style={{ display: 'flex' }}>
<div style={{ width: 60,display: 'flex',justifyContent:'center',alignItems:'center' }}>
<div
style={{
width: 60,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
{p.env && _.isString(p.env) && (
<span className={`label ${this.color(p.env)}`}>{env}</span>
)}
Expand Down
30 changes: 15 additions & 15 deletions otoroshi/javascript/src/components/UpdateOtoroshiVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ export class UpdateOtoroshiVersion extends Component {
if (this.props.env && this.props.env.version && this.props.env.version.outdated && show) {
return (
<div className="topbar-popup">
<button
type="button"
className="btn btn-xs"
style={{ alignSelf: 'flex-end',marginTop: 5 }}
onClick={(e) => {
e.preventDefault();
localStorage.setItem(
'otoroshi_outdated_popup',
JSON.stringify({ closed_at: Date.now() })
);
this.forceUpdate();
}}>
<button
type="button"
className="btn btn-xs"
style={{ alignSelf: 'flex-end', marginTop: 5 }}
onClick={(e) => {
e.preventDefault();
localStorage.setItem(
'otoroshi_outdated_popup',
JSON.stringify({ closed_at: Date.now() })
);
this.forceUpdate();
}}>
<i className="fas fa-times" />
</button>
</button>
<a
style={{ alignSelf: 'center' }}
target="_blank"
Expand All @@ -40,8 +40,8 @@ export class UpdateOtoroshiVersion extends Component {
this.forceUpdate();
}}
href={`https://github.com/MAIF/otoroshi/releases/tag/${this.props.env.version.version_raw}`}>
<i className="fab fa-github" style={{color: '#856404', marginRight:5}}></i>
A new version of Otoroshi is available ({this.props.env.version.version_raw})
<i className="fab fa-github" style={{ color: '#856404', marginRight: 5 }}></i>A new
version of Otoroshi is available ({this.props.env.version.version_raw})
</a>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion otoroshi/javascript/src/components/inputs/CodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class CodeInput extends Component {
this.setState({ value: '{}' });
} else if (e.indexOf('}{}') > -1) {
this.setState({ value: e.replace('}{}', '}') });
} else {
} else {
this.setState({ value: e });
}
}
Expand Down
6 changes: 2 additions & 4 deletions otoroshi/javascript/src/components/inputs/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ export class Table extends Component {
</button>
{this.props.stayAfterSave && (
<button type="button" className="btn btn-primary" onClick={this.createItemAndStay}>
<i className="fas fa-hdd" /> Create and stay on this{' '}
{this.props.itemName}
<i className="fas fa-hdd" /> Create and stay on this {this.props.itemName}
</button>
)}
<button type="button" className="btn btn-primary" onClick={this.createItem}>
Expand Down Expand Up @@ -590,8 +589,7 @@ export class Table extends Component {
</button>
{this.props.stayAfterSave && (
<button type="button" className="btn btn-success" onClick={this.updateItemAndStay}>
<i className="fas fa-hdd" /> Update and stay on this{' '}
{this.props.itemName}
<i className="fas fa-hdd" /> Update and stay on this {this.props.itemName}
</button>
)}
<button type="button" className="btn btn-success" onClick={this.updateItem}>
Expand Down
3 changes: 2 additions & 1 deletion otoroshi/javascript/src/pages/CertificatesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ export class NewCertificateForm extends Component {
keyType: 'RSA',
keySize: 2048,
duration: 365,
subject: this.props.subject || 'SN=Foo, OU=User Certificates, OU=Otoroshi Certificates, O=Otoroshi',
subject:
this.props.subject || 'SN=Foo, OU=User Certificates, OU=Otoroshi Certificates, O=Otoroshi',
host: this.props.host || 'www.foo.bar',
hosts: this.props.host ? [this.props.host] : this.props.hosts || [],
signatureAlg: 'SHA256WithRSAEncryption',
Expand Down
3 changes: 1 addition & 2 deletions otoroshi/javascript/src/pages/ServicesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ export class ServicesPage extends Component {
style: { textAlign: 'center', width: 55 },
noMobile: true,
notFilterable: true,
cell: (v, item) =>
item.redirectToLocal ? <span className="fas fa-check-circle" /> : '',
cell: (v, item) => (item.redirectToLocal ? <span className="fas fa-check-circle" /> : ''),
});
}
}
Expand Down

0 comments on commit 52fa999

Please sign in to comment.