Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
46 lines (41 sloc)
1.1 KB
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
import { | |
ContentRef, | |
HostRef, | |
KernelspecProps, | |
KernelspecsRef | |
} from "@nteract/types"; | |
import * as actionTypes from "../actionTypes"; | |
export const fetchKernelspecs = (payload: { | |
kernelspecsRef: KernelspecsRef; | |
hostRef: HostRef; | |
}): actionTypes.FetchKernelspecs => ({ | |
type: actionTypes.FETCH_KERNELSPECS, | |
payload | |
}); | |
export const fetchKernelspecsFulfilled = (payload: { | |
kernelspecsRef: KernelspecsRef; | |
hostRef: HostRef; | |
defaultKernelName: string; | |
kernelspecs: { [kernelspec: string]: KernelspecProps }; | |
}): actionTypes.FetchKernelspecsFulfilled => ({ | |
type: actionTypes.FETCH_KERNELSPECS_FULFILLED, | |
payload | |
}); | |
export const fetchKernelspecsFailed = (payload: { | |
kernelspecsRef: KernelspecsRef; | |
error: object; | |
}): actionTypes.FetchKernelspecsFailed => ({ | |
type: actionTypes.FETCH_KERNELSPECS_FAILED, | |
payload | |
}); | |
// "legacy" action that pushes kernelspec info back up | |
// for the notebook document | |
export function setKernelMetadata(payload: { | |
kernelInfo: any; | |
contentRef: ContentRef; | |
}): actionTypes.SetKernelMetadata { | |
return { | |
type: actionTypes.SET_KERNEL_METADATA, | |
payload | |
}; | |
} |