Skip to content

Commit

Permalink
fix: removed some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla committed Sep 27, 2022
1 parent 8ea0bfe commit e96b124
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const validateInventoryAndGroup = (validationObj) => {
profiles: []
};
let isValid = true;
console.log(validationObj);

// Validate group name
if (validationObj.hasOwnProperty("groupName")){
Expand Down Expand Up @@ -107,7 +106,6 @@ const validateInventoryAndGroup = (validationObj) => {

// Validate profiles
if (validationObj.hasOwnProperty("profiles") && validationObj.hasOwnProperty("initProfiles")){
console.log(validationObj.initProfiles);
for (const prof of validationObj.profiles){
if (!validationObj.initProfiles.includes(prof)){
isValid = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function AddDeviceModal(){
};

const handleApply = useCallback((e) => {
console.log("aplying")
const deviceObj = {
address: GrCtx.address,
port: GrCtx.port,
Expand All @@ -71,18 +70,15 @@ function AddDeviceModal(){
groupId: GrCtx.groupID,
onlyAdress: true,
};
console.log(deviceObj);
const validation = validateInventoryAndGroup(deviceObj)
delete deviceObj.onlyAdress;

if (validation[0]){
// form is valid
ValCtx.resetAllErrors();
if (GrCtx.isDeviceEdit){
console.log("updating device")
updateDevice(deviceObj, GrCtx.deviceID)
}else{
console.log("posting new device")
postDevice(deviceObj);
}
GrCtx.setEditedGroupID(GrCtx.groupID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ function GroupsList() {

useEffect(() => {
let isMounted = true;
console.log('use effect')
axios.get('http://127.0.0.1:5000/groups')
.then((response) => {
if (isMounted){
Expand All @@ -37,7 +36,6 @@ function GroupsList() {
setOpenedGroups(opened);
}
}
console.log('data: ', response.data);
});
GrCtx.setEditedGroupID(null);
return () => { isMounted = false }
Expand Down Expand Up @@ -70,7 +68,6 @@ function GroupsList() {
axios.get(`http://127.0.0.1:5000/group/${groupID}/devices`)
.then((response) => {
GrCtx.setDevices(response.data);
console.log(`devices for groupID ${groupID}:`, response.data);
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ function AddInventoryModal() {
smartProfiles: InvCtx.smartProfiles,
initProfiles: initProfiles
}
console.log("Aplying inventory")
console.log(inventoryObj)
const validation = validateInventoryAndGroup(inventoryObj)
delete inventoryObj.initProfiles;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ function ProfilePanel() {

useEffect(() => {
let isMounted = true;
console.log('use effect')
axios.get('http://127.0.0.1:5000/profiles')
.then((response) => {
if (isMounted)
setProfiles(response.data);
console.log('data: ', response.data);
})
return () => { isMounted = false }
}, [ProfCtx.profilesChange]);
Expand Down

0 comments on commit e96b124

Please sign in to comment.