Skip to content

Commit

Permalink
#93 Fix analyzer configurations icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Apr 12, 2018
1 parent dc3f698 commit 0efa3d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default class OrganizationConfigsController {
};
}

isSet(config) {
return _.indexOf([undefined, null, ''], config) === -1;
}

edit(config) {
let modal = this.$uibModal.open({
controller: ConfigurationEditController,
Expand All @@ -26,11 +30,11 @@ export default class OrganizationConfigsController {
size: 'lg',
resolve: {
configuration: () => {
let defaultValues = {
string: null,
number: 0,
boolean: true
};
// let defaultValues = {
// string: null,
// number: 0,
// boolean: true
// };
let conf = angular.copy(config);

_.forEach(conf.configurationItems, item => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ <h4 class="media-heading">
<div ng-repeat="item in config.configurationItems">
<small class="mr-xxs">
<strong><i class="mr-xxs fa" ng-class="{
'fa-check text-success': config.config[item.name] !== undefined,
'fa-times text-danger': config.config[item.name] === undefined
'fa-check text-success': $ctrl.isSet(config.config[item.name]),
'fa-times text-danger': !$ctrl.isSet(config.config[item.name])
}"></i> {{item.name}}:</strong> {{item.description}}
<span ng-if="item.defaultValue">(<em>Default:</em> {{item.defaultValue}})</span>
</small>
Expand Down

0 comments on commit 0efa3d8

Please sign in to comment.