Skip to content

Commit

Permalink
Add logo field back to addOrEditSpec (#209)
Browse files Browse the repository at this point in the history
* Update addOrEditSpec.html

* Update AddOrEditSpecController.js
  • Loading branch information
bodom0015 authored and craig-willis committed Jul 27, 2017
1 parent a47c0c6 commit 5a891bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions gui/app/catalog/addOrEdit/AddOrEditSpecController.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ angular
spec.readinessProbe = angular.copy($scope.probe);
}

// Replace a value of "" in logo with "/asset/png/logos/ndslabs-badge.png"
if (!$scope.spec.logo) {
$scope.spec.logo = "/asset/png/logos/ndslabs-badge.png";
}

// Replace a value of "" in contextPath with "/"
angular.forEach($scope.spec.ports, function(port) {
if (!port.contextPath || port.contextPath.replace(/ /g,'') === '') {
Expand Down
7 changes: 3 additions & 4 deletions gui/app/catalog/addOrEdit/addOrEditSpec.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ <h3>{{ editingSpec ? 'Edit' : 'Add' }} Application<span ng-if="spec.label">: {{
</div>

<!-- Logo URL (optional) -->
<!-- Commented out, due to logos now beinbg locally-sourced -->
<!-- All user specs in the catalog will use the default NDS badge -->
<!-- <div class="form-group">
<!-- All user specs in the catalog will default to using the NDS badge -->
<div class="form-group">
<label for="logoField">Logo <sup><i class="fa fa-fw fa-question-circle" tooltip-placement="left" uib-tooltip="A URL to a small logo for this service"></i></sup></label>
<input type="url" class="form-control" id="logoField" name="logoField" placeholder="Enter Logo URL..." ng-model="spec.logo">

<ng-messages class="text-danger" for="modifySpec.logoField.$error" role="alert">
<ng-message when="url">Please enter a valid URL</ng-message>
</ng-messages>
</div> -->
</div>

<!-- Info URL (optional) -->
<div class="form-group">
Expand Down

0 comments on commit 5a891bf

Please sign in to comment.