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
)
);
dispatch(getDebugLog('komodo', 50));
if (coin === 'KMD') {
dispatch(getDebugLog('komodo', 50));
} else {
dispatch(getDebugLog('komodo', 50, coin));
}
dispatch(toggleCoindDownModal(true));
} else {
json = JSON.parse(json);
@ -190,7 +195,11 @@ export function getSyncInfoNative(coin, skipDebug) {
if (json.error &&
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) {

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 = {
'herdname': target,
'lastLines': linesCount
};
if (acName) {
payload['ac'] = acName;
}
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/debuglog`, {
method: 'POST',

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

@ -16,7 +16,7 @@ const CoindDownModalRender = function () {
onClick={ this.dismiss }>
<span>×</span>
</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 className="modal-body">
<div className="vertical-align text-center">

9
react/src/components/overrides.scss

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

Loading…
Cancel
Save