helm-viewer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # helm-viewer
2
+
3
+ ## Generate the binary
4
+
5
+ ```
6
+ just
7
+ ```
8
+
9
+ ## Perform the execution
10
+
11
+ ```
12
+ node helm-template path/of/the/chart
13
+ ```
@@ -0,0 +1,120 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <script>
11
+ tailwind.config = {
12
+ theme: {
13
+ extend: {
14
+ colors: {
15
+ clifford: '#da373d',
16
+ }
17
+ }
18
+ }
19
+ }
20
+ </script>
21
+ <!--<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>-->
22
+ <script type='text/javascript' src="assets/vue.global.js"></script>
23
+ </head>
24
+ <body>
25
+ <div id="app" class="flex">
26
+ <sidebar class="w-2/5 bg-blue-50">
27
+ <div class="p-2">
28
+ <h1 class="italic text-4xl font-thin ml-4 mb-8">>> Computed files</h1>
29
+
30
+ <div class="mb-8" v-for="template of Object.keys(data.templated)">
31
+ <p class="text-3xl font-thin">
32
+ {{ template }}
33
+ </p>
34
+
35
+ <div
36
+ class="ml-6 mt-2"
37
+ v-for="file of Object.keys(data.templated[template])"
38
+ @click="displayTemplatedFile(template, file)"
39
+ >
40
+ {{ file }}
41
+ </div>
42
+ </div>
43
+ </div>
44
+
45
+ <div class="bg-green-100">
46
+ <h1 class="italic text-4xl font-thin ml-4 mb-8">>> Sources</h1>
47
+ <div class="mb-1" v-for="file of Object.keys(data.sources).filter(n => n !== 'templates')">
48
+ <p
49
+ class="text-xl ml-8 font-thin"
50
+ @click="displaySourceFile(file)"
51
+ >
52
+ {{ file }}
53
+ </p>
54
+ </div>
55
+ <p
56
+ class="text-xl ml-8 font-thin"
57
+ >templates</p>
58
+ <div class="mb-1 ml-6" v-for="file of Object.keys(data.sources['templates'])">
59
+ <p
60
+ class="text-xl ml-8 font-thin"
61
+ @click="displaySourceFile(file, true)"
62
+ >
63
+ {{ file }}
64
+ </p>
65
+ </div>
66
+ </div>
67
+ </sidebar>
68
+
69
+ <div class="w-3/5 bg-blue-200 pl-8">
70
+ <pre v-if="source && templateFile && fileName">
71
+ <template v-if="source === 'templated'">
72
+ {{ data["templated"][templateFile][fileName ]}}
73
+ </template>
74
+ <template v-else === 'templated'">
75
+ <template v-if="isSourceTemplate">
76
+ {{ data["sources"]["templates"][fileName ]}}
77
+ </template>
78
+ <template v-else>
79
+ {{ data["sources"][fileName ]}}
80
+ </template>
81
+ </template>
82
+ </pre>
83
+ </div>
84
+ </div>
85
+
86
+ <script src="assets/global-data.js"></script>
87
+ <script>
88
+ const { createApp, ref } = Vue
89
+ createApp({
90
+ data() {
91
+ return {
92
+ templateFile: "ServiceAccount",
93
+ fileName: "psd2_connector_sandbox",
94
+ source: "templated",
95
+ isSourceTemplate: false,
96
+ }
97
+ },
98
+ setup() {
99
+ const message = ref('Hello vue!')
100
+ return {
101
+ message,
102
+ data: DATA,
103
+ }
104
+ },
105
+ methods: {
106
+ displayTemplatedFile(templateFile, fileName) {
107
+ this.source = "templated"
108
+ this.templateFile = templateFile;
109
+ this.fileName = fileName;
110
+ },
111
+ displaySourceFile(fileName, isTemplate = false) {
112
+ this.source = "source"
113
+ this.fileName = fileName
114
+ this.isSourceTemplate = isTemplate
115
+ }
116
+ }
117
+ }).mount('#app')
118
+ </script>
119
+ </body>
120
+ </html>