Skip to content

Commit

Permalink
Console: Move to list more quickly after adding first URL and reset i…
Browse files Browse the repository at this point in the history
…nput after adding
  • Loading branch information
ammendonca committed Apr 9, 2015
1 parent 8b56add commit ec7635b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/metrics/plugins/metrics/ts/addUrlPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module HawkularMetrics {
/// Add the Resource
this.HawkularInventory.Resource.save({tenantId: globalTenantId}, resource).$promise
.then((newResource) => {
this.getResourceList();
// we now have a resourceId from this call
metricId = newResource.id;
console.dir(newResource);
Expand Down Expand Up @@ -126,10 +127,11 @@ module HawkularMetrics {
}).then(()=> {
toastr.info('Your data is being collected. Please be patient (should be about another minute).');
//this.$location.url('/hawkular/' + metricId);
this.getResourceList();
}, (error)=> {
return this.HawkularErrorManager.errorHandler(error, 'Error saving availability trigger.');
}).finally(()=> {
this.resourceUrl = this.httpUriPart;
this.$scope.addUrlForm.$setPristine();
this.addProgress = false;
});
}
Expand Down

0 comments on commit ec7635b

Please sign in to comment.