Browse Source

asset chain crash handler

all-modes
pbca26 8 years ago
parent
commit
346fb0a229
  1. 13
      react/src/actions/actions/nativeSyncInfo.js
  2. 6
      react/src/actions/actions/settings.js
  3. 2
      react/src/components/dashboard/coindDownModal/coindDownModal.render.js
  4. 9
      react/src/components/overrides.scss

13
react/src/actions/actions/nativeSyncInfo.js

@ -182,7 +182,12 @@ export function getSyncInfoNative(coin, skipDebug) {
true true
) )
); );
dispatch(getDebugLog('komodo', 50));
if (coin === 'KMD') {
dispatch(getDebugLog('komodo', 50));
} else {
dispatch(getDebugLog('komodo', 50, coin));
}
dispatch(toggleCoindDownModal(true)); dispatch(toggleCoindDownModal(true));
} else { } else {
json = JSON.parse(json); json = JSON.parse(json);
@ -190,7 +195,11 @@ export function getSyncInfoNative(coin, skipDebug) {
if (json.error && if (json.error &&
json.error.message.indexOf('Activating best') === -1) { json.error.message.indexOf('Activating best') === -1) {
dispatch(getDebugLog('komodo', 1)); if (coin === 'KMD') {
dispatch(getDebugLog('komodo', 1));
} else {
dispatch(getDebugLog('komodo', 1, coin));
}
} }
if (Config.debug) { if (Config.debug) {

6
react/src/actions/actions/settings.js

@ -167,12 +167,16 @@ function getDebugLogState(json) {
} }
} }
export function getDebugLog(target, linesCount) { export function getDebugLog(target, linesCount, acName) {
const payload = { const payload = {
'herdname': target, 'herdname': target,
'lastLines': linesCount 'lastLines': linesCount
}; };
if (acName) {
payload['ac'] = acName;
}
return dispatch => { return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/debuglog`, { return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/debuglog`, {
method: 'POST', method: 'POST',

2
react/src/components/dashboard/coindDownModal/coindDownModal.render.js

@ -16,7 +16,7 @@ const CoindDownModalRender = function () {
onClick={ this.dismiss }> onClick={ this.dismiss }>
<span>×</span> <span>×</span>
</button> </button>
<h4 className="modal-title white">Komodod is down!</h4> <h4 className="modal-title white">{ this.props.ActiveCoin.coin === 'KMD' ? 'Komodod' : `Komodod / ${this.props.ActiveCoin.coin}` } is down!</h4>
</div> </div>
<div className="modal-body"> <div className="modal-body">
<div className="vertical-align text-center"> <div className="vertical-align text-center">

9
react/src/components/overrides.scss

@ -629,12 +629,19 @@ select{
> div { > div {
height: 100%; height: 100%;
} }
.form-group {
&.form-material {
&.floating {
height: 80%;
}
}
}
.page-content { .page-content {
width: 90%; width: 90%;
height: 100%; height: 100%;
textarea { textarea {
min-height: 200px; height: 100%;
} }
} }
} }

Loading…
Cancel
Save