Search Posts

HTTP POST error possibly unhandled rejection

I am using Kibana and Elasticsearch with Docker. I create a Kibana plugin which gives the user the possibility to update any index in the ES. The plugin developed works in my local machine, but in the container I got this error in my console: POST:http://localhost:5600/api/my_discover/index/.kibana/doc/config:6.2.4/%7B%22type%22:%22config%22,%22updated_at%22:%222018-08-14T12:35:15.616Z%22,%22config%22:%22%7B/%22buildNum/%22:16627,/%22xPackMonitoring:showBanner/%22:true%7D%22%7D 404 (Not Found) Possibly unhandled rejection: {“data”:{“statusCode”:404,”error”:”Not Found”},”status”:404,”config”:{“method”:”POST”,”transformRequest”:[null],”transformResponse”:[null],”jsonpCallbackParam”:”callback”,”url”:”../api/my_discover/index/.kibana/doc/config:6.2.4/{“type”:”config”,”updated_at”:”2018-08-14T12:35:15.616Z”,”config”:”{“buildNum”:16627,”xPackMonitoring:showBanner”:true}”}”,”headers”:{“Accept”:”application/json, text/plain, /“,”kbn-version”:”6.2.4″}},”statusText”:”Not Found”} My controller: .controller(‘editHit’, function($http) { this.hit = JSON.parse(sessionStorage.getItem(‘SELECTED_HIT’)); // Edit the hit this.edit = function () { // […]

How to call a function when user click on browser window

I have a proceed to payment button and it redirect to redirectPayment.html page as target = _blank and do payment operations there, so I had set a flag creditsRefresh as Yes by local storage once payment is triggered. Now when payment is successfull , it will redirect to success jsp page.so user can close the tab and come back to original tab where payment initiated.But I want my amount to be refreshed after payment. So […]

$resource:badcfg Error in resource configuration for action `query`. Expected response to contain an array but got an object

I am working on a few files which are based on angularjs, nodejs, html, etc. I have got this error in the browser console. ** “error: $resource:badcfg Response does not match configured parameter Error in resource configuration for action query. Expected response to contain an array but got an object (Request: GET %2Fpacs%2Fgetcompressionstats)”. ** I am trying to get a set of information from a certain .json file. Here is the code(from an angularjs file) […]

Angular dynamic drop down Not working on Touch screen Devices

In our product, some drop downs generated using “UL li” in AngularJS 1.5.7 are opening inverted only on Touch screen Devices. This are working fine on all window laptop which are not touch screen. Please suggest what could be the fixed needed for this or why this is not working on touch screen devices. Kindly find the screen shot below. CodeSnapShot.png and dropdownerror screen.png Source: AngularJS

UI-router with Materialize-angular issue

I want to use ui-router and angular-materialize together, but when I want to add angular materialize module, it show me this error in console : Error: [$injector:modulerr] … script.js var routerApp = angular.module(“routerApp”, [“ui.router”], [‘ui.materialize’]); routerApp.controller(‘mainCtrl’, [“$scope”, function ($scope) { $scope.select = { value: “Option1”, choices: [“Option1”, “I’m an option”, “This is materialize”, “No, this is Patrick.”] }; routerApp.config( [“$stateProvider”, “$urlRouterProvider”, function ($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise(“/template1”); $stateProvider .state(“template1”, { url: “/template1”, templateUrl: “template1.html”, controller: “tmp1Controller” […]

Create parent child json object to show in angularjs

I have a json object of structure [ {GroupName:”Test1″,Name:”A/B”,Count:12,Value:”B”}, {GroupName:”Test1″,Name:”A”,Count:12,Value:”A”}, {GroupName:”Test1″,Name:”A/B/C”,Count:12,Value:”C”}, {GroupName:”Test1″,Name:”A/B/D”,Count:12,Value:”D”}, {GroupName:”Test2″,Name:”E/F”,Count:12,Value:”F”}, {GroupName:”Test2″,Name:”E/F/G”,Count:12,Value:”G”}, ] Now based on the “/” value i need to create below structure to show in ng-repeat.It is required to create a tree view menu. The values i.e A/B/C is not fixed and it could be multiple also the name values are not squential i.e E/F can be the next value then again A/B/C [ { Name: Test1, Child:[ {Name: A, […]

File upload window after Sweet Alert

Use Case: I’m trying to change window.alert to Sweet alert. When I used window.alert, alert pop-up appeared before file-upload window and then clicked ‘OK’, file upload window appeared. But, after changing window.alert to Sweet alert, file-upload window appears simultaneously. <label for=”ScanFile”><i class=”fa fa-upload” style=’cursor: pointer;’ ng-click=”uploadAlert(row)”></i></label> <input id=”ScanFile” type=”file”/> When a user clicks the label, Sweet-alert appeared, and then the user can select the file. uploadAlert() : $scope.uploadAlert = function() { $window.alert(~~~~~~); } How to […]

how i can get response outside the function, Inside function response getting

In console undefined message getting. How i can get fast response and how i will use callback function. service —– .factory(‘getUserInfo’, function ($http) { return { init: function () { return $http.get(base_url + ‘User/getUserInfo’, { }).then(function (response) { return response.data.data; }); }, }; }); coltrollers —– $scope.getUserInfo = function () { getUserInfo.init().then(function (response) { $scope.USER_UAD_response = response; $scope.USER_UAD_SYS_ID = response.USER_UAD_SYS_ID; //$scope.getPrice(); }); }; $scope.getUserInfo(); console.log($scope.USER_UAD_response); Source: AngularJS

Angular tree control —- filter the nodes of a tree

I am following the link https://wix.github.io/angular-tree-control/ to explore different features of angular tree control.From the documentation could not properly understand what values i should give for filter comparator and filter expression to make it work in order to filter the nodes.Below is the code: <body ng-app=”app”> Search: <input ng-model=”searchTree”> <table id=”searchTextResults”> <tr><th>Name</th><th>Age</th></tr> <tr ng-repeat=”data in dataForTheTree | filter:searchTree”> <td>{{node.name}}</td> <td>{{node.age}}</td> </tr> </table> <div ng-controller=”myController”> <treecontrol class=”tree-light” tree-model=”dataForTheTree” filter-expression=”data” filter-comparator=”false” options=”treeOptions” on-selection=”showSelected(node)” selected-node=”node1″> {{node.name}} age {{node.age}} […]

Beginner: Want to navigate from one page to another page in Angularjs 4

Please help me to understand how I can navigate one page to another in angular. Here what I have done. I create a project (ng create) Added two components (Home and About) Add a app-routing.module.ts file and int file I write this code import { NgModule } from ‘@angular/core’; import { RouterModule, Routes } from ‘@angular/router’; import { HomeComponent } from ‘./home/home.component’; import { AboutUsComponent } from ‘./about-us/about-us.component’; const routes: Routes = [ { path: […]

Next Page »