Merge pull request #12199 from mesosphere/relative-guestbook

Convert guestbook example to relative urls
This commit is contained in:
Robert Bailey 2015-08-17 13:50:11 -07:00
commit b67e8edf1d
4 changed files with 5 additions and 5 deletions

View File

@ -393,7 +393,7 @@ spec:
spec:
containers:
- name: php-redis
image: kubernetes/example-guestbook-php-redis:v2
image: gcr.io/google_containers/example-guestbook-php-redis:v3
ports:
- containerPort: 80
```

View File

@ -15,6 +15,6 @@ spec:
spec:
containers:
- name: php-redis
image: kubernetes/example-guestbook-php-redis:v2
image: gcr.io/google_containers/example-guestbook-php-redis:v3
ports:
- containerPort: 80

View File

@ -9,7 +9,7 @@ RedisController.prototype.onRedis = function() {
this.scope_.messages.push(this.scope_.msg);
this.scope_.msg = "";
var value = this.scope_.messages.join();
this.http_.get("/index.php?cmd=set&key=messages&value=" + value)
this.http_.get("index.php?cmd=set&key=messages&value=" + value)
.success(angular.bind(this, function(data) {
this.scope_.redisResponse = "Updated.";
}));
@ -21,7 +21,7 @@ redisApp.controller('RedisCtrl', function ($scope, $http, $location) {
$scope.controller.location_ = $location;
$scope.controller.http_ = $http;
$scope.controller.http_.get("/index.php?cmd=get&key=messages")
$scope.controller.http_.get("index.php?cmd=get&key=messages")
.success(function(data) {
console.log(data);
$scope.messages = data.data.split(",");

View File

@ -3,7 +3,7 @@
<title>Guestbook</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<script src="/controllers.js"></script>
<script src="controllers.js"></script>
<script src="ui-bootstrap-tpls-0.10.0.min.js"></script>
</head>
<body ng-controller="RedisCtrl">