Giter VIP home page Giter VIP logo

Comments (10)

h-mdm avatar h-mdm commented on June 12, 2024

In the current version, the interval cannot be changed. This feature may be implemented in further versions of the product.

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

No sir ,actually in feb month we change it. change the time interval by edit some file in coding path it is working. could you tell me witch file is running. i forget the path

from hmdm-server.

h-mdm avatar h-mdm commented on June 12, 2024

You can change the status change intervals (green / yellow / red) in common/src/main/java/com/hmdm/persistence/mapper/DeviceMapper.xml

Search for 'green', there are two places where the intervals are setup (2 hours for green, 4 hours for yellow).

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

sorry sir i could not find the time limt

there is no like this file common/src/main/java/com/hmdm/persistence/mapper/DeviceMapper.xml

but i am search 'green'. it is only located on this file. i am attached with this mail kindly can you tell me where i can find time interval

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

i found this
app/components/main/controller/devices.controller.js

how can i change it for 5 min

const updateTime = 2 * 60 * 60 * 1000;
$scope.getDeviceIndicatorImage = function (device) {
if (device.statusCode) {
return "images/circle-" + device.statusCode + ".png";
} else {
// This is an old approach but it is left for now just in case
if ((new Date().getTime() - device.lastUpdate) < updateTime) {
return 'images/online.png';
} else if ((new Date().getTime() - device.lastUpdate) < (2 * updateTime)) {
return 'images/away.png';
} else {
return 'images/offline.png';
}
}
};

from hmdm-server.

h-mdm avatar h-mdm commented on June 12, 2024

This is an old approach as stated by the comment. Changing this code will not change the behaviour.

Here is the file: https://github.com/h-mdm/hmdm-server/blob/master/common/src/main/java/com/hmdm/persistence/mapper/DeviceMapper.xml

and this code needs to be changed (there are two entries of similar code):

CASE
WHEN (EXTRACT(EPOCH FROM NOW()) * 1000 - devices.lastupdate) < (2 * 3600 * 1000) THEN 'green'
WHEN (EXTRACT(EPOCH FROM NOW()) * 1000 - devices.lastupdate) < (4 * 3600 * 1000) THEN 'yellow'
ELSE 'red'
END AS statusCode

2 * 3600 * 1000 is 2 hours in milliseconds.

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

ya i understand but this file i don't have it sir

i am follow this page for installation process
https://h-mdm.com/installation/

so this file are not there. what i can do?
i am using community edition version 3.21

from hmdm-server.

h-mdm avatar h-mdm commented on June 12, 2024

The interval can only be changed when you build the system from the source codes. Otherwise, the interval cannot be changed. See readme.md for build instructions.

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

so i want use this build for change interval.
i mean i need to reinstall using this repos file
run ./hmdm_install.sh again
before i want change the code like u mention devicemaper.xml
so it can change the time interval right?

what is the measurement for 5 min? can you tell me
300 * 1000 or
5/60 * 1000 or
5 * 1000

from hmdm-server.

GaneshRamKumar avatar GaneshRamKumar commented on June 12, 2024

working thanks sir

from hmdm-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.