Skip to content

Commit

Permalink
fixed a few minor bugs found during 1.2.0.final testing
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Jan 4, 2016
1 parent a377cdb commit 9e8328e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
Expand Up @@ -167,7 +167,12 @@ public void user(UserBean user) {
public void role(RoleBean role) {
try {
logger.info(Messages.i18n.format("StorageImportDispatcher.ImportingRole") + role.getName()); //$NON-NLS-1$
storage.createRole(role);
RoleBean roleBean = storage.getRole(role.getId());
if (roleBean != null) {
storage.updateRole(role);
} else {
storage.createRole(role);
}
} catch (StorageException e) {
error(e);
}
Expand All @@ -194,7 +199,12 @@ public void plugin(PluginBean plugin) {
public void gateway(GatewayBean gateway) {
try {
logger.info(Messages.i18n.format("StorageImportDispatcher.ImportingGateway") + gateway.getName()); //$NON-NLS-1$
storage.createGateway(gateway);
GatewayBean gatewayBean = storage.getGateway(gateway.getId());
if (gatewayBean != null) {
storage.updateGateway(gateway);
} else {
storage.createGateway(gateway);
}
} catch (StorageException e) {
error(e);
}
Expand All @@ -207,7 +217,13 @@ public void gateway(GatewayBean gateway) {
public void policyDef(PolicyDefinitionBean policyDef) {
try {
logger.info(Messages.i18n.format("StorageImportDispatcher.ImportingPolicyDef") + policyDef.getName()); //$NON-NLS-1$
storage.createPolicyDefinition(policyDef);

PolicyDefinitionBean policyDefBean = storage.getPolicyDefinition(policyDef.getId());
if (policyDefBean != null) {
storage.updatePolicyDefinition(policyDef);
} else {
storage.createPolicyDefinition(policyDef);
}
policyDefIndex.put(policyDef.getId(), policyDef);
} catch (StorageException e) {
error(e);
Expand Down
8 changes: 4 additions & 4 deletions manager/ui/hawtio/plugins/api-manager/html/about.html
Expand Up @@ -55,10 +55,10 @@ <h1 class="about-title" apiman-i18n-key="about.page-title">Open Source API Manag
<td width="1%" nowrap="nowrap"><span class="about-label" apiman-i18n-key="about.user-guide">User Guide:</span></td>
<td><a href="{{ userGuide }}">{{ userGuide }}</a></td>
</tr>
<tr>
<td width="1%" nowrap="nowrap"><span class="about-label" apiman-i18n-key="about.tutorials">Tutorials:</span></td>
<td><a href="{{ tutorials }}">{{ tutorials }}</a></td>
</tr>
<!-- <tr> -->
<!-- <td width="1%" nowrap="nowrap"><span class="about-label" apiman-i18n-key="about.tutorials">Tutorials:</span></td> -->
<!-- <td><a href="{{ tutorials }}">{{ tutorials }}</a></td> -->
<!-- </tr> -->
</tbody>
</table>
</div>
Expand Down
Expand Up @@ -47,17 +47,14 @@ module Apiman {
})
};

PageLifecycle.loadPage('ApiCatalog', 'apiView', pageData, $scope, function() {
PageLifecycle.loadPage('ApiCatalog', undefined, pageData, $scope, function() {
angular.forEach($scope.apis, function(api) {
api.iconIsUrl = false;
if (!api.icon) {
api.icon = 'puzzle-piece';
}
if (api.icon.indexOf('http') == 0) {
api.iconIsUrl = true;
Logger.debug("TOTALLY FOUND AN HTTP ICON!");
} else {
Logger.debug("NO WAY, JOSE!");
}
api.ticon = 'fa-file-text-o';
if (api.endpointType == 'soap') {
Expand Down

0 comments on commit 9e8328e

Please sign in to comment.