Skip to content

Commit

Permalink
Add ipinfo.io GUI to Network card
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Jun 16, 2014
1 parent 8f7b871 commit 2bdc9b4
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ File[17]=".src/thermal_zone.module:67.10"
File[18]=".src/FModules.form"
File[19]=".src/FModules.class:15.70"
File[20]=".src/Input_Devices.module:15.70"
File[21]=".src/Network.module:15.70"
File[21]=".src/Network.module:146.37"
File[22]="Data/report-ng.sh:5.3"
File[23]=".src/Distribution_Detect.module:66.25"
File[24]=".src/FFlags.module:19.14"
File[25]=".src/Finfosys.class:470.27"
File[25]=".src/Finfosys.class:946.50"
File[26]=".src/FDF.form"
File[27]=".src/FDF.class:15.70"
File[28]=".src/FNET_R_T.form"
Expand Down Expand Up @@ -89,7 +89,7 @@ File[61]=".src/FDIMM.form"
File[62]=".src/FDIMM.class:71.4"
File[63]=".src/Reports/FCPUID_REPORT.module:28.92"
File[64]=".src/MCPUSAGE.module:31.0"
File[65]=".src/Reports/VALIDATE.module:126.16"
File[65]=".src/Reports/VALIDATE.module:152.0"
File[66]=".src/FValidate.form"
File[67]=".src/FValidate.class:16.1"
File[68]=".src/FCopyUrl.form"
Expand Down
8 changes: 8 additions & 0 deletions src/i-nex/.src/Finfosys.class
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ Public Sub Form_Open()
Object.Call(FGraphic, "_check")
Logs("Check sound cards", Logger.Info)
Object.Call(Asound_Drives, "_inits")
Logs("Call To ipinfo.io for network settings", Logger.Info)
Object.Call(Network, "IP_INFO")
Logs("Check for default display manager", Logger.Info)
If default_display_manager = True Then
Label4.Visible = True
Expand Down Expand Up @@ -946,3 +948,9 @@ Public Sub Savevalid_Click()
Endif

End

Public Sub Button17_Click()

Desktop.Open("https://www.google.com/maps/search/" & Label237.Text & "")

End
101 changes: 100 additions & 1 deletion src/i-nex/.src/Finfosys.form
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@
}
}
{ Button9 Button
Move(273,434,189,28)
Move(273,448,189,28)
Font = Font["Bold,8"]
Text = ("Show Receive and Transmit")
}
Expand Down Expand Up @@ -1921,6 +1921,105 @@
Text = ("Label175")
Border = Border.Raised
}
{ Frame1 Frame
Move(7,259,455,189)
Text = ("ipinfo.io")
{ Label238 Label
Move(98,147,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label236 Label
Move(98,105,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label235 Label
Move(98,84,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label234 Label
Move(98,63,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label233 Label
Move(98,42,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label93 Label
Move(98,21,336,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label237 Label
Move(98,126,315,21)
Font = Font["Bold,8"]
Padding = 3
Border = Border.Raised
}
{ Label239 Label
Move(21,21,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("IP:")
Border = Border.Raised
}
{ Label240 Label
Move(21,42,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Hostname:")
Border = Border.Raised
}
{ Label241 Label
Move(21,63,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("City:")
Border = Border.Raised
}
{ Label242 Label
Move(21,84,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Region:")
Border = Border.Raised
}
{ Label243 Label
Move(21,105,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Country:")
Border = Border.Raised
}
{ Label244 Label
Move(21,126,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Location:")
Border = Border.Raised
}
{ Label245 Label
Move(21,147,77,21)
Font = Font["Bold,8"]
Padding = 3
Text = ("Org:")
Border = Border.Raised
}
{ Button17 Button
Move(413,126,21,21)
Picture = Picture["AppIcons/applications-internet.png"]
}
}
Index = 9
Text = "Battery"
Picture = Picture["AppIcons/Finfosys/battery.png"]
Expand Down
14 changes: 14 additions & 0 deletions src/i-nex/.src/Network.module
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,18 @@ Public Sub net_dev()
Finfosys.Label175.Text = "Type: " & device_type
End

Public Function IP_INFO()
Dim IPINFOIO_BUF As String
Dim IPINFOIO_JSON As Collection
Try Exec ["curl", "ipinfo.io"] Wait To IPINFOIO_BUF
Try IPINFOIO_JSON = JSON.Decode(IPINFOIO_BUF)
'https://www.google.com/maps/search/54.6052,18.2355
Try Finfosys.Label93.Text = IPINFOIO_JSON["ip"]
Try Finfosys.Label233.Text = IPINFOIO_JSON["hostname"]
Try Finfosys.Label234.Text = IPINFOIO_JSON["city"]
Try Finfosys.Label235.Text = IPINFOIO_JSON["region"]
Try Finfosys.Label236.Text = IPINFOIO_JSON["country"]
Try Finfosys.Label237.Text = IPINFOIO_JSON["loc"]
Try Finfosys.Label238.Text = IPINFOIO_JSON["org"]
End

0 comments on commit 2bdc9b4

Please sign in to comment.