Skip to content

Commit

Permalink
updated ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Rajaram committed Apr 2, 2018
1 parent eb4fc91 commit 2a1ec77
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ uiModules
$scope.target = ($location.search()).target;
var request = {'timeFieldName': '@timestamp', 'title': $scope.target};
$http.post('../api/getIndexDocumentCount', request).then((response) => {
if(response.data.count > 0){
if(typeof $scope.target === 'undefined') {
if(typeof $scope.target === 'undefined') {
$scope.welcomemessage = 'Welcome to Patternizer'
$scope.link = 'click here to create a new index pattern'
}else{
$http.post('../api/getIndexPattern', request).then((response, error) => {
$scope.found = response.data.found;
$scope.indextarget = 'Index pattern ' + $scope.target
$scope.link = 'click here'
if($scope.found){
window.location.href=baseurl + "/goto/shorturl" + $scope.target
}else{
$scope.message = 'does not exist'
$scope.createmessage = 'to create one'
}
});
} else{
if(response.data.count > 0){
$http.post('../api/getIndexPattern', request).then((response, error) => {
$scope.found = response.data.found;
$scope.indextarget = 'Index pattern ' + $scope.target
$scope.link = 'click here'
if($scope.found){
window.location.href=baseurl + "/goto/shorturl" + $scope.target
}else{
$scope.message = 'does not exist'
$scope.createmessage = 'to create one'
}
});
} else {
$scope.welcomemessage = 'Index does not have data, please retry again after sending data'
}
}
} else {
$scope.welcomemessage = 'Index does not have data, please retry again after sending data'
}
});
});
}

$scope.createPattern = function () {
Expand Down

0 comments on commit 2a1ec77

Please sign in to comment.