diff --git a/install/installModsForHesk.php b/install/installModsForHesk.php index 0da76e9a..1126f52a 100644 --- a/install/installModsForHesk.php +++ b/install/installModsForHesk.php @@ -9,6 +9,39 @@ if (!isset($_GET['v'])) { die('Starting version not set!'); } $startingVersion = intval($_GET['v']); + +function echoInitialVersionRows($version) { + if ($version < 140) { + printRow('v1.4.0'); + } + if ($version < 141) { + printRow('v1.4.1'); + } + if ($version < 150) { + printRow('v1.5.0'); + } + if ($version < 160) { + printRow('v1.6.0'); + } + if ($version < 161) { + printRow('v1.6.1'); + } + if ($version < 170) { + printRow('v1.7.0'); + } + if ($version < 200) { + printRow('v2.0.0'); + } +} + +function printRow($version) { + $versionId = str_replace('.','',$version); + $versionId = str_replace('v','',$versionId); + echo ''; + echo ''.$version.''; + echo ' Waiting...'; + echo ''; +} ?> @@ -33,7 +66,7 @@ $startingVersion = intval($_GET['v']);
Installation Progress
- +
@@ -41,19 +74,32 @@ $startingVersion = intval($_GET['v']); - - - - - - - - +
Version
v1.4.0Success
v1.4.0...
+
+
+
+
Your Attention is Needed!
+
+

Panel Body

+
+
+
+
+
+
+
+
Console
+
+

CONSOLE

+
+
+
+
diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index a3641740..956a5fbb 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -76,4 +76,56 @@ function enableAllDisablable() { $('#updateText').hide(); } +function startVersionUpgrade(version) { + $('#spinner-'+version) + .removeClass('fa-exclamation-triangle') + .addClass('fa-spinner') + .addClass('fa-pulse'); + changeRowTo('row', version, 'info'); + changeTextTo('span', version, 'In Progress'); +} + +function markUpdateAsSuccess(version) { + removeSpinner(version); + $('#spinner-'+version).addClass('fa-check-circle'); + changeTextTo('span', version, 'Completed Successfully'); + changeRowTo('row', version, 'success'); +} + +function removeSpinner(version) { + $('#spinner-'+version) + .removeClass('fa-pulse') + .removeClass('fa-spinner'); +} + +function markUpdateAsAttention(version) { + removeSpinner(version); + $('#spinner-'+version).addClass('fa-exclamation-triangle'); + changeRowTo('row', version, 'warning'); + changeTextTo('span', version, 'Attention! See below for more information'); +} + +function markUpdateAsFailure(version) { + removeSpinner(version); + $('#spinner-'+version).addClass('fa-times-circle'); + changeRowTo('row', version, 'danger'); + changeTextTo('span', version, 'Update failed! Check the console for more information'); +} + +function changeTextTo(prefix, version, text) { + $('#'+prefix+'-'+version).text(text); +} + +function changeRowTo(prefix, version, clazz) { + //-- Remove all classes + $('#'+prefix+'-'+version) + .removeClass('info') + .removeClass('warning') + .removeClass('danger') + .removeClass('success'); + + //-- Re-add the requested class + $('#'+prefix+'-'+version).addClass(clazz); +} + jQuery(document).ready(loadJquery);