Skip to content

Commit

Permalink
add logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jacovinus committed May 12, 2022
1 parent 6d1d813 commit 8239242
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/actions/loadLabelValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default function loadLabelValues(label, labelList, apiUrl) {
l.values = [...values];
}
});
console.log("labels changed from here")
dispatch(setLabels(lsList))
} else if(!response) {
dispatch(setApiError('URL NOT FOUND'))
Expand Down
7 changes: 4 additions & 3 deletions src/actions/loadLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { setQueryTime } from "./setQueryTime";
import setIsEmptyView from "./setIsEmptyView";

// import adjustedStep from "../components/QueryTypeBar/helpers";
const debugMode = store.getState().debugMode
export async function getAsyncResponse(
cb //: callback dispatch function
) {
Expand All @@ -22,7 +23,7 @@ export function sortMessagesByTimestamp(
const startTime = performance.now()
const mess = messages?.sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1));
const duration = performance.now() - startTime;
console.log("sorting logs took: ",duration," ms")
if(debugMode) console.log( "🚧 loadLogs / sorting logs took: ",duration," ms")
return mess

}
Expand Down Expand Up @@ -51,7 +52,7 @@ export function mapStreams (streams) {
});
});
const duration = performance.now() - startTime;
console.log("mapping logs took: ",duration," ms")
if(debugMode) console.log( "🚧 loadLogs / mapping logs took: ",duration," ms")
return messages
};

Expand Down Expand Up @@ -169,7 +170,7 @@ export default function loadLogs() {
if (idResult.length === 0) {
if (debugMode)
console.log(
"getting no data from matrix"
"🚧 loadLogs / getting no data from matrix"
);
dispatch(setIsEmptyView(true));
}
Expand Down
1 change: 0 additions & 1 deletion src/actions/setLabelValues.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const setLabelValues = (labelValues) => (dispatch) => {
console.log('labelValues set to', labelValues)
dispatch({
type: 'SET_LABEL_VALUES',
labelValues
Expand Down
1 change: 0 additions & 1 deletion src/actions/setLabels.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const setLabels = (labels) => (dispatch) => {
console.log('labels set to',labels)
dispatch({
type: 'SET_LABELS',
labels: labels
Expand Down
1 change: 0 additions & 1 deletion src/actions/setQueryLimit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const setQueryLimit = (limit) => (dispatch) => {
console.log("limit set to",limit)
dispatch({
type: 'SET_QUERY_LIMIT',
limit
Expand Down
1 change: 0 additions & 1 deletion src/components/LabelBrowser/ValuesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const ValuesList = (props) => {

useEffect(() => {
setLabelList(labels); // LABELS
console.log('labels changed')
}, [labels]);

const handleRefresh = (e) => {
Expand Down

0 comments on commit 8239242

Please sign in to comment.