Sambastatus: my first module for nethserver

I think the same, in the next release i change this name.

For other problem… i don’t know :slight_smile:

2 Likes

BTW: it works just fine!

1 Like

I just updated to the new version without any problems. Great work @gecco

3 Likes

Installed without problems, works as expected! :sunglasses:

2 Likes

@gecco I’m thinking about designing the File server Cockpit UI. I’d like to see the smbstatus output in the File server dashboard page …What do you think? Do you already have some plans for Samba Status on Cockpit?

https://github.com/NethServer/dev/wiki/File-server-UI

5 Likes

yes… but i have to understand cockpit :slight_smile:
i read some documentation but, for my skill, are a little complicated

3 Likes

What is causing trouble?

If you have any question about the cockpit UI or anything else, please ask!

I’d like also to catch some ideas from you or the Samba status users to improve the core Samba and AD accounts provider module!

Functions and json objects, yes it is a little strange at the beginning but this is what is the web development. However once you caught it, or you admitted the general behavior, my general feeling is that it could be quite simple.
I am sure you will have some troubles until you find the way to save/read your first property, then after you will go further and faster…at least this is what I experienced.

6 Likes

but how can i exec a command the print the output?

The log output we made for applications could be a good example, but I would prefer that @edoardo_spadoni answers

If you prefer a full js example you could look to nethserver-ejabberd

Obviously I will need the answer for nethserver-diagtools, so thank to ask it first

1 Like

Hi, you have different kind of API to exec a command and get an output. In this file: NethServer Lib you can use one of the methods listed to get an output.

  • exec: is used to call a script in /usr/libexec/nethserver/api/... JSON is used for input and output, you can see many examples in the nethserver-cockpit module, the core one.

    Es. echo '{"action":"list"}' | /usr/libexec/nethserver/api/system-network/read | jq: print network intefaces list

  • execRaw: is used to output a command without using JSON, it’s like calling a command from bash and get the output, probably what you searching for. Example here.

  • execHints: used to get system hints like: Backup: You should configure at least one data backup, Company: Change the default company. Example here

  • readLogs: used to get the logs output in dump o follow mode. Example here

A recap to written API o UI guidelines is here.

5 Likes

thank you @edoardo_spadoni

1 Like

Just to be clear, the samba status is already implemented inside the new UI: File server Cockpit UI

But currently it doesn’t include the list of joined machines along with their last logon because that should be part of the AD acount provider

1 Like

hello - latest rpm seems to not be able to install
any ideas?

I had to download the file first. It’s not possible to download with yum.

wget http://minucci.net/nethserver/nethserver-sambastatus-7.3-1.noarch.rpm
yum install nethserver-sambastatus-7.3-1.noarch.rpm

This module is for the stable server manager. You may have a look at the new server manager.

6 Likes