some improvements...

This commit is contained in:
eugenio
2026-05-03 08:18:38 +02:00
parent fafd7ae89d
commit bc398a6714
3 changed files with 34 additions and 8 deletions
+2 -1
View File
@@ -403,4 +403,5 @@ Please reach out for news, bugs, feature requests, and other issues via:
## License
KubeInvaders is licensed under the GNU General Public License v3.0. See [LICENSE](./LICENSE) for the full license text.
KubeInvaders is licensed under the Apache 2.0 License.
See [LICENSE](./LICENSE) for the full license text.
+27 -6
View File
@@ -257,19 +257,23 @@
</div>
<!-- Modal -->
<div class="modal fade" id="setChaosContainerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal fade" id="setChaosContainerModal" tabindex="-1" role="dialog" aria-labelledby="setChaosContainerModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">Set Chaos Container Definition (Click on the code editor if you don't see anything.) - This job defines the chaos experiment that are executed when you target Kubernetes nodes in game mode</h6>
<h5 class="modal-title" id="setChaosContainerModalLabel"><i class="fas fa-cube me-2"></i>Chaos Container Definition</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" onclick="closeSetChaosContainerModal()"></button>
</div>
<div class="modal-body">
<p class="text-muted" style="font-size: 13px; font-weight: normal; margin-bottom: 12px;">
Defines the Kubernetes Job executed when you target nodes in Game Mode. Click inside the editor if content does not appear immediately.
</p>
<textarea id="currentChaosContainerJsonTextArea"></textarea>
<p id="alert_placeholder2" style="color: #161616; margin-top: 3%;"></p>
<div class="modal-footer">
<button type="button" id="saveButton" class="btn btn-light" onclick="setChaosContainer()">Save</button>
<button type="button" id="closeButton3" class="btn btn-dark" data-dismiss="modal" onclick="closeSetChaosContainerModal()">Close</button>
</div>
</div>
<div class="modal-footer">
<button type="button" id="saveButton" class="btn btn-light" onclick="setChaosContainer()">Save</button>
<button type="button" id="closeButton3" class="btn btn-dark" data-bs-dismiss="modal" onclick="closeSetChaosContainerModal()">Close</button>
</div>
</div>
</div>
@@ -462,6 +466,23 @@ rules:
- update
- patch
- delete
- apiGroups:
- ""
resources:
- namespaces
verbs:
- create
- get
- list
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- get
- list
- watch
- apiGroups:
- "*"
resources:
+5 -1
View File
@@ -563,7 +563,11 @@ function deployDemoResources() {
if (payload && payload.errors && payload.errors.length > 0) {
errorDiv.style.display = 'block';
successDiv.style.display = 'none';
errorDiv.textContent = 'Partial failure: ' + payload.errors.join('; ');
var hasUnauthorized = payload.errors.some(function(e) { return e.includes('401'); });
var hint = hasUnauthorized
? ' — token may lack RBAC permissions. Use the ⓘ button next to the Token field to create a service account with the correct cluster role.'
: '';
errorDiv.innerHTML = '⚠️ Partial failure: ' + payload.errors.join('; ') + hint;
} else {
successDiv.style.display = 'block';
errorDiv.style.display = 'none';