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

frontend: Add feature to view deploy logs #2581

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
425 changes: 425 additions & 0 deletions frontend/src/components/common/Resource/LogsButton.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ErrorBoundary from '../../ErrorBoundary';
import SectionHeader, { HeaderStyle } from '../../SectionHeader';
import DeleteButton from '../DeleteButton';
import EditButton from '../EditButton';
import { LogsButton } from '../LogsButton';
import { RestartButton } from '../RestartButton';
import ScaleButton from '../ScaleButton';

Expand Down Expand Up @@ -44,6 +45,9 @@ export function MainInfoHeader<T extends KubeObject>(props: MainInfoHeaderProps<
case DefaultHeaderAction.RESTART:
Action = RestartButton;
break;
case DefaultHeaderAction.DEPLOYMENT_LOGS:
Action = LogsButton;
break;
case DefaultHeaderAction.SCALE:
Action = ScaleButton;
break;
Expand Down Expand Up @@ -79,6 +83,9 @@ export function MainInfoHeader<T extends KubeObject>(props: MainInfoHeaderProps<
{
id: DefaultHeaderAction.RESTART,
},
{
id: DefaultHeaderAction.DEPLOYMENT_LOGS,
},
{
id: DefaultHeaderAction.SCALE,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/common/Resource/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ const checkExports = [
'SimpleEditor',
'ViewButton',
'AuthVisible',
'LogsButton',
];

function getFilesToVerify() {
const filesToVerify: string[] = [];
fs.readdirSync(__dirname).forEach(file => {
const fileNoSuffix = file.replace(/\.[^/.]+$/, '');
if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) {
if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix)) && fileNoSuffix) {
filesToVerify.push(fileNoSuffix);
}
});
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/common/Resource/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export { default as ResourceTableColumnChooser } from './ResourceTableColumnChoo
export { addResourceTableColumnsProcessor } from './resourceTableSlice';
export * from './RestartButton';
export * from './ScaleButton';
export * from './LogsButton';
export { default as ScaleButton } from './ScaleButton';
export * from './SimpleEditor';
export { default as SimpleEditor } from './SimpleEditor';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getFilesToVerify() {
const filesToVerify: string[] = [];
fs.readdirSync(__dirname).forEach(file => {
const fileNoSuffix = file.replace(/\.[^/.]+$/, '');
if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix))) {
if (!avoidCheck.find(suffix => fileNoSuffix.endsWith(suffix)) && fileNoSuffix) {
filesToVerify.push(fileNoSuffix);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
>
0
</div>
<div
class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root"
/>
Expand Down
Loading
Loading