Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
retired the tools menu, added help menu #184
Browse files Browse the repository at this point in the history
  • Loading branch information
morjoan committed Dec 17, 2021
1 parent c0af609 commit 265fa4c
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/MANAGED_INSTANCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To override the default:
## Tagging SSM Managed EC2 and Hybrid Resources


Refer to [this guide]( https://github.com/awslabs/aws-media-services-application-mapper/blob/master/RESOURCE_TAGS.md#ssm-managed-ec2-and-hybrid-resources) on tagging your managed instance resources.
Refer to [this guide]( https://github.com/awslabs/aws-media-services-application-mapper/blob/main/docs/RESOURCE_TAGS.md#ssm-managed-ec2-and-hybrid-resources) on tagging your managed instance resources.


## [Support for Elemental Live Encoders](#support-for-elemental-live-encoders)
Expand Down
15 changes: 12 additions & 3 deletions source/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,20 @@
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="tools_dropdown" role="button"
<a class="nav-link dropdown-toggle" href="#" id="help_dropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Tools
Help
</a>
<div class="dropdown-menu" aria-labelledby="tools_dropdown" id="tools-dropdown-menu">
<div class="dropdown-menu" aria-labelledby="help_dropdown" id="help-dropdown-menu">
<a class="dropdown-item" href="https://github.com/aws-solutions/aws-media-services-application-mapper/issues/new?assignees=&labels=bug&template=bug_report.md&title="
target="_blank" id="bug-report-button">Bug Report</a>
<a class="dropdown-item" href="https://github.com/aws-solutions/aws-media-services-application-mapper/issues/new?assignees=&labels=enhancement&template=feature_request.md&title="
target="_blank" id="request-feature-button">Feature Request</a>
<a class="dropdown-item" href="https://docs.aws.amazon.com/solutions/latest/media-services-application-mapper/welcome.html"
target="_blank" id="implementation-guide-button">Implementation Guide</a>
<a class="dropdown-item" href="https://aws.amazon.com/solutions/implementations/media-services-application-mapper/"
target="_blank" id="landing-page-button">Solution Landing Page</a>
<a class="dropdown-item" data_toggle="" href="#" id="build-version-button">MSAM Build Version</a>
</div>
</li>
</ul>
Expand Down
6 changes: 0 additions & 6 deletions source/html/js/app/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ define({
"app/mappers/connections/medialive_channel_input",
"app/mappers/connections/medialive_channel_mediaconnect_flow",
],
"tools": [
"app/tools/build_numbers",
"app/tools/clear_http",
"app/tools/cross_region",
"app/tools/duplicate_names"
],
"overlays": [
"app/ui/overlays/mediaconnect_flow",
"app/ui/overlays/medialive_channel",
Expand Down
4 changes: 2 additions & 2 deletions source/html/js/app/statemachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ define(["app/connections", "app/regions", "app/model", "app/ui/settings_menu", "
"app/ui/search_view",
"app/ui/selected_item_view",
"app/ui/tile_view",
"app/ui/tools_menu",
"app/ui/information_compartment",
"app/ui/user_defined"
"app/ui/user_defined",
"app/ui/help_menu"
]);
// show the tiles tab
$("#channel-tiles-tab").tab('show');
Expand Down
16 changes: 2 additions & 14 deletions source/html/js/app/tools/build_numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,7 @@ define(["jquery", "app/api_check", "app/build", "app/connections"],
var api_key = current_connection[1];
var app_stamp = build.get_version();
check.ping(endpoint, api_key).then(function(response) {
var api_stamp = Number.parseInt(response.buildstamp);
var browser_stamp = Number.parseInt(app_stamp);
var delta_stamp = Math.abs(api_stamp - browser_stamp);
if (Number.isNaN(delta_stamp)) {
delta_stamp = 0;
}
var badge = `<span class="badge badge-info">Info</span>`;
if (delta_stamp >= tolerance) {
badge = `<span class="badge badge-warning">Warning</span>`;
}
var warning = `${badge} Browser and Endpoint build timestamps are ${Math.round(delta_stamp / (3600 * 24))} days apart.`;
var message = `
var message = `
<p class="my-2">This tool shows the build numbers for the currently running browser application and the currently connected endpoint.</p>
<table class="table table-bordered my-2">
<thead>
Expand All @@ -46,11 +35,10 @@ define(["jquery", "app/api_check", "app/build", "app/connections"],
<tr>
<th scope="row">2</th>
<td>Endpoint API</td>
<td>${response.buildstamp}</td>
<td>${response.version}</td>
</tr>
</tbody>
</table>
<p class="my-2">${warning}</p>
`;
resolve({
name: name,
Expand Down
22 changes: 22 additions & 0 deletions source/html/js/app/ui/help_menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*! Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0 */

define(["jquery", "app/tools/build_numbers"], function($, build_numbers) {

$("#build-version-button").on("click", function(event) {
build_numbers.run().then(function (result) {
var alert_class = result.success ? "alert-success" : "alert-danger";
var prefix = result.success ? "Passed" : "Failed";
var html = `<div class="alert ${alert_class}" style="width: 100%; text-align: center;" role="alert">${prefix}: Output for build version</div>`;
$("#tool_output_modal_title").html(html);
$("#tool_output_modal_message").html(result.message);
$("#tool_output_modal").modal('show');
}).catch(function (error) {
var alert_class = "alert-danger";
var html = `<div class="alert ${alert_class}" style="width: 100%; text-align: center;" role="alert">Failed: Output for build version</div>`;
$("#tool_output_modal_title").html(html);
$("#tool_output_modal_message").html(error);
$("#tool_output_modal").modal('show');
})
});
});

0 comments on commit 265fa4c

Please sign in to comment.