Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Site] add OSD results #711

Merged
merged 2 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ <h2>Plugins:</h2>
<table>
<tr>
<td id="pluginButtonsTd">
<button id="opensearchDashboardsButton" onclick="getPluginLinks('opensearch-dashboards')">
OpenSearch Dashboards
</button>
<button id="alertingDashboardsButton" onclick="getPluginLinks('alerting-dashboards-plugin')">
alertingDashboards
</button>
Expand Down
37 changes: 33 additions & 4 deletions site/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ const defaults = {
};

const plugins = {
'opensearch-dashboards': {
name: 'OpenSearch-Dashboards',
default: {
videos: [
'apps/vis_builder/basic.spec.js',
'apps/vis_builder/dashboard.spec.js',
'apps/vis_builder/experimental.spec.js',
'apps/vis_builder/vis_types/area.spec.js',
'apps/vis_builder/vis_types/bar.spec.js',
'apps/vis_builder/vis_types/line.spec.js',
'apps/vis_builder/vis_types/metric.spec.js',
'apps/vis_builder/vis_types/table.spec.js',
'apps/vis_type_table/basic.spec.js',
'apps/vis_type_table/data.spec.js',
'apps/vis_type_table/embed.spec.js',
'apps/vis_type_table/options.spec.js',
'apps/vis_type_table/split.spec.js',
'apps/datasource-management-plugin/1_create_datasource.spec.js',
'apps/datasource-management-plugin/2_datasource_table.spec.js',
'apps/datasource-management-plugin/3_update_datasource.spec.js',
'dashboard_sanity_test_spec.js',
],
},
},
'alerting-dashboards-plugin': {
name: 'alertingDashboards',
default: {
Expand Down Expand Up @@ -286,6 +310,10 @@ function getPluginLinks(plugin) {

var pluginLinksList = document.getElementById('pluginLinksList');
const pluginObject = plugins[plugin];
const coreBaseUrl =
pluginObject.name === 'OpenSearch-Dashboards'
? 'core-opensearch-dashboards'
: 'plugins';

const pluginUrl =
'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/' +
Expand All @@ -294,7 +322,8 @@ function getPluginLinks(plugin) {
`${platform}/` +
`${arch}/` +
`${type}/` +
'builds/opensearch-dashboards/plugins/' +
'builds/opensearch-dashboards/' +
`${coreBaseUrl}` +
`${pluginObject.name}-${version}.zip`;

var githubManifestLink = document.createElement('a');
Expand Down Expand Up @@ -346,14 +375,14 @@ function getPluginLinks(plugin) {
}/` +
`${securityEnabled ? 'with-security' : 'without-security'}` +
`${enableLegacyTestsResults() ? 'test-results' : ''}`;
const screenshotBaseUrl = `${s3BaseUrl}/cypress-screenshots/plugins/${plugin}/$SPEC_FILE/$FULL_TEST_FAILURE.png`;
const videosBaseUrl = `${s3BaseUrl}/cypress-videos/plugins/${plugin}`;
const screenshotBaseUrl = `${s3BaseUrl}/cypress-screenshots/${coreBaseUrl}/${plugin}/$SPEC_FILE/$FULL_TEST_FAILURE.png`;
const videosBaseUrl = `${s3BaseUrl}/cypress-videos/${coreBaseUrl}/${plugin}`;

document.getElementById(
'baseScreenshotUrlBefore'
).innerHTML = `/tmp/$RANDOM/${
enableLegacyTestsResults() ? 'functionalTestDashboards' : pluginObject.name
}/cypress/screenshots/plugins/${plugin}/$SPEC_FILE/$FULL_TEST_FAILURE.png`;
}/cypress/screenshots/${coreBaseUrl}/${plugin}/$SPEC_FILE/$FULL_TEST_FAILURE.png`;
document.getElementById('baseScreenshotUrlAfter').innerHTML =
screenshotBaseUrl;

Expand Down
1 change: 1 addition & 0 deletions site/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ body {
border-radius: 6px;
box-shadow: rgba(27, 31, 35, 0.04) 0 1px 0, rgba(255, 255, 255, 0.25) 0 3px 0 inset;
border: 2px solid rgba(27, 31, 35, 0.15);
overflow-y: scroll;
}

#pluginLinksDiv button {
Expand Down
Loading