Commit Graph

12 Commits

Author SHA1 Message Date
Digimer
578c23b0a3 * Finished the form for adding peers (but no logic to support it yet, it's just filled and formatted).
Signed-off-by: Digimer <digimer@alteeve.ca>
2018-07-19 16:40:03 -04:00
Digimer
86259a4783 * Got the network.xml and network.json files fixed and parsable.
* Moved config JS to config.js.

Signed-off-by: Digimer <digimer@alteeve.ca>
2018-06-10 00:27:08 -04:00
Digimer
27fe291524 * Started work on config_step3.
* Reworked step 2 to allow for empty DNS and empty gateway fields.
* Step2 now loads previous answers from the database properly.
* Fixed (the lack of) recording each network's IP and subnet to the database.
* Added (and disabled for now) a jquery feature for clearing the variables from the URL to keep it from getting exceptionally long.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-10-11 01:20:03 -04:00
Digimer
3d385a5731 * Updated the configuration step 2 to properly show interface link changes again (had to add the network status XML generator back), and added displaying the 'up order', which tells the order that interfaces last cycles. This allows a user to unplug and plug the network cables in without watching the screen and be able to determine which interfaces cycled in a given order. This makes it easier to map MAC addresses to desired roles.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-10-05 00:20:36 -04:00
Digimer
1e7fe44c23 * Updated Get->host_uuid to record the UUID to a cache file when run with root privs, but read from the cache when an unpriv user.
* Added a start-check to make sure 'home' could read the host UUID and exit if not.
* Removed network_interface_current_name / network_interface_requested_name from the network_interfaces DB table and used simply network_interface_name.
* Added caching to Storage->read_file().
* Now record form answers in the variables table as 'form::<form_name>::<variable>::value' and read the same when the form is first loaded.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-09-27 03:24:27 -04:00
Digimer
96670756ab * Created Database->insert_or_update_network_interfaces to handle pushing data into update_network_interfaces.
* Updated Database->connect to always test if hosts table exists and load the core schema if not.
* Fixed Database->write to log all SQL when 'sys::database::log_transactions' is set.
* Got tools/scancore-update-states scanning and recording network interface data to the database. Also removed it writing out the XML status file.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-09-22 00:56:35 -04:00
Digimer
f948d7a762 * Updated Log->entry() to escape the finished string just prior to calling logger.
* Updated Template->get() to set the skin directory more cleanly.
* Updated Words->string() to check for a string with #!variable!x!# replacement keys and the 'variables' parameter wasn't passed and throws a useful error are returns '#!error!#'.
* Added top-right icons (see sources.txt for attributions).
* Created a new shared.html template file for shared templates, and added a template for the HTML header.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-13 11:09:21 -04:00
Digimer
e983f27de7 * Changed scancore-update-states to report link speeds > 100 Gbps as 0.
* Added polling to update the network state as needed.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-12 17:39:09 -04:00
Digimer
f7616e4bb6 * Fixed my fix to use data in the elements instead of divs, so the data doesn't show on the page.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-12 15:58:19 -04:00
Digimer
a8a98b431d * Updated the jquery to read in translated strings and to display the link speed.
Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-12 15:44:23 -04:00
Digimer
8c42b78e63 * Made some progress on displaying the network state on an HTML page using jquery. It's ugly as sin, but it works.
* Fixed a bug in Storage->write_file() where the parent directory wasn't created if it was missing. Also removed passing the mode to the parent directory creation as the file mode rarely applies to the directory (ie: 644 breaks directories but is common for files).
* Changed Template->skin to return just the skin name, not the path.
* Updated scancore-update-states to write the network state information to both xml (for ScanCore) and JSON (for jquery) files.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-12 14:39:20 -04:00
Digimer
bea6bc5e69 * Updated Tools->new() to check if it is being invoked in a browser and set the environment appropriately. It also sets the PWD environmental variable to the DOCUMENT_ROOT variable.
* Renamed 'defaults::languages' to 'defaults::language'.
* Created Storage->change_mode(), Storage->change_owner(), Storage->make_directory() and Storage->write_file() that does what their names imply, using the shell commands instead of the built-in commands (may switch to them later). The ->make_directory() method will create any needed parent directories.
* Moved System->read_file() to the Storage module as it made more sense there. For now, System is empty.
* Created Words->language to set or check the active output language.
* Fixed Template->get() to use Words->language.
* Updated Words->string() to take the new 'string' parameter which, when set, is used instead of the 'key' parameter and is treated as a pre-retrieved string, so replacement keys are directly injected.
* Updated Template->get() to take the 'variables' parameter and then uses Words->string({string => ...}) to process the replacement keys.
* Updated tools/scancore-update-states to write out the network interface states to the status.xml file.

Signed-off-by: Digimer <digimer@alteeve.ca>
2017-06-11 03:00:35 -04:00