vitess-gh/web/vtctld/config.js

22 строки
633 B
JavaScript
Исходник Обычный вид История

// This file contains config that may need to be changed
// on a site-local basis.
vtconfig = {
k8s_proxy_re: /(\/api\/v1\/proxy\/.*)\/services\/vtctld/,
2015-07-23 00:51:22 +03:00
tabletLinks: function(tablet) {
status_href = 'http://'+tablet.hostname+':'+tablet.port_map.vt+'/debug/status'
// If we're in Kubernetes, route through the proxy.
var match = window.location.pathname.match(vtconfig.k8s_proxy_re);
if (match) {
status_href = match[1] + '/pods/vttablet-' + tablet.alias.uid + ':' + tablet.port_map.vt + '/debug/status';
}
2015-07-23 00:51:22 +03:00
return [
{
title: 'Status',
href: status_href
2015-07-23 00:51:22 +03:00
}
];
}
};