forked from mintel/dex-k8s-authenticator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkubeconfig.html
100 lines (85 loc) · 3.39 KB
/
kubeconfig.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="google" content="notranslate">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Kubernetes Configuration</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ .Web_Path_Prefix }}static/main.css" rel="stylesheet" type="text/css">
<link href="{{ .Web_Path_Prefix }}static/styles.css" rel="stylesheet" type="text/css">
<link href="{{ .Web_Path_Prefix }}static/tabs.css" rel="stylesheet" type="text/css">
<link rel="icon" href="{{ .Web_Path_Prefix }}static/favicon.png">
</head>
<body class="theme-body">
<div class="theme-navbar">
{{ if .LogoURI }}
<div class="theme-navbar__logo-wrap">
<img class="theme-navbar__logo" src="{{ .LogoURI }}"/>
</div>
{{ end }}
</div>
<div class="dex-kubeconfig-container">
<div class="theme-panel">
<div style="float:right">
<a href="{{ .Web_Path_Prefix }}">Login Again</a>
</div>
<h2 class="theme-heading">Generated Kubernetes Token - {{ .ShortDescription }}</h2>
<div>
<p>Please check that you have been assigned to the expected Groups, then follow the instructions
based on your OS.
</p>
<div class="groups">
<pre><code>{{ .Claims }}</code></pre>
</div>
<div class="tab">
<button class="tablinks active" onclick="openTab(event, 'Linux')">Linux</button>
<button class="tablinks" onclick="openTab(event, 'MacOS')">MacOS</button>
<button class="tablinks" onclick="openTab(event, 'Windows')">Windows</button>
<button class="tablinks" onclick="openTab(event, 'IDToken')">ID Token</button>
</div>
<div id="Linux" class="tabcontent" style="display: block">
{{ template "linux-tab-content" . }}
</div>
<div id="MacOS" class="tabcontent">
{{ template "mac-tab-content" . }}
</div>
<div id="Windows" class="tabcontent">
{{ template "windows-tab-content" . }}
</div>
<div id="IDToken" class="tabcontent">
{{ template "id-token-content" . }}
</div>
</div>
</div>
<script src="{{ .Web_Path_Prefix }}static/highlight.pack.min.js"></script>
<script src="{{ .Web_Path_Prefix }}static/clipboard.min.js"></script>
<script src="{{ .Web_Path_Prefix }}static/snippets.js"></script>
<script src="{{ .Web_Path_Prefix }}static/tooltips.js"></script>
<script>
var clipboard = new ClipboardJS('.btn');
clipboard.on('success', function(e) {
console.log(e);
});
clipboard.on('error', function(e) {
console.log(e);
});
</script>
<script>
function openTab(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
</script>
</body>
</html>