-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from everett980/fetch-ddg-action-and-reducer
Fetch ddg action and reducer
- Loading branch information
Showing
24 changed files
with
1,807 additions
and
185 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) 2017 Uber Technologies, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import _identity from 'lodash/identity'; | ||
import { createActions } from 'redux-actions'; | ||
|
||
import { | ||
TDdgAddViewModifierPayload, | ||
TDdgClearViewModifiersFromIndicesPayload, | ||
TDdgRemoveViewModifierFromIndicesPayload, | ||
TDdgRemoveViewModifierPayload, | ||
TDdgViewModifierRemovalPayload, | ||
} from '../model/ddg/types'; | ||
import generateActionTypes from '../utils/generate-action-types'; | ||
|
||
export const actionTypes = generateActionTypes('@jaeger-ui/DEEP-DEPENDENCY-GRAPH', [ | ||
'ADD_VIEW_MODIFIER', | ||
'CLEAR_VIEW_MODIFIERS_FROM_INDICES', | ||
'REMOVE_VIEW_MODIFIER', | ||
'REMOVE_VIEW_MODIFIER_FROM_INDICES', | ||
]); | ||
|
||
const addViewModifier: (kwarg: TDdgAddViewModifierPayload) => TDdgAddViewModifierPayload = _identity; | ||
const clearViewModifiersFromIndices: ( | ||
kwarg: TDdgClearViewModifiersFromIndicesPayload | ||
) => TDdgClearViewModifiersFromIndicesPayload = _identity; | ||
const removeViewModifier: (kwarg: TDdgRemoveViewModifierPayload) => TDdgRemoveViewModifierPayload = _identity; | ||
const removeViewModifierFromIndices: ( | ||
kwarg: TDdgRemoveViewModifierFromIndicesPayload | ||
) => TDdgRemoveViewModifierFromIndicesPayload = _identity; | ||
|
||
export const actions = createActions<TDdgAddViewModifierPayload | TDdgViewModifierRemovalPayload>({ | ||
[actionTypes.ADD_VIEW_MODIFIER]: addViewModifier, | ||
[actionTypes.CLEAR_VIEW_MODIFIERS_FROM_INDICES]: clearViewModifiersFromIndices, | ||
[actionTypes.REMOVE_VIEW_MODIFIER]: removeViewModifier, | ||
[actionTypes.REMOVE_VIEW_MODIFIER_FROM_INDICES]: removeViewModifierFromIndices, | ||
}); |
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
Oops, something went wrong.