catalog-model: deprecate ENTITY_DEFAULT_NAMESPACE, replace with DEFAULT_NAMESPACE
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -27,10 +27,7 @@ import {
|
||||
identityApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { Progress, Link } from '@backstage/core-components';
|
||||
import {
|
||||
ENTITY_DEFAULT_NAMESPACE,
|
||||
parseEntityRef,
|
||||
} from '@backstage/catalog-model';
|
||||
import { DEFAULT_NAMESPACE, parseEntityRef } from '@backstage/catalog-model';
|
||||
|
||||
export const IncidentActionsMenu = ({
|
||||
incident,
|
||||
@@ -71,7 +68,7 @@ export const IncidentActionsMenu = ({
|
||||
const { userEntityRef } = await identityApi.getBackstageIdentity();
|
||||
const { name: userName } = parseEntityRef(userEntityRef, {
|
||||
defaultKind: 'User',
|
||||
defaultNamespace: ENTITY_DEFAULT_NAMESPACE,
|
||||
defaultNamespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
const newIncident = await ilertApi.acceptIncident(incident, userName);
|
||||
alertApi.post({ message: 'Incident accepted.' });
|
||||
@@ -91,7 +88,7 @@ export const IncidentActionsMenu = ({
|
||||
const { userEntityRef } = await identityApi.getBackstageIdentity();
|
||||
const { name: userName } = parseEntityRef(userEntityRef, {
|
||||
defaultKind: 'User',
|
||||
defaultNamespace: ENTITY_DEFAULT_NAMESPACE,
|
||||
defaultNamespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
const newIncident = await ilertApi.resolveIncident(incident, userName);
|
||||
alertApi.post({ message: 'Incident resolved.' });
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
ENTITY_DEFAULT_NAMESPACE,
|
||||
parseEntityRef,
|
||||
} from '@backstage/catalog-model';
|
||||
import { DEFAULT_NAMESPACE, parseEntityRef } from '@backstage/catalog-model';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import Alert from '@material-ui/lab/Alert';
|
||||
import Button from '@material-ui/core/Button';
|
||||
@@ -108,7 +105,7 @@ export const IncidentNewModal = ({
|
||||
const { userEntityRef } = await identityApi.getBackstageIdentity();
|
||||
const { name: userName } = parseEntityRef(userEntityRef, {
|
||||
defaultKind: 'User',
|
||||
defaultNamespace: ENTITY_DEFAULT_NAMESPACE,
|
||||
defaultNamespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
await ilertApi.createIncident({
|
||||
integrationKey,
|
||||
|
||||
Reference in New Issue
Block a user