
remove node modules make new data file for web ui initial commit of dashboard switch back to non SSL request move port splitting to common place; add to node resource location Signed-off-by: Patrick Reilly <patrick@kismatic.io> various path fixes make svg path relative work around missing mime type Signed-off-by: Patrick Reilly <patrick@kismatic.io> fix paths fix karma path remove bad protractor test
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
/**=========================================================
|
|
* Module: Replication
|
|
* Visualizer for replication controllers
|
|
=========================================================*/
|
|
|
|
function ReplicationController() {
|
|
}
|
|
|
|
ReplicationController.prototype.getData = function(dataId) {
|
|
this.scope.loading = true;
|
|
this.k8sApi.getReplicationControllers(dataId).success(angular.bind(this, function(data) {
|
|
this.scope.replicationController = data;
|
|
this.scope.loading = false;
|
|
})).error(angular.bind(this, this.handleError));
|
|
};
|
|
|
|
ReplicationController.prototype.handleError = function(data, status, headers, config) {
|
|
console.log("Error (" + status + "): " + data);
|
|
this.scope.loading = false;
|
|
};
|
|
|
|
app.controller('ReplicationControllerCtrl', [
|
|
'$scope',
|
|
'$routeParams',
|
|
'k8sApi',
|
|
function($scope, $routeParams, k8sApi) {
|
|
$scope.controller = new ReplicationController();
|
|
$scope.controller.k8sApi = k8sApi;
|
|
$scope.controller.scope = $scope;
|
|
$scope.controller.getData($routeParams.replicationControllerId);
|
|
}
|
|
]);
|