Page 1 of 2

Show hosts name in quotas

Posted: Tue Dec 29, 2015 5:36 pm
by Tareq
Is there any way or additional code lines to show hosts name in quotas?

It would be useful.



Image

Re: Show hosts name in quotas

Posted: Sat Jan 09, 2016 4:20 am
by Tareq
No one answer :roll:

Re: Show hosts name in quotas

Posted: Sat Jan 09, 2016 4:39 am
by Lantis
I'm sure there is a built in function if you check out the source code

Alternatively, write your own.
My approach would be to parse the ip's against the /etc/hosts file.

Have fun.

Re: Show hosts name in quotas

Posted: Sat Jan 09, 2016 5:05 am
by nworbnhoj
This will probably seem a bit redundant once the known devices function is merged

Re: Show hosts name in quotas

Posted: Sat Jan 09, 2016 6:28 am
by Tareq
Sorry, and thank you all.
I don't know any thing about this programming language.

Just i ask if one programmers did that. I think that code must be in quota.js file.

Show hostnames in quotas.sh

Posted: Tue Nov 20, 2018 4:40 am
by Tareq
Hi there,

I need to show every hostname beside of ip address in "quotas.sh".

Please help me to write script doing that in quotas.sh

Image

Re: Show hosts name in quotas

Posted: Tue Nov 20, 2018 5:40 am
by Lantis
Merged with your original request for this 3 years ago.
And my answer still remains the same :)

Re: Show hosts name in quotas

Posted: Tue Nov 20, 2018 6:06 am
by Tareq
Lantis wrote:Merged with your original request for this 3 years ago.
And my answer still remains the same :)
But please I need the exact code that doing what I want, and where should put it.

Re: Show hosts name in quotas

Posted: Tue Nov 20, 2018 6:15 am
by Tareq
Lantis wrote:Merged with your original request for this 3 years ago.
And my answer still remains the same :)

How you got what i said before 3 years?, i don't remember. :D

Re: Show hosts name in quotas

Posted: Tue Nov 20, 2018 6:23 am
by Lantis
I have a very good memory.

You said you were a vb.net programmer, but it looks like you haven't bothered to read the source code to even try? Why should i be inclined to help you?

The way i would approach it, is i would look at a page that already does this, and figure out how it does it.

An example would be the hosts.sh page.
Looking at the source, an iptohostname[] array is formed.
Looking at where that comes from, it is produced by gargoyle_header_footer with a particular option.
So now you know how to get the iptohostname array to come up in quotas.sh.
Now you just need to write some code to replace the IP addresses with the hostnames, which should be very simple as the IP addresses are the keys to the array.