summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/common/styles/elements/errors.scss11
-rw-r--r--app/common/styles/elements/index.scss1
-rw-r--r--app/configuration/controllers/firmware-controller.html1
-rw-r--r--app/configuration/controllers/firmware-controller.js6
-rw-r--r--app/configuration/styles/firmware.scss7
5 files changed, 26 insertions, 0 deletions
diff --git a/app/common/styles/elements/errors.scss b/app/common/styles/elements/errors.scss
new file mode 100644
index 0000000..3076a3d
--- /dev/null
+++ b/app/common/styles/elements/errors.scss
@@ -0,0 +1,11 @@
+.error-msg {
+ background: lighten($error-color, 20%);
+ padding: 1em;
+ text-align: center;
+ font-size: 1em;
+ border: 1px solid $error-color;
+ color: $black;
+ font-family: "Courier New", Helvetica, Arial, sans-serif;
+ font-weight: 700;
+ max-width: 325px;
+}
diff --git a/app/common/styles/elements/index.scss b/app/common/styles/elements/index.scss
index 757ff26..d431ef8 100644
--- a/app/common/styles/elements/index.scss
+++ b/app/common/styles/elements/index.scss
@@ -11,3 +11,4 @@
@import "export";
@import "modals";
@import "quicklinks";
+@import "errors";
diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html
index dc85606..c30b4d2 100644
--- a/app/configuration/controllers/firmware-controller.html
+++ b/app/configuration/controllers/firmware-controller.html
@@ -46,6 +46,7 @@
</div>
</div>
<div class="inline uploading" ng-show="downloading">Downloading in progress...</div>
+ <p class="download_error error-msg" ng-show="download_error_msg" role="alert">{{download_error_msg}}</p>
</fieldset>
</div>
</form>
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index 127a7c2..29d0412 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -49,6 +49,7 @@ window.angular && (function (angular) {
$scope.file_empty = true;
$scope.uploading = false;
$scope.activate = { reboot: true };
+ $scope.download_error_msg = "";
var pollActivationTimer = undefined;
@@ -156,6 +157,11 @@ window.angular && (function (angular) {
}
$scope.download = function(){
+ $scope.download_error_msg = "";
+ if(!$scope.download_host || !$scope.download_filename){
+ $scope.download_error_msg = "Field is required!";
+ return false;
+ }
$scope.downloading = true;
APIUtils.downloadImage($scope.download_host, $scope.download_filename).then(function(response){
var data = response.data;
diff --git a/app/configuration/styles/firmware.scss b/app/configuration/styles/firmware.scss
index d1b0114..1a39ad6 100644
--- a/app/configuration/styles/firmware.scss
+++ b/app/configuration/styles/firmware.scss
@@ -143,3 +143,10 @@
padding-top: 2em;
padding-left: 1em;
}
+
+.download_error
+{
+ @include mediaQuery(medium) {
+ max-width: 35%;
+ }
+}
OpenPOWER on IntegriCloud