mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-26 21:13:15 +00:00
changed api to namespaces
This commit is contained in:
@@ -104,7 +104,7 @@ export const AddUserModal: FC<AddUserModalProps> = ({isOpen, onCloseModal, userD
|
|||||||
const workspaceChange = (workspaces) => {
|
const workspaceChange = (workspaces) => {
|
||||||
//setWorkspaces(newVal);
|
//setWorkspaces(newVal);
|
||||||
const data = {...userDataModel, workspaceId : workspaces.length ? workspaces[0] : ""}
|
const data = {...userDataModel, workspaceId : workspaces.length ? workspaces[0] : ""}
|
||||||
setUserData((prevState) => {return data});
|
setUserData(data)
|
||||||
setGenarateDisabledState()
|
setGenarateDisabledState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -116,7 +116,11 @@ export const TrafficPage: React.FC<TrafficPageProps> = ({setAnalyzeStatus}) => {
|
|||||||
setLeftOffTop(null);
|
setLeftOffTop(null);
|
||||||
setNoMoreDataTop(false);
|
setNoMoreDataTop(false);
|
||||||
}
|
}
|
||||||
ws.current = new WebSocket(MizuWebsocketURL);
|
let websocketUrl = MizuWebsocketURL;
|
||||||
|
if (api.token) {
|
||||||
|
websocketUrl += `?sessionToken=${api.token}`;
|
||||||
|
}
|
||||||
|
ws.current = new WebSocket(websocketUrl);
|
||||||
ws.current.onopen = () => {
|
ws.current.onopen = () => {
|
||||||
setWsConnection(WsConnectionStatus.Connected);
|
setWsConnection(WsConnectionStatus.Connected);
|
||||||
ws.current.send(query);
|
ws.current.send(query);
|
||||||
|
@@ -104,7 +104,7 @@ export default class Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getNamespaces = async() =>{
|
getNamespaces = async() =>{
|
||||||
const response = await this.client.get(`/config/namespaces`);
|
const response = await this.client.get(`/kube/namespaces`);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user