Skip to content

Commit

Permalink
[Site] add OSD results (#711) (#742)
Browse files Browse the repository at this point in the history
* [Site] add OSD results
* fix linter

---------

Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: Kawika Avilla <[email protected]>
(cherry picked from commit ad594fb)

Co-authored-by: Kawika Avilla <[email protected]>
  • Loading branch information
manasvinibs and kavilla authored Jul 10, 2023
1 parent 40103c7 commit 139d2d9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
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 @@ -268,6 +292,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 @@ -276,7 +304,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 @@ -328,14 +357,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

0 comments on commit 139d2d9

Please sign in to comment.