-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a233f01
commit 1224812
Showing
39 changed files
with
234 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createAction } from 'redux-actions'; | ||
|
||
export const SET_CONTENTS = 'LOGS_SET_CONTENTS'; | ||
export const setContents = createAction(SET_CONTENTS); | ||
export const APPEND_CONTENTS = 'LOGS_APPEND_CONTENTS'; | ||
export const appendContents = createAction(APPEND_CONTENTS); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { createAsyncAction } from '../../actions'; | ||
|
||
export const GET_DELTA = 'LOGS_GET_DELTA'; | ||
export const getDeltaAsync = createAsyncAction(GET_DELTA, 'logs.delta', '/log/get/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { createAsyncAction, createAsyncPostAction } from '../../actions'; | ||
|
||
export const GET_LOG = 'SETTINGS_GET_LOG'; | ||
export const getLog = createAsyncAction(GET_LOG, 'logs', '/log/rotate'); | ||
export const getLog = createAsyncAction(GET_LOG, 'settings.logs', '/log/rotate'); | ||
export const SET_LOG = 'SETTINGS_SET_LOG'; | ||
export const setLog = createAsyncPostAction(SET_LOG, 'setLogs', '/log/rotate'); | ||
export const setLog = createAsyncPostAction(SET_LOG, 'settings.setLogs', '/log/rotate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { combineReducers } from 'redux'; | ||
import { contents } from './logs/Contents'; | ||
import { delta } from './logs/Delta'; | ||
|
||
export default combineReducers({ | ||
contents, | ||
delta, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { handleActions } from 'redux-actions'; | ||
import { concat } from 'lodash'; | ||
import { SET_CONTENTS, APPEND_CONTENTS } from '../../actions/logs/Contents'; | ||
|
||
const defaultState = { | ||
lines: [], | ||
position: 0, | ||
}; | ||
|
||
export const contents = handleActions({ | ||
[SET_CONTENTS]: (state, action) => { | ||
if (action.error) { return state; } | ||
const lines = action.payload.lines || []; | ||
return Object.assign({}, state, { lines }); | ||
}, | ||
[APPEND_CONTENTS]: (state, action) => { | ||
if (action.error) { return state; } | ||
const lines = concat(state.lines, action.payload); | ||
return Object.assign({}, state, { lines }); | ||
}, | ||
}, defaultState); | ||
|
||
export default {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createApiReducer } from '../../reducers'; | ||
import { GET_DELTA } from '../../actions/logs/Delta'; | ||
|
||
export const delta = createApiReducer(GET_DELTA); | ||
|
||
export default {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import { combineReducers } from 'redux'; | ||
import { createApiReducer } from '../../reducers'; | ||
import { GET_LOG, SET_LOG } from '../../actions/settings/Log'; | ||
|
||
export const logs = createApiReducer(GET_LOG); | ||
export const setLogs = createApiReducer(SET_LOG); | ||
|
||
export default combineReducers({ | ||
logs, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,3 +409,6 @@ a.logo span { | |
background-color: #fff; | ||
color: #b0b5b9; | ||
} | ||
.log-panel .panel-body { | ||
white-space: pre; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.