aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings')
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/CategoryOverrides.ts3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/Definition.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx11
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/store/definitions.ts3
-rw-r--r--server/sonar-web/src/main/js/apps/settings/store/settingsPage.ts7
-rw-r--r--server/sonar-web/src/main/js/apps/settings/store/values.ts5
-rw-r--r--server/sonar-web/src/main/js/apps/settings/utils.ts7
25 files changed, 63 insertions, 39 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx
index aa946fabeae..bcb0db78471 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx
@@ -19,6 +19,7 @@
*/
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
+import { Component } from '../../../types/types';
import {
ALM_INTEGRATION,
ANALYSIS_SCOPE_CATEGORY,
@@ -33,7 +34,7 @@ import NewCodePeriod from './NewCodePeriod';
import PullRequestDecorationBinding from './pullRequestDecorationBinding/PRDecorationBinding';
export interface AdditionalCategoryComponentProps {
- component: T.Component | undefined;
+ component: Component | undefined;
selectedCategory: string;
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx
index 70d39c40770..88419881a33 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx
@@ -24,6 +24,7 @@ import { connect } from 'react-redux';
import { IndexLink } from 'react-router';
import { getGlobalSettingsUrl, getProjectSettingsUrl } from '../../../helpers/urls';
import { getAppState, getSettingsAppAllCategories, Store } from '../../../store/rootReducer';
+import { Component } from '../../../types/types';
import { getCategoryName } from '../utils';
import { ADDITIONAL_CATEGORIES } from './AdditionalCategories';
import CATEGORY_OVERRIDES from './CategoryOverrides';
@@ -31,7 +32,7 @@ import CATEGORY_OVERRIDES from './CategoryOverrides';
export interface CategoriesListProps {
branchesEnabled?: boolean;
categories: string[];
- component?: T.Component;
+ component?: Component;
defaultCategory: string;
selectedCategory: string;
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx
index f36d33c40d1..a0b789a0666 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx
@@ -19,12 +19,13 @@
*/
import { connect } from 'react-redux';
import { getSettingsAppSettingsForCategory, Store } from '../../../store/rootReducer';
+import { Component } from '../../../types/types';
import { fetchValues } from '../store/actions';
import SubCategoryDefinitionsList from './SubCategoryDefinitionsList';
interface Props {
category: string;
- component?: T.Component;
+ component?: Component;
}
const mapStateToProps = (state: Store, ownProps: Props) => ({
diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryOverrides.ts b/server/sonar-web/src/main/js/apps/settings/components/CategoryOverrides.ts
index 95d249719cb..f5e76d6f647 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/CategoryOverrides.ts
+++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryOverrides.ts
@@ -17,9 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Dict } from '../../../types/types';
import { LANGUAGES_CATEGORY } from './AdditionalCategoryKeys';
-const CATEGORY_OVERRIDES: T.Dict<string> = {
+const CATEGORY_OVERRIDES: Dict<string> = {
abap: LANGUAGES_CATEGORY,
apex: LANGUAGES_CATEGORY,
'c / c++ / objective-c': LANGUAGES_CATEGORY,
diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx
index 0bc426876f8..cdbdab94747 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx
@@ -31,6 +31,7 @@ import {
Store
} from '../../../store/rootReducer';
import { Setting } from '../../../types/settings';
+import { Component } from '../../../types/types';
import { checkValue, resetValue, saveValue } from '../store/actions';
import { cancelChange, changeValue, passValidation } from '../store/settingsPage';
import {
@@ -47,7 +48,7 @@ interface Props {
changeValue: (key: string, value: any) => void;
changedValue: any;
checkValue: (key: string) => boolean;
- component?: T.Component;
+ component?: Component;
loading: boolean;
passValidation: (key: string) => void;
resetValue: (key: string, component?: string) => Promise<void>;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx
index 8f810e009f0..2824d1c41af 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.tsx
@@ -19,10 +19,11 @@
*/
import * as React from 'react';
import { Setting } from '../../../types/settings';
+import { Component } from '../../../types/types';
import Definition from './Definition';
interface Props {
- component?: T.Component;
+ component?: Component;
scrollToDefinition: (element: HTMLLIElement) => void;
settings: Setting[];
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx
index 544a42df889..990a9f84e92 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx
@@ -27,9 +27,10 @@ import MandatoryFieldMarker from '../../../components/ui/MandatoryFieldMarker';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { parseError } from '../../../helpers/request';
+import { LoggedInUser } from '../../../types/types';
interface Props {
- currentUser: T.LoggedInUser;
+ currentUser: LoggedInUser;
}
interface State {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx b/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx
index ac5b327ae95..caf5fed3395 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx
@@ -25,17 +25,18 @@ import { ResetButtonLink, SubmitButton } from '../../../components/controls/butt
import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
+import { NewCodePeriodSettingType } from '../../../types/types';
import BaselineSettingDays from '../../projectBaseline/components/BaselineSettingDays';
import BaselineSettingPreviousVersion from '../../projectBaseline/components/BaselineSettingPreviousVersion';
import { validateDays } from '../../projectBaseline/utils';
interface State {
- currentSetting?: T.NewCodePeriodSettingType;
+ currentSetting?: NewCodePeriodSettingType;
days: string;
loading: boolean;
currentSettingValue?: string | number;
saving: boolean;
- selected?: T.NewCodePeriodSettingType;
+ selected?: NewCodePeriodSettingType;
success: boolean;
}
@@ -81,7 +82,7 @@ export default class NewCodePeriod extends React.PureComponent<{}, State> {
this.setState({ days, success: false });
};
- onSelectSetting = (selected: T.NewCodePeriodSettingType) => {
+ onSelectSetting = (selected: NewCodePeriodSettingType) => {
this.setState({ selected, success: false });
};
diff --git a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx
index b18ad5646fb..b8f11a64b68 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.tsx
@@ -20,10 +20,11 @@
import * as React from 'react';
import InstanceMessage from '../../../components/common/InstanceMessage';
import { translate } from '../../../helpers/l10n';
+import { Component } from '../../../types/types';
import SettingsSearch from './SettingsSearch';
export interface PageHeaderProps {
- component?: T.Component;
+ component?: Component;
}
export default function PageHeader({ component }: PageHeaderProps) {
diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx
index 5149787010a..e9875254569 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx
@@ -32,6 +32,7 @@ import {
removeWhitePageClass
} from '../../../helpers/pages';
import { getSettingsAppDefaultCategory, Store } from '../../../store/rootReducer';
+import { Component } from '../../../types/types';
import { fetchSettings } from '../store/actions';
import '../styles.css';
import { ADDITIONAL_CATEGORIES } from './AdditionalCategories';
@@ -41,7 +42,7 @@ import CATEGORY_OVERRIDES from './CategoryOverrides';
import PageHeader from './PageHeader';
interface Props {
- component?: T.Component;
+ component?: Component;
defaultCategory: string;
fetchSettings(component?: string): Promise<void>;
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx
index d868ed7ad30..3acbafbf1ca 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx
@@ -26,6 +26,7 @@ import { withRouter } from '../../../components/hoc/withRouter';
import { KeyboardCodes } from '../../../helpers/keycodes';
import { getSettingsAppAllDefinitions, Store } from '../../../store/rootReducer';
import { SettingCategoryDefinition } from '../../../types/settings';
+import { Component, Dict } from '../../../types/types';
import {
ADDITIONAL_PROJECT_SETTING_DEFINITIONS,
ADDITIONAL_SETTING_DEFINITIONS,
@@ -35,7 +36,7 @@ import SettingsSearchRenderer from './SettingsSearchRenderer';
interface Props {
className?: string;
- component?: T.Component;
+ component?: Component;
definitions: SettingCategoryDefinition[];
router: InjectedRouter;
}
@@ -50,7 +51,7 @@ interface State {
const DEBOUNCE_DELAY = 250;
export class SettingsSearch extends React.Component<Props, State> {
- definitionsByKey: T.Dict<SettingCategoryDefinition>;
+ definitionsByKey: Dict<SettingCategoryDefinition>;
index: LunrIndex;
state: State = {
searchQuery: '',
diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx
index f9d100058d3..ea2c8b29700 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx
@@ -26,11 +26,12 @@ import SearchBox from '../../../components/controls/SearchBox';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { scrollToElement } from '../../../helpers/scrolling';
import { SettingCategoryDefinition } from '../../../types/settings';
+import { Component } from '../../../types/types';
import { buildSettingLink, isRealSettingKey } from '../utils';
export interface SettingsSearchRendererProps {
className?: string;
- component?: T.Component;
+ component?: Component;
results?: SettingCategoryDefinition[];
searchQuery: string;
selectedResult?: string;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx
index be3b88a7c78..36cbd7fa95c 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx
@@ -23,13 +23,14 @@ import { Location, withRouter } from '../../../components/hoc/withRouter';
import { sanitizeStringRestricted } from '../../../helpers/sanitize';
import { scrollToElement } from '../../../helpers/scrolling';
import { SettingWithCategory } from '../../../types/settings';
+import { Component } from '../../../types/types';
import { getSubCategoryDescription, getSubCategoryName } from '../utils';
import DefinitionsList from './DefinitionsList';
import EmailForm from './EmailForm';
export interface SubCategoryDefinitionsListProps {
category: string;
- component?: T.Component;
+ component?: Component;
fetchValues: Function;
location: Location;
settings: Array<SettingWithCategory>;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx
index 043efedf2df..1f8537cf92f 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx
@@ -34,10 +34,11 @@ import {
AlmSettingsBindingStatus,
AlmSettingsBindingStatusType
} from '../../../../types/alm-settings';
+import { AppState, Dict } from '../../../../types/types';
import AlmIntegrationRenderer from './AlmIntegrationRenderer';
interface Props extends Pick<WithRouterProps, 'location' | 'router'> {
- appState: Pick<T.AppState, 'branchesEnabled' | 'multipleAlmEnabled'>;
+ appState: Pick<AppState, 'branchesEnabled' | 'multipleAlmEnabled'>;
}
export type AlmTabs = AlmKeys.Azure | AlmKeys.GitHub | AlmKeys.GitLab | AlmKeys.BitbucketServer;
@@ -46,7 +47,7 @@ interface State {
currentAlmTab: AlmTabs;
definitionKeyForDeletion?: string;
definitions: AlmSettingsBindingDefinitions;
- definitionStatus: T.Dict<AlmSettingsBindingStatus>;
+ definitionStatus: Dict<AlmSettingsBindingStatus>;
loadingAlmDefinitions: boolean;
loadingProjectCount: boolean;
projectCount?: number;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx
index 04bd555a4be..6f34fbfd50e 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx
@@ -26,6 +26,7 @@ import {
AlmSettingsBindingDefinitions,
AlmSettingsBindingStatus
} from '../../../../types/alm-settings';
+import { Dict } from '../../../../types/types';
import { AlmTabs } from './AlmIntegration';
import AlmTab from './AlmTab';
import DeleteModal from './DeleteModal';
@@ -35,7 +36,7 @@ export interface AlmIntegrationRendererProps {
currentAlmTab: AlmTabs;
definitionKeyForDeletion?: string;
definitions: AlmSettingsBindingDefinitions;
- definitionStatus: T.Dict<AlmSettingsBindingStatus>;
+ definitionStatus: Dict<AlmSettingsBindingStatus>;
loadingAlmDefinitions: boolean;
loadingProjectCount: boolean;
multipleAlmEnabled: boolean;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx
index 1dd264c83b7..364ab25d34d 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx
@@ -23,6 +23,7 @@ import {
AlmBindingDefinitionBase,
AlmSettingsBindingStatus
} from '../../../../types/alm-settings';
+import { Dict } from '../../../../types/types';
import { AlmTabs } from './AlmIntegration';
import AlmTabRenderer from './AlmTabRenderer';
@@ -30,7 +31,7 @@ interface Props {
almTab: AlmTabs;
branchesEnabled: boolean;
definitions: AlmBindingDefinition[];
- definitionStatus: T.Dict<AlmSettingsBindingStatus>;
+ definitionStatus: Dict<AlmSettingsBindingStatus>;
loadingAlmDefinitions: boolean;
loadingProjectCount: boolean;
multipleAlmEnabled: boolean;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
index 8712e292617..730133ef526 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
@@ -28,6 +28,7 @@ import {
AlmSettingsBindingStatus,
isBitbucketCloudBindingDefinition
} from '../../../../types/alm-settings';
+import { Dict } from '../../../../types/types';
import { ALM_INTEGRATION } from '../AdditionalCategoryKeys';
import CategoryDefinitionsList from '../CategoryDefinitionsList';
import AlmBindingDefinitionBox from './AlmBindingDefinitionBox';
@@ -38,7 +39,7 @@ import CreationTooltip from './CreationTooltip';
export interface AlmTabRendererProps {
almTab: AlmTabs;
branchesEnabled: boolean;
- definitionStatus: T.Dict<AlmSettingsBindingStatus>;
+ definitionStatus: Dict<AlmSettingsBindingStatus>;
editDefinition?: boolean;
editedDefinition?: AlmBindingDefinition;
definitions: AlmBindingDefinition[];
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx
index fc23742666c..87f93b38da3 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/CreationTooltip.tsx
@@ -25,10 +25,11 @@ import { getEdition, getEditionUrl } from '../../../../helpers/editions';
import { translate } from '../../../../helpers/l10n';
import { AlmKeys } from '../../../../types/alm-settings';
import { EditionKey } from '../../../../types/editions';
+import { AppState } from '../../../../types/types';
export interface CreationTooltipProps {
alm: AlmKeys;
- appState: T.AppState;
+ appState: AppState;
children: React.ReactElement<{}>;
preventCreation: boolean;
}
diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx
index ddd645f28a0..b46b54472e3 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx
@@ -31,11 +31,12 @@ import {
AlmSettingsInstance,
ProjectAlmBindingResponse
} from '../../../../types/alm-settings';
+import { Dict } from '../../../../types/types';
export interface AlmSpecificFormProps {
alm: AlmKeys;
instances: AlmSettingsInstance[];
- formData: T.Omit<ProjectAlmBindingResponse, 'alm'>;
+ formData: Omit<ProjectAlmBindingResponse, 'alm'>;
onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void;
monorepoEnabled: boolean;
}
@@ -47,7 +48,7 @@ interface LabelProps {
interface CommonFieldProps extends LabelProps {
help?: boolean;
- helpParams?: T.Dict<string | JSX.Element>;
+ helpParams?: Dict<string | JSX.Element>;
helpExample?: JSX.Element;
onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void;
propKey: keyof ProjectAlmBindingResponse;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx
index 6a3271221c1..7cbc4b356fc 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx
@@ -43,17 +43,18 @@ import {
} from '../../../../types/alm-settings';
import { EditionKey } from '../../../../types/editions';
import { Permissions } from '../../../../types/permissions';
+import { Component, CurrentUser } from '../../../../types/types';
import PRDecorationBindingRenderer from './PRDecorationBindingRenderer';
-type FormData = T.Omit<ProjectAlmBindingResponse, 'alm'>;
+type FormData = Omit<ProjectAlmBindingResponse, 'alm'>;
interface StateProps {
monorepoEnabled: boolean;
}
interface Props {
- component: T.Component;
- currentUser: T.CurrentUser;
+ component: Component;
+ currentUser: CurrentUser;
}
interface State {
@@ -71,7 +72,7 @@ interface State {
}
const REQUIRED_FIELDS_BY_ALM: {
- [almKey in AlmKeys]: Array<keyof T.Omit<FormData, 'key'>>;
+ [almKey in AlmKeys]: Array<keyof Omit<FormData, 'key'>>;
} = {
[AlmKeys.Azure]: ['repository', 'slug'],
[AlmKeys.BitbucketServer]: ['repository', 'slug'],
@@ -174,7 +175,7 @@ export class PRDecorationBinding extends React.PureComponent<Props & StateProps,
submitProjectAlmBinding(
alm: AlmKeys,
key: string,
- almSpecificFields?: T.Omit<FormData, 'key'>
+ almSpecificFields?: Omit<FormData, 'key'>
): Promise<void> {
const almSetting = key;
const project = this.props.component.key;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx
index 352cc27c1d6..2a440c25b26 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx
@@ -39,7 +39,7 @@ import { ALM_INTEGRATION } from '../AdditionalCategoryKeys';
import AlmSpecificForm from './AlmSpecificForm';
export interface PRDecorationBindingRendererProps {
- formData: T.Omit<ProjectAlmBindingResponse, 'alm'>;
+ formData: Omit<ProjectAlmBindingResponse, 'alm'>;
instances: AlmSettingsInstance[];
isChanged: boolean;
isConfigured: boolean;
diff --git a/server/sonar-web/src/main/js/apps/settings/store/definitions.ts b/server/sonar-web/src/main/js/apps/settings/store/definitions.ts
index 8e1af16c1db..729640cfac4 100644
--- a/server/sonar-web/src/main/js/apps/settings/store/definitions.ts
+++ b/server/sonar-web/src/main/js/apps/settings/store/definitions.ts
@@ -20,6 +20,7 @@
import { keyBy, sortBy, uniqBy } from 'lodash';
import { ActionType } from '../../../store/utils/actions';
import { SettingCategoryDefinition } from '../../../types/settings';
+import { Dict } from '../../../types/types';
import { DEFAULT_CATEGORY, getCategoryName } from '../utils';
const enum Actions {
@@ -28,7 +29,7 @@ const enum Actions {
type Action = ActionType<typeof receiveDefinitions, Actions.ReceiveDefinitions>;
-export type State = T.Dict<SettingCategoryDefinition>;
+export type State = Dict<SettingCategoryDefinition>;
export function receiveDefinitions(definitions: SettingCategoryDefinition[]) {
return { type: Actions.ReceiveDefinitions, definitions };
diff --git a/server/sonar-web/src/main/js/apps/settings/store/settingsPage.ts b/server/sonar-web/src/main/js/apps/settings/store/settingsPage.ts
index 43797087936..045b7647f02 100644
--- a/server/sonar-web/src/main/js/apps/settings/store/settingsPage.ts
+++ b/server/sonar-web/src/main/js/apps/settings/store/settingsPage.ts
@@ -20,6 +20,7 @@
import { omit } from 'lodash';
import { combineReducers } from 'redux';
import { ActionType } from '../../../store/utils/actions';
+import { Dict } from '../../../types/types';
const enum Actions {
CancelChange = 'settingsPage/CANCEL_CHANGE',
@@ -39,9 +40,9 @@ type Action =
| ActionType<typeof stopLoading, Actions.StopLoading>;
export interface State {
- changedValues: T.Dict<any>;
- loading: T.Dict<boolean>;
- validationMessages: T.Dict<string>;
+ changedValues: Dict<any>;
+ loading: Dict<boolean>;
+ validationMessages: Dict<string>;
}
export function cancelChange(key: string) {
diff --git a/server/sonar-web/src/main/js/apps/settings/store/values.ts b/server/sonar-web/src/main/js/apps/settings/store/values.ts
index 1146d12b359..f421230d705 100644
--- a/server/sonar-web/src/main/js/apps/settings/store/values.ts
+++ b/server/sonar-web/src/main/js/apps/settings/store/values.ts
@@ -22,6 +22,7 @@ import { combineReducers } from 'redux';
import { Action as AppStateAction, Actions as AppStateActions } from '../../../store/appState';
import { ActionType } from '../../../store/utils/actions';
import { SettingValue } from '../../../types/settings';
+import { Dict } from '../../../types/types';
enum Actions {
receiveValues = 'RECEIVE_VALUES'
@@ -29,10 +30,10 @@ enum Actions {
type Action = ActionType<typeof receiveValues, Actions.receiveValues>;
-type SettingsState = T.Dict<SettingValue>;
+type SettingsState = Dict<SettingValue>;
export interface State {
- components: T.Dict<SettingsState>;
+ components: Dict<SettingsState>;
global: SettingsState;
}
diff --git a/server/sonar-web/src/main/js/apps/settings/utils.ts b/server/sonar-web/src/main/js/apps/settings/utils.ts
index dcb442a7570..ba23c0f1d08 100644
--- a/server/sonar-web/src/main/js/apps/settings/utils.ts
+++ b/server/sonar-web/src/main/js/apps/settings/utils.ts
@@ -22,6 +22,7 @@ import { hasMessage, translate } from '../../helpers/l10n';
import { getGlobalSettingsUrl, getProjectSettingsUrl } from '../../helpers/urls';
import { AlmKeys } from '../../types/alm-settings';
import { Setting, SettingCategoryDefinition, SettingDefinition } from '../../types/settings';
+import { Component, Dict } from '../../types/types';
export const DEFAULT_CATEGORY = 'general';
@@ -108,7 +109,7 @@ export function getEmptyValue(item: SettingDefinition | SettingCategoryDefinitio
}
if (item.type === 'PROPERTY_SET') {
- const value: T.Dict<string> = {};
+ const value: Dict<string> = {};
item.fields.forEach(field => (value[field.key] = getEmptyValue(field)));
return [value];
}
@@ -170,7 +171,7 @@ export function isRealSettingKey(key: string) {
export function buildSettingLink(
definition: SettingCategoryDefinition,
- component?: T.Component
+ component?: Component
): LocationDescriptor {
const { category, key } = definition;
@@ -181,7 +182,7 @@ export function buildSettingLink(
};
}
- const query: T.Dict<string> = {};
+ const query: Dict<string> = {};
if (key.startsWith('sonar.auth.gitlab')) {
query.alm = 'gitlab';
d/openapi-extractor-1.3.0 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/apps/user_webdavauth/settings.php
blob: ae9cb7e4c921074524c6213ad533ad28d7a09fb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

/**
 * ownCloud - user_webdavauth
 *
 * @author Frank Karlitschek
 * @copyright 2012 Frank Karlitschek frank@owncloud.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

OC_Util::checkAdminUser();

if($_POST) {
	// CSRF check
	OCP\JSON::callCheck();

	if(isset($_POST['webdav_url'])) {
		OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url']));
	}
}

// fill template
$tmpl = new OC_Template( 'user_webdavauth', 'settings');
$tmpl->assign( 'webdav_url', OC_Config::getValue( "user_webdavauth_url" ));

return $tmpl->fetchPage();