Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #15 from grafana/fix_legacy_slugify
Browse files Browse the repository at this point in the history
remove legacy slugify functions
  • Loading branch information
jtlisi authored Apr 9, 2018
2 parents 193d94c + b228072 commit ddf616e
Show file tree
Hide file tree
Showing 24 changed files with 36 additions and 134 deletions.
8 changes: 2 additions & 6 deletions dist/components/clusters/clusterInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/clusters/clusterInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions dist/components/clusters/clusterInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import _ from 'lodash';
import $ from 'jquery';

function slugify(str) {
var slug = str.replace("@", "at").replace("&", "and").replace(/[.]/g, "_").replace("/\W+/", "");
return slug;
}

export class ClusterInfoCtrl {
cluster: any;
pageReady: boolean;
Expand Down Expand Up @@ -96,7 +91,7 @@ export class ClusterInfoCtrl {
.search({
"var-datasource": this.cluster.jsonData.ds,
"var-cluster": this.cluster.name,
"var-node": node === 'All' ? 'All': slugify(node.metadata.name)
"var-node": node === 'All' ? 'All': node.metadata.name
});
}
}
Expand All @@ -107,7 +102,7 @@ export class ClusterInfoCtrl {
this.$location.path("plugins/grafana-kubernetes-app/page/cluster-workloads")
.search({
"cluster": this.cluster.id,
"namespace": slugify(ns.metadata.name)
"namespace": ns.metadata.name
});
}
}
Expand Down
8 changes: 2 additions & 6 deletions dist/components/clusters/clusterWorkloads.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ddf616e

Please sign in to comment.