945 Commits

Author SHA1 Message Date
Mrt134
d29ad39e78 Merge sysadmclient.rst from trueos-docs repo into sysadm client handbook
- Copy over sysadmclient.rst from trueos-docs repo and reconfigure index and conf files to incorporate the file.
- Add all required images for sysadmclient.rst.
2016-09-06 12:09:25 -04:00
Mrt134
49fb902581 Review server handbook:
- Rewrite Introduction section for clarity.
- Add references to other SysAdm handbooks.
- Fix whitespace issues in all files.
- Fix numerous errors in all files.
- Add note about the current WIP nature of SysAdm.
- Add note listing current default ports SysAdm needs to be opened for remote access to work.
  Also noted the user can redefine which ports SysAdm uses.
2016-09-06 10:57:30 -04:00
Jeff 'Raid' Baitis
a1dfac0392 Allow for case insensitive matching on the name of packages.
This mimics the behavior of 'pkg search', which performs a case
insensitive search.
2016-09-02 00:00:04 -07:00
Mrt134
f5d9caefed Update API reference, client, and server handbooks
- Edited link colors to be a stronger blue/red color.
- Altered hover role for links to add underlining to the link texts.
- Restyled roles
  - Unified padding boxes and colors (exception: :guilabel: uses a different color).
    All roles should now have the same height padding, which has been reduced as well.
  - Role colors have all been lightened to avoid being distracting or making
    contained text hard to read.
  - Removed bold from :menuselection:.
  - :command: now renders as a monospace font.
- Restyled admonitions
  - Darkened text inside admonition boxes.
  - Rounded border elements around boxes.
  - Reworked borders to be smaller and darker in color.
- Fixed figure captions to be smaller and fit better with the surrounding text.
- Restyled tables
  - Table captions now have the same style as figure captions.
  - Altered color for headers
  - Added hover themeing for tables: mousing over a row or header title will change its color.
2016-09-01 13:37:37 -04:00
Mrt134
cc1c83be7b API Reference Guide update:
- Add new class file: services.rst.
- Update all API calls to current: Aug 30,2016
2016-08-30 14:39:37 -04:00
Ken Moore
75f21cfe1b API CHANGE
Last round of new "action"s for the sysadm/services class,
"action":"[enable/disable]"
Required input arguments:
"services":["service1","service2","etc"]

Exactly the same syntax as the start/stop/restart API calls, just a different action and the output field is "services_[enabled/disabled]" as well.
2016-08-30 14:22:33 -04:00
Ken Moore
0408f61f4c API CHANGE
Add the "is_running" output field to the sysadm/services "list_services" output.
This also cleans up the is_enabled detection routine so it should be more reliable.
2016-08-30 13:32:53 -04:00
Ken Moore
8a594044bb API CHANGE
Add 3 new API calls (all almost the same - just different "actions" and the return message will be slightly different)

"action":"start" OR "stop" OR "restart"
This will [start/stop/restart] services on the system.
REQUIRED ARGUMENTS:
"services" : <string with a single service, or array of services>

EXAMPLE "start" command (change "services_started" in responce to "services_[started/stopped/restarted]" as needed to match the action:

REST Request (example):
-------------------------------
PUT /sysadm/services
{
   "action" : "start",
   "services" : [
      "cupsd"
   ]
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "start",
      "services" : [
         "cupsd"
      ]
   },
   "name" : "services",
   "id" : "fooid",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "services_started": [
      "cupsd"
    ]
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-30 11:27:51 -04:00
Ken Moore
200a7de9e0 API CHANGE
Add a new output field to the sysadm/updates "check for updates".

args:{
  "details":"<details about updates>"
}
2016-08-30 10:04:30 -04:00
Kris Moore
cd959daa3f Ken missed a } 2016-08-29 22:54:04 -04:00
Ken Moore
ce86331f1e Clean up the new sysadm/services class just a bit more. Getting ready to add all the start/stop/restart API calls. 2016-08-29 16:09:30 -04:00
Ken Moore
0d4eb2c4f3 Cleanup the rc.conf parsing a bit more - turn of debugging messages, and ensure we use [one][start/stop/restart] as needed depending on if it is enabled or not. 2016-08-29 14:59:32 -04:00
Ken Moore
2f7bfe06aa API CHANGE
Modify the output fields for the sysadm/services, "list_services" action:
Now each service entry will look like this:
"accounting": {
        "description": "",
        "is_enabled": "false",
        "name": "accounting",
        "path": "/etc/rc.d/accounting",
        "tag": "accounting_enable"
      }

I will probably be adding an "is_running" [true/false] field here soon as well - the backend for that still needs to be written first.
2016-08-29 14:09:20 -04:00
Ken Moore
1bf0ec425f API CHANGE
Add a new API class/call to sysadm:
namespace: sysadm
name: services
This class is for managing all the background daemons on the system.

Initial API call:
args : {"action" : "list_services" }
This will return a list of all services available on the system.

*Note: return message shortened for example purposes - there are usually tons of services available

REST Request (example):
-------------------------------
PUT /sysadm/services
{
   "action" : "list_services"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "list_services"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "services"
}

Response:
-------------------------------
{
  "args": {
    "services": {
      "accounting": {
        "name": "accounting",
        "tag": "accounting_enable"
      },
      "addswap": {
        "name": "addswap",
        "tag": "addswap_enable"
      },
      "amd": {
        "name": "amd",
        "tag": "amd_enable"
      },
      "apm": {
        "name": "apm",
        "tag": "apm_enable"
      },
      "apmd": {
        "name": "apmd",
        "tag": "apmd_enable"
      },
      "atm": {
        "name": "atm",
        "tag": "atm_enable"
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-29 11:41:15 -04:00
Kris Moore
c24bc90769 Give sysadm a proper mkport.sh script 2016-08-27 17:13:54 -04:00
Mrt134
7f76acb950 Merge branch 'master' of github.com:trueos/sysadm 2016-08-25 13:44:32 -04:00
Mrt134
65037a300c Finish in-depth review of API Guide:
- Line by line review of all .rst files in the API Reference Guide.
- Fix whitespace issues.
- Fix numerous spelling and grammar errors.
- Reworked numerous sections for clarity and flow.
- Fixed oversize tables to be fully PEP8 compliant.
2016-08-25 13:42:30 -04:00
Ken Moore
9312915ccf Cleanup the home dir creation routine a bit more in the sysadm/users class: *DO NOT* try to create a home dir if /nonexistant or /var/empty are specified. 2016-08-25 12:25:01 -04:00
Ken Moore
c0ca7a333b Merge branch 'master' of github.com:trueos/sysadm 2016-08-25 11:15:02 -04:00
Ken Moore
9f06fbb03c Fix up the addition/modification of users in the sysadm/users class. 2016-08-25 11:13:25 -04:00
Mrt134
7ec47963ac Begin in-depth review of API Reference guide.
- Whitespace fixes.
- Reworking text.
- Reducing the size of tables for better PEP8 conformity.
- Altering admonition box titles (use tip and danger).
- Update roles (use :guilabel: and verify other uses).
2016-08-24 15:57:57 -04:00
Mrt134
cf4a485382 Style and arrow patch update + general review of API and Server handbooks.
- Updated trueos_style to current.
- Updated menuselection arrow replacement patch to current.
- Reviewed API reference guide:
  - Reviewed for :guilabel: additions.
  - Added missing trademark symbols.
- Update Server handbook:
  - Added missing trademaks.
  - Replaced outdated link.
  - Updated admonition boxes.
  - Added :guilabel: role where necessary.
  - Add more descriptive text of SysAdm and the goals of the project.
  - Updated code-boxes.
2016-08-24 13:13:57 -04:00
Mrt134
9ed043f0f5 Add reworked theme values and apply menuselection arrow patch to all handbooks. 2016-08-23 13:52:55 -04:00
Mrt134
38eb34625e :guilabel: directive change to all handbooks
- Fixed themeing slightly for :guilabel: directives.
2016-08-22 10:17:12 -04:00
Ken Moore
88e501eb29 Merge pull request #24 from q5sys/master
Updating PCBSD references to TrueOS (github links and wording)
2016-08-18 14:29:45 -04:00
JT Pennington
fd6f82a91c Update README.md
Fixed other references.
2016-08-18 14:07:31 -04:00
JT Pennington
b99379f412 Update README.md
Updated links to point to trueos repo instead of the older pcbsd repo
2016-08-18 14:06:30 -04:00
Mrt134
e530a797f7 Organization update 2:
- Moved API docs to general "docs" folder; all handbooks are now in the same area.
- Deleted "pcbsd_style" from all three handbooks as it is now trueos_style.
- Fixed a number of themeing elements for server and client handbooks.
- Added logos to both handbooks.
2016-08-18 12:26:45 -04:00
Mrt134
e47ef0915e Accidental add of _build files:
Removed _build/ files which were accidentally added to the last commit.
2016-08-18 12:04:58 -04:00
Mrt134
7c73b6a282 Handbook logisitics:
- Created client handbook and started applying themeing to it.
- Moved docs files to new folder to clearly label server and client handbooks.
2016-08-18 12:02:33 -04:00
Mrt134
dd34a97f57 Update API guide to current 8/18/16
- Modified "usershow" action to add "canremove": "false".
- Added new "groupmod" action with examples.
2016-08-18 09:58:03 -04:00
Ken Moore
1fd947f5b4 API CHANGE:
Add a new action to the sysadm/users class: "groupmod"
This action allows for modifying a given group on the system

REQUIRED: "name"="<name of group to modify>"
and any one of these options is also required:
"users":["array of users"] (will set the list of users for this group)
"add_users":["array of users"] (will add the listed users to the current users)
"remove_users":["array of users"] (will remove the listed users from the current users)

Example API Request (JSON)
{
"id":"sample",
"namespace":"sysadm",
"name":"users",
"args":{
  "action":"groupmod",
  "name":"operator",
  "users":["user1","user2"]
  }
}
2016-08-17 12:15:48 -04:00
Ken Moore
8700aab62a API CHANGE
In the sysadm/users "action"="usershow" output, put a "canremove"="false" within the object of the currently-active user (so the client knows which user(s) cannot be removed right now). We might be able to extend this later on the server side to set that flag for *all* active users on the system instead.
2016-08-16 13:09:50 -04:00
Ken Moore
f073d2aa17 Merge branch 'master' of github.com:trueos/sysadm 2016-08-16 11:46:50 -04:00
Ken Moore
57fcd94467 API CHANGE:
Modify a couple sysadm/users API calls:
"action"="usermod":
  Add in the optional PersonaCrypt arguments:
 1) "personacrypt_init"="<device>" AND "personacrypt_password"="<password for device>"
    This will initialize a personacrypt device and move the current home directory contents onto the device.
  2) "personacrypt_import"="<base64-encoded contents of a PC key file>"
    This will import an existing key for the designated user and allow a previously initialized device to be used for this user.
  3) "personacrypt_disable"="<device password>"
    This will disable the personacrypt key for this user, and merge any data from the device back onto the local system (if <device password> is valid/non-empty)
2016-08-16 11:41:13 -04:00
Mrt134
4c2f3c9f7c Merge branch 'master' of github.com:trueos/sysadm 2016-08-16 11:38:57 -04:00
Mrt134
4e6f1f79d2 Update API handbook
- Added all missing API calls and updates from mid-June to current.
- Pared down several tables closer to PEP8 sizing.
2016-08-16 11:36:39 -04:00
Ken Moore
72479c177c Merge branch 'master' of github.com:trueos/sysadm 2016-08-16 09:32:56 -04:00
Ken Moore
216ca5a9f2 Oops - fix a true/false reversal in the sysadm/users "userdelete" "clean_home" optional argument. 2016-08-16 09:32:14 -04:00
Mrt134
81aedaaaab Add trueos_style, sysadm icon, and handbook name change.
- Added trueos_style to themes/
- Added sysadm_circle_red.png
- Edited conf.py:
  - Use trueos_style for html builds.
  - Use sysadm_circle_red.png as the sidebar logo.
  - Altered handbook name to "SysAdm API reference guide".
2016-08-15 11:21:18 -04:00
Ken Moore
dac91284c8 API CHANGE
Add a new option to the sysadm/users class:
"action":"groupdelete"
"name":"groupToDelete"

Returns:
"args"{ "result":"success" } on success action
2016-08-11 10:01:21 -04:00
Ken Moore
ee1627b505 Fix up the fast/full update check backend. It looks like the QDateTime.addSecs() function is not working properly on Qt 5.5.1 - switch to the .secsTo() function instead when looking for the amount of time between the file modification and current time. 2016-08-10 12:48:43 -04:00
Ken Moore
373a28c4f5 API CHANGE
Add a new optional input argument to the sysadm/updates, "checkupdates" action:
"force":"[true/false]" (default is false)

This tells the check system to skip all previous checks for updates and re-run the update routines to look for new updates (if force==true), otherwise it might return the previous result of the update check if not enough time has passed since the other check.
2016-08-10 11:51:22 -04:00
Ken Moore
12ba560fd6 API CHANGE
Add a new field in the output args for the sysadm/updates check for updates:
"last_check":"<ISO date/time stamp>"

This returns the timestamp the last time a "full" check was performed (since some checks are flagged as quick/automatic and just re-use the previous check unless a significant amount of time has passed first - 12 hours is what it is set to right now).
2016-08-10 11:45:52 -04:00
Ken Moore
a2bba87315 API CHANGE
Add a new API call to the sysadm/update class:
"action":"changesettings"
This allows for changing the various updatemanager settings (maxbe, package_set, package_url, auto_update)

REST Request (example):
-------------------------------
PUT /sysadm/update
{
   "action" : "changesettings",
   "maxbe" : "6"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "update",
   "namespace" : "sysadm",
   "args" : {
      "maxbe" : "6",
      "action" : "changesettings"
   }
}

Response:
-------------------------------
{
  "args": {
    "changesettings": {
      "result": "success"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-09 13:22:46 -04:00
Ken Moore
4457397733 API CHANGE
Add a new API call to the sysadm/update class for reading all the current settings.

REST Request (example):
-------------------------------
PUT /sysadm/update
{
   "action" : "listsettings"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "listsettings"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "update"
}

Response:
-------------------------------
{
  "args": {
    "listsettings": {
      "maxbe": " 5",
      "package_set": " EDGE"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2016-08-09 12:45:27 -04:00
Ken Moore
06c71afa4a API CHANGE: Add a new "stopupdate" action for the sysadm/update class. (no additional inputs required).
This will look for any currently-running pc-updatemanager processes and kill/stop them as needed.

Example:
{
 "id":"dummy",
 "namespace":"sysadm",
 "name":"update",
 "args": {
    "action":"stopupdate"
 }
}

Output arguments:
"args":{
  "stopupdate":{
    "result":"success" or "error:<error text>"
  }
}
2016-08-09 11:27:08 -04:00
Ken Moore
d430de0fce API CHANGE:
Remove the "fbsdupdate" and "fbsdupdatepkgs" options within the sysadm-update API call for starting an update. These options are no longer available with base pkgs (everything is run through the "pkgupdate" option instead).
2016-08-09 10:51:14 -04:00
Mrt134
fbc436db75 Fix all Sphinx build errors with API handbook
- Fixed every sphinx build error for JSON parsing.
- For invalid JSON messages, replaced .. code-block:: JSON with the
  generic code block directive ::.
- Fixed multiple errors across various valid JSON code blocks.
- Fixed a few spacing errors with .. note:: entries.
2016-08-04 15:01:15 -04:00
Ken Moore
26d114639a Cleanup some of the PKG database queries. 2016-08-04 14:52:27 -04:00