changed imports/binders to new location

This commit is contained in:
Florian Scholdei
2019-06-19 09:59:32 +02:00
parent c5252da2ec
commit 9bcc73938e
8 changed files with 31 additions and 34 deletions

View File

@@ -136,7 +136,7 @@ class Configuration extends React.Component<Props, State> {
className="delete"
onClick={() => this.setState({ configChanged: false })}
/>
{this.props.t("config-form.submit-success-notification")}
{this.props.t("config.form.submit-success-notification")}
</div>
);
}
@@ -167,7 +167,7 @@ class Configuration extends React.Component<Props, State> {
{this.props.render(renderProps)}
<hr />
<SubmitButton
label={t("config-form.submit")}
label={t("config.form.submit")}
disabled={!valid || readOnly}
loading={modifying}
/>

View File

@@ -29,20 +29,20 @@ class ConfigurationBinder {
// create NavigationLink with translated label
const ConfigNavLink = translate(this.i18nNamespace)(({t}) => {
return this.navLink("/config" + to, labelI18nKey, t);
return this.navLink("/admin/settings" + to, labelI18nKey, t);
});
// bind navigation link to extension point
binder.bind("config.navigation", ConfigNavLink, configPredicate);
binder.bind("admin.setting", ConfigNavLink, configPredicate);
// route for global configuration, passes the link from the index resource to component
const ConfigRoute = ({ url, links, ...additionalProps }) => {
const link = links[linkName].href;
return this.route(url + to, <ConfigurationComponent link={link} {...additionalProps} />);
return this.route(url + "/settings" + to, <ConfigurationComponent link={link} {...additionalProps} />);
};
// bind config route to extension point
binder.bind("config.route", ConfigRoute, configPredicate);
binder.bind("admin.route", ConfigRoute, configPredicate);
}
bindRepository(to: string, labelI18nKey: string, linkName: string, RepositoryComponent: any) {

View File

@@ -75,7 +75,7 @@ class PrimaryNavigation extends React.Component<Props> {
"primary-navigation.groups",
"groups"
);
append("/config", "/config", "primary-navigation.config", "config");
append("/admin", "/admin", "primary-navigation.admin", "config");
navigationItems.push(
<ExtensionPoint

View File

@@ -1,17 +1,15 @@
{
"config": {
"navigationLabel": "Administrations Navigation",
"globalConfigurationNavLink": "Globale Einstellungen",
"title": "Administration",
"title": "Globale Einstellungen",
"errorTitle": "Fehler",
"errorSubtitle": "Unbekannter Einstellungen Fehler"
},
"config-form": {
"submit": "Speichern",
"submit-success-notification": "Einstellungen wurden erfolgreich geändert!",
"no-read-permission-notification": "Hinweis: Es fehlen Berechtigungen zum Lesen der Einstellungen!",
"no-write-permission-notification": "Hinweis: Es fehlen Berechtigungen zum Bearbeiten der Einstellungen!"
"errorSubtitle": "Unbekannter Einstellungen Fehler",
"form": {
"submit": "Speichern",
"submit-success-notification": "Einstellungen wurden erfolgreich geändert!",
"no-read-permission-notification": "Hinweis: Es fehlen Berechtigungen zum Lesen der Einstellungen!",
"no-write-permission-notification": "Hinweis: Es fehlen Berechtigungen zum Bearbeiten der Einstellungen!"
}
},
"proxy-settings": {
"name": "Proxy Einstellungen",

View File

@@ -1,17 +1,15 @@
{
"config": {
"navigationLabel": "Administration Navigation",
"globalConfigurationNavLink": "Global Configuration",
"title": "Administration",
"title": "Global Configuration",
"errorTitle": "Error",
"errorSubtitle": "Unknown Config Error"
},
"config-form": {
"submit": "Submit",
"submit-success-notification": "Configuration changed successfully!",
"no-read-permission-notification": "Please note: You do not have the permission to see the config!",
"no-write-permission-notification": "Please note: You do not have the permission to edit the config!"
"errorSubtitle": "Unknown Config Error",
"form": {
"submit": "Submit",
"submit-success-notification": "Configuration changed successfully!",
"no-read-permission-notification": "Please note: You do not have the permission to see the config!",
"no-write-permission-notification": "Please note: You do not have the permission to edit the config!"
}
},
"proxy-settings": {
"name": "Proxy Settings",

View File

@@ -21,7 +21,8 @@ import Groups from "../groups/containers/Groups";
import SingleGroup from "../groups/containers/SingleGroup";
import CreateGroup from "../groups/containers/CreateGroup";
import Config from "../config/containers/Config";
import Admin from "../admin/containers/Admin";
import Profile from "./Profile";
type Props = {
@@ -112,8 +113,8 @@ class Main extends React.Component<Props> {
authenticated={authenticated}
/>
<ProtectedRoute
path="/config"
component={Config}
path="/admin"
component={Admin}
authenticated={authenticated}
/>
<ProtectedRoute

View File

@@ -14,9 +14,9 @@ import auth from "./modules/auth";
import pending from "./modules/pending";
import failure from "./modules/failure";
import permissions from "./repos/permissions/modules/permissions";
import config from "./config/modules/config";
import roles from "./config/roles/modules/roles";
import namespaceStrategies from "./config/modules/namespaceStrategies";
import config from "./admin/modules/config";
import roles from "./admin/roles/modules/roles";
import namespaceStrategies from "./admin/modules/namespaceStrategies";
import indexResources from "./modules/indexResource";
import type { BrowserHistory } from "history/createBrowserHistory";

View File

@@ -22,7 +22,7 @@ import { getRepositoriesLink } from "../../modules/indexResource";
import {
fetchNamespaceStrategiesIfNeeded,
getFetchNamespaceStrategiesFailure, getNamespaceStrategies, isFetchNamespaceStrategiesPending
} from "../../config/modules/namespaceStrategies";
} from "../../admin/modules/namespaceStrategies";
type Props = {
repositoryTypes: RepositoryType[],