diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..485dee6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.idea
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 55ae199..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-pi-dashboard
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index e206d70..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 1162f43..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 8e25b20..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.idea/pi-dashboard.iml b/.idea/pi-dashboard.iml
deleted file mode 100644
index 6b8184f..0000000
--- a/.idea/pi-dashboard.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index def6a6a..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 7367106..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $USER_HOME$/.subversion
- false
-
-
-
-
- 1504085111730
- 1504085111730
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/d.php b/device.php
similarity index 97%
rename from d.php
rename to device.php
index 50facaf..85a561a 100644
--- a/d.php
+++ b/device.php
@@ -21,7 +21,7 @@ if (isset($_GET['ajax']) && $_GET['ajax'] == "true"){
$D['version'] = '1.0.0';
$D['model'] = get_device_model();
$D['user'] = @get_current_user();
-$D['hostname'] = $_SERVER['SERVER_NAME'];
+$D['hostname'] = gethostname();
$D['hostip'] = ('/'==DIRECTORY_SEPARATOR) ? $_SERVER['SERVER_ADDR'] : @gethostbyname($_SERVER['SERVER_NAME']);
$D['yourip'] = $_SERVER['REMOTE_ADDR'];
$D['uname'] = @php_uname();
@@ -120,7 +120,7 @@ function get_info(){
$D['mem']['used'] = $D['mem']['total']-$D['mem']['free'];
$D['mem']['percent'] = (floatval($D['mem']['total'])!=0)?round($D['mem']['used']/$D['mem']['total']*100,2):0;
$D['mem']['real']['used'] = $D['mem']['total'] - $D['mem']['free'] - $D['mem']['cached'] - $D['mem']['buffers'];
- $D['mem']['real']['free'] = $D['mem']['total'] - $D['mem']['real']['used'];
+ $D['mem']['real']['free'] = round($D['mem']['total'] - $D['mem']['real']['used'],2);
$D['mem']['real']['percent'] = (floatval($D['mem']['total'])!=0)?round($D['mem']['real']['used']/$D['mem']['total']*100,2):0;
$D['mem']['swap']['total'] = round($buf[4][0]/1024, 2);
$D['mem']['swap']['free'] = round($buf[5][0]/1024, 2);
@@ -175,4 +175,4 @@ function get_info(){
$D['net']['count'] = 0;
}
}
-?>
\ No newline at end of file
+?>
diff --git a/index.php b/index.php
index 8849d3f..2f348f5 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
@@ -248,4 +248,4 @@ require_once(dirname(__FILE__) . '/d.php');
-
\ No newline at end of file
+