Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes images in details-panel after service -> resources change #2885

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/app/scripts/actions/app-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ export function getImagesForService(orgId, serviceId) {
serviceId
});

api.getFluxImages(orgId, serviceId)
// Use the fluxv2 api
api.getFluxImages(orgId, serviceId, 2)
.then((services) => {
dispatch({
type: ActionTypes.RECEIVE_SERVICE_IMAGES,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CircularProgress } from 'weaveworks-ui-components';

import { getImagesForService } from '../../actions/app-actions';

const topologyWhitelist = ['services', 'deployments'];
const topologyWhitelist = ['kube-controllers'];

function getNewImages(images, currentId) {
// Assume that the current image is always in the list of all available images.
Expand Down Expand Up @@ -107,7 +107,8 @@ class NodeDetailsImageStatus extends React.PureComponent {

function mapStateToProps({ scope }, { metadata, name }) {
const namespace = find(metadata, d => d.id === 'kubernetes_namespace');
const serviceId = namespace ? `${namespace.value}/${name}` : null;
const nodeType = find(metadata, d => d.id === 'kubernetes_node_type');
const serviceId = (namespace && nodeType) ? `${namespace.value}:${nodeType.value.toLowerCase()}/${name}` : null;
const { containers, isFetching, errors } = scope.getIn(['serviceImages', serviceId]) || {};

return {
Expand Down