Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Lau (AvengerMoJo) <[email protected]>
  • Loading branch information
AvengerMoJo committed Sep 30, 2021
1 parent b932f76 commit 2713ce8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
47 changes: 45 additions & 2 deletions StorageLayoutMapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
}
window.onload=updateURL;
</script>
<script type="module" crossorigin src="https://avengermojo.github.io/assets/storage.c7b2e8cf.js"></script>
<script type="module" crossorigin src="https://avengermojo.github.io/assets/storage.ec424dc4.js"></script>
<link rel="modulepreload" href="https://avengermojo.github.io/assets/vendor.ec54b159.js">
<link rel="stylesheet" href="https://avengermojo.github.io/assets/storage.6d9a3371.css">
<link rel="stylesheet" href="https://avengermojo.github.io/assets/storage.7824debe.css">
</head>
<body>
<h1>Storage Drive Layout Configurator</h1>
Expand Down Expand Up @@ -350,9 +350,19 @@ <h1>Storage Drive Layout Configurator</h1>
document.getElementById(tabName).style.display = "block";
theEvent.currentTarget.className += " active";
}

function updateColorTab(){
var elements = document.getElementsByClassName('HardDrive');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var select_hd_id = document.getElementById("HardDriveID");
select_hd_id.options[ select_hd_id.options.length ] = new Option(element.id, element.id);
}
}
</script>
<button class="tablinks" onclick="switchTab(event, 'Json')">JSON</button>
<button class="tablinks" onclick="switchTab(event, 'diagrams.net')">diagrams.net</button>
<button class="tablinks" onclick="switchTab(event, 'ColorTab');updateColorTab();">Color Change</button>
<div id="Json" class="tabview">
<button onclick="window.jsonview()">JSON-View</button>
<script>
Expand All @@ -376,6 +386,39 @@ <h1>Storage Drive Layout Configurator</h1>
<pre><textarea id="diastring" rows="25" cols="80"></textarea></pre>
</div>
</div>
<div id="ColorTab" class="tabview">
<button onclick="window.colorchangeview()">ColorChange</button>
<script>
function colorchangeview() {
color = document.getElementById("HardDriveColor").value;
drive = document.getElementById("HardDriveID").value;
if( drive == "All" ) {
var elements = document.getElementsByClassName('HardDrive');
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
element.style.fill = color;
}
} else {
document.getElementById(drive).style.fill = color;
}
//document.getElementById( document.getElementById("HardDriveID").value).style.fill = document.getElementById("DriveColor").value;
}
</script>
<div id="ColorChangeView" class="menu">
<p>Color HD change into:
<select name="HardDriveColor" id="HardDriveColor">
<option value="white">White</option>
<option value="green">Green</option>
<option value="orange">Orange</option>
<option value="red">Red</option>
</select>
</p>
<p>Change Color for HardDrive ID :</p>
<select name="HardDriveID" id="HardDriveID">
<option value="All">All</option>
</select>
</div>
</div>
</div>
<div id="box" class="box"></div>
</body>
Expand Down

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

1 change: 0 additions & 1 deletion assets/storage.c7b2e8cf.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/storage.ec424dc4.js

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

0 comments on commit 2713ce8

Please sign in to comment.