mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #12199 from mesosphere/relative-guestbook
Convert guestbook example to relative urls
This commit is contained in:
commit
b67e8edf1d
@ -393,7 +393,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: php-redis
|
- name: php-redis
|
||||||
image: kubernetes/example-guestbook-php-redis:v2
|
image: gcr.io/google_containers/example-guestbook-php-redis:v3
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
```
|
```
|
||||||
|
@ -15,6 +15,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: php-redis
|
- name: php-redis
|
||||||
image: kubernetes/example-guestbook-php-redis:v2
|
image: gcr.io/google_containers/example-guestbook-php-redis:v3
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
@ -9,7 +9,7 @@ RedisController.prototype.onRedis = function() {
|
|||||||
this.scope_.messages.push(this.scope_.msg);
|
this.scope_.messages.push(this.scope_.msg);
|
||||||
this.scope_.msg = "";
|
this.scope_.msg = "";
|
||||||
var value = this.scope_.messages.join();
|
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) {
|
.success(angular.bind(this, function(data) {
|
||||||
this.scope_.redisResponse = "Updated.";
|
this.scope_.redisResponse = "Updated.";
|
||||||
}));
|
}));
|
||||||
@ -21,7 +21,7 @@ redisApp.controller('RedisCtrl', function ($scope, $http, $location) {
|
|||||||
$scope.controller.location_ = $location;
|
$scope.controller.location_ = $location;
|
||||||
$scope.controller.http_ = $http;
|
$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) {
|
.success(function(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
$scope.messages = data.data.split(",");
|
$scope.messages = data.data.split(",");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<title>Guestbook</title>
|
<title>Guestbook</title>
|
||||||
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
|
<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="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>
|
<script src="ui-bootstrap-tpls-0.10.0.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body ng-controller="RedisCtrl">
|
<body ng-controller="RedisCtrl">
|
||||||
|
Loading…
Reference in New Issue
Block a user