Skip to content

Commit b1c625f

Browse files
authored
Merge pull request #2316 from jaimergp/view-raw-data
2 parents e4aa301 + a129da8 commit b1c625f

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

src/components/StatusDashboard/version_updates.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ export default function VersionUpdates({ onLoad }) {
3737
<span className="badge badge--secondary">{Object.keys(queued).length}</span>
3838
{" "}
3939
<span className="badge badge--warning">{Object.keys(errors).length}</span>
40+
{" "}
41+
<small className="fa fa-fw">
42+
<a href={urls.versions.api} target="_blank" title="View raw payload">
43+
<i className="fa fa-fw fa-arrow-up-right-from-square"></i>
44+
</a>
45+
</small>
4046
</h3>
4147
</div>
4248
<div className="card__body">

src/pages/status/migration/index.jsx

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import React, { useEffect, useState } from "react";
77
import SVG from 'react-inlinesvg';
88
import styles from "./styles.module.css";
99
import { Tooltip } from "react-tooltip";
10+
import Tabs from '@theme/Tabs';
11+
import TabItem from '@theme/TabItem';
1012

1113
// { Done, In PR, Awaiting PR, Awaiting parents, Not solvable, Bot error }
1214
// The third value is a boolean representing the default display state on load
@@ -90,8 +92,37 @@ export default function MigrationDetails() {
9092
<div className={`card margin-top--xs`}>
9193
<div className="card__header">
9294
<div className={styles.migration_details_toggle}>
93-
<button onClick={() => toggle("table")}>Table View</button>{" "}
94-
<button onClick={() => toggle("graph")}>Graph View</button>
95+
<div class="tabs-container">
96+
<ul role="tablist" aria-orientation="horizontal" class="tabs">
97+
<li
98+
key="table"
99+
role="tab"
100+
class={["tabs__item", (view == "table" ? "tabs__item--active" : null)].join(" ")}
101+
onClick={() => toggle("table")}
102+
>
103+
Table
104+
</li>
105+
<li
106+
key="graph"
107+
role="tab"
108+
class={["tabs__item", (view == "graph" ? "tabs__item--active" : null)].join(" ")}
109+
onClick={() => toggle("graph")}
110+
>
111+
Graph
112+
</li>
113+
{name &&
114+
<a href={urls.migrations.details.replace("<NAME>", name)} target="_blank">
115+
<li
116+
key="raw"
117+
role="tab"
118+
class="tabs__item"
119+
>
120+
<span>Raw <i className="fa fa-fw fa-arrow-up-right-from-square"></i></span>
121+
</li>
122+
</a>
123+
}
124+
</ul>
125+
</div>
95126
</div>
96127
<Breadcrumbs>{name}</Breadcrumbs>
97128
<div style={{ clear: "both" }}></div>

0 commit comments

Comments
 (0)