mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	supported, or to use env vars to get service host info. Test change to reflect php filename change.
		
			
				
	
	
		
			30 lines
		
	
	
		
			966 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			966 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var redisApp = angular.module('redis', ['ui.bootstrap']);
 | 
						|
 | 
						|
/**
 | 
						|
 * Constructor
 | 
						|
 */
 | 
						|
function RedisController() {}
 | 
						|
 | 
						|
RedisController.prototype.onRedis = function() {
 | 
						|
    this.scope_.messages.push(this.scope_.msg);
 | 
						|
    this.scope_.msg = "";
 | 
						|
    var value = this.scope_.messages.join();
 | 
						|
    this.http_.get("guestbook.php?cmd=set&key=messages&value=" + value)
 | 
						|
            .success(angular.bind(this, function(data) {
 | 
						|
                this.scope_.redisResponse = "Updated.";
 | 
						|
            }));
 | 
						|
};
 | 
						|
 | 
						|
redisApp.controller('RedisCtrl', function ($scope, $http, $location) {
 | 
						|
        $scope.controller = new RedisController();
 | 
						|
        $scope.controller.scope_ = $scope;
 | 
						|
        $scope.controller.location_ = $location;
 | 
						|
        $scope.controller.http_ = $http;
 | 
						|
 | 
						|
        $scope.controller.http_.get("guestbook.php?cmd=get&key=messages")
 | 
						|
            .success(function(data) {
 | 
						|
                console.log(data);
 | 
						|
                $scope.messages = data.data.split(",");
 | 
						|
            });
 | 
						|
});
 |