Skip to content
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
19 changes: 12 additions & 7 deletions frontend/public/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ $dropdown-link-hover-border: 1px solid #bee1f4;
padding: 5px 10px 10px;
}

.dropdown-menu--right {
left: auto;
right: 0;
}

.dropdown-menu--text-wrap {
max-width: 100%;
li a {
Expand Down Expand Up @@ -153,7 +148,17 @@ $dropdown-link-hover-border: 1px solid #bee1f4;
padding-right: 30px;
}

&__dropdowns {
&__import {
color: inherit;

&:active,
&:hover {
text-decoration: none;
}
}

&__items {
align-items: center;
display: flex;
justify-content: space-between;

Expand All @@ -175,7 +180,7 @@ $dropdown-link-hover-border: 1px solid #bee1f4;
}

.co-namespace-selector {
max-width: 75%;
max-width: 60%;

.btn-link {
font-size: ($font-size-base + 1);
Expand Down
8 changes: 6 additions & 2 deletions frontend/public/components/import-yaml.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as React from 'react';
import { Helmet } from 'react-helmet';
import { AsyncComponent } from './utils';

export const ImportYamlPage = () => {
const title = 'Import YAML';

return <React.Fragment>
<AsyncComponent loader={() => import('./droppable-edit-yaml').then(c => c.DroppableEditYAML)} create={true} download={false} header="Import YAML" />
<Helmet>
<title>{title}</title>
</Helmet>
<AsyncComponent loader={() => import('./droppable-edit-yaml').then(c => c.DroppableEditYAML)} create={true} download={false} header={title} />
</React.Fragment>;

};
25 changes: 3 additions & 22 deletions frontend/public/components/namespace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { NamespaceModel, ProjectModel, SecretModel } from '../models';
import { k8sGet } from '../module/k8s';
import * as UIActions from '../actions/ui';
import { DetailsPage, ListPage, Table, TableRow, TableData } from './factory';
import { ActionsMenu, Kebab, Dropdown, Firehose, LabelList, LoadingInline, navFactory, ResourceKebab, SectionHeading, ResourceIcon, ResourceLink, ResourceSummary, MsgBox, StatusIconAndText, ExternalLink, humanizeCpuCores, humanizeDecimalBytes } from './utils';
import { Kebab, Dropdown, Firehose, LabelList, LoadingInline, navFactory, ResourceKebab, SectionHeading, ResourceIcon, ResourceLink, ResourceSummary, MsgBox, StatusIconAndText, ExternalLink, humanizeCpuCores, humanizeDecimalBytes } from './utils';
import { createNamespaceModal, createProjectModal, deleteNamespaceModal, configureNamespacePullSecretModal } from './modals';
import { RoleBindingsPage } from './RBAC';
import { Bar, Area, requirePrometheus } from './graphs';
Expand Down Expand Up @@ -341,22 +341,7 @@ class NamespaceBarDropdowns_ extends React.Component {

const onChange = newNamespace => dispatch(UIActions.setActiveNamespace(newNamespace));

const addActions = [
{
label: 'Browse Catalog',
href: '/catalog',
},
{
label: 'Deploy Image',
href: `/deploy-image?preselected-ns=${activeNamespace}`,
},
{
label: 'Import YAML',
href: UIActions.formatNamespacedRouteForResource('import', activeNamespace),
},
];

return <div className="co-namespace-bar__dropdowns">
return <div className="co-namespace-bar__items">
<Dropdown
className="co-namespace-selector"
menuClassName="co-namespace-selector__menu"
Expand All @@ -372,11 +357,7 @@ class NamespaceBarDropdowns_ extends React.Component {
defaultBookmarks={defaultBookmarks}
storageKey={NAMESPACE_LOCAL_STORAGE_KEY}
shortCut={KEYBOARD_SHORTCUTS.focusNamespaceDropdown} />
<ActionsMenu
actions={addActions}
title={<React.Fragment><span className="fa fa-plus-circle co-add-actions-selector__icon" aria-hidden="true"></span> Add</React.Fragment>}
menuClassName="co-add-actions-selector__menu dropdown-menu--right"
buttonClassName="btn-link" />
<Link to={UIActions.formatNamespacedRouteForResource('import', activeNamespace)} className="co-namespace-bar__import"><span className="fa fa-plus-circle co-add-actions-selector__icon" aria-hidden="true"></span> Import YAML</Link>
</div>;
}
}
Expand Down