fix incident state

This commit is contained in:
Simon Larsen 2022-08-19 20:47:56 +01:00
parent 144549f440
commit 4544d05363
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
72 changed files with 392 additions and 295 deletions

View File

@ -20,9 +20,9 @@
"greenlock",
"oneuptime"
],
"author": "HackerBay, Inc. <hello@hackerbay.io>",
"author": "OneUptime Limited. <hello@oneuptime.com>",
"contributors": [
"HackerBay, Inc. <hello@hackerbay.io>"
"OneUptime Limited. <hello@oneuptime.com>"
],
"license": "MIT",
"devDependencies": {

View File

@ -7,7 +7,7 @@
"type": "git",
"url": "git+https://github.com/OneUptime/ApiDocs.git"
},
"author": "HackerBay, Inc.",
"author": "OneUptime Limited.",
"license": "MIT",
"bugs": {
"url": "https://github.com/oneuptime/ApiDocs/issues"

View File

@ -112,9 +112,9 @@
<p>
{
"smtpswitch": true,
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true
@ -134,9 +134,9 @@
<p>
{
"_id": "5e1a154c1a4dae1373eeeca2",
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true,
@ -223,9 +223,9 @@
<p>
{
"_id": "5e1a154c1a4dae1373eeeca2",
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true,
@ -344,9 +344,9 @@
<p>
{
"smtpswitch": true,
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true
@ -366,9 +366,9 @@
<p>
{
"_id": "5e1a154c1a4dae1373eeeca2",
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true,
@ -470,9 +470,9 @@
<p>
{
"_id": "5e1a154c1a4dae1373eeeca2",
"user": "nawazdhandala@hackerbay.io",
"user": "nawazdhandala@oneuptime.com",
"pass": "nawazdhandala",
"host": "mail.hackerbay.io",
"host": "mail.oneuptime.com",
"from": "noreply@oneuptime.com",
"port": "587",
"secure": true,

View File

@ -189,8 +189,8 @@
{
"userDetails": {
"method": "email",
"email": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@hackerbay.io"
"email": "nawazdhandala@oneuptime.com",
"contactEmail": "nawazdhandala@oneuptime.com"
},
"monitors": [
"5e08a21b25c59a1c8033c7e7"
@ -222,7 +222,7 @@
},
"statusPageId": "5e1b877a41127144f8144b9d",
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null
@ -397,8 +397,8 @@
<p>
{
"alertVia": "email",
"email": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@hackerbay.io"
"email": "nawazdhandala@oneuptime.com",
"contactEmail": "nawazdhandala@oneuptime.com"
}
</p>
</code>
@ -426,7 +426,7 @@
},
"statusPageId": null,
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null,
@ -556,7 +556,7 @@
},
"statusPageId": null,
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null
@ -708,7 +708,7 @@
},
"statusPageId": null,
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null
@ -819,7 +819,7 @@
},
"statusPageId": null,
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null,
@ -920,7 +920,7 @@
"monitorId": "5e08a21b25c59a1c8033c7e7",
"statusPageId": null,
"alertVia": "email",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"countryCode": null,
"contactWebhook": null,

View File

@ -277,7 +277,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -297,7 +297,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -317,7 +317,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -337,7 +337,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -357,7 +357,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -512,7 +512,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},
@ -532,7 +532,7 @@
},
"subscriberId": {
"_id": "5e0f2e717f3127159be72c9f",
"contactEmail": "nawazdhandala@hackerbay.io",
"contactEmail": "nawazdhandala@oneuptime.com",
"contactPhone": null,
"contactWebhook": null
},

View File

@ -154,7 +154,7 @@
},
{
"userId": "5e089f88b400211639928c92",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"name": "Nawaz Dhandala",
"role": "Administrator",
"lastActive": "2020-01-12T20:20:02.051Z"
@ -245,7 +245,7 @@
},
{
"userId": "5e089f88b400211639928c92",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"name": "Nawaz Dhandala",
"role": "Owner",
"lastActive": "2020-01-12T19:45:29.603Z"
@ -336,7 +336,7 @@
},
{
"userId": "5e089f88b400211639928c92",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"name": "Nawaz Dhandala",
"role": "Owner",
"lastActive": "2020-01-12T19:46:44.316Z"
@ -437,7 +437,7 @@
{
"id": "5e089f88b400211639928c92",
"name": "Nawaz Dhandala",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"companyName": "Hackerbay",
"companyRole": null,
"companySize": null,
@ -558,7 +558,7 @@
},
{
"userId": "5e089f88b400211639928c92",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"name": "Nawaz Dhandala",
"role": "Administrator",
"lastActive": "2020-01-12T20:22:45.095Z"
@ -701,7 +701,7 @@
},
{
"userId": "5e089f88b400211639928c92",
"email": "nawazdhandala@hackerbay.io",
"email": "nawazdhandala@oneuptime.com",
"name": "Nawaz Dhandala",
"role": "Member",
"lastActive": "2020-01-12T19:51:34.323Z"

View File

@ -11,7 +11,7 @@
"audit": "npm audit --audit-level=low",
"dep-check": "depcheck ./ --skip-missing=true"
},
"author": "HackerBay, Inc.",
"author": "OneUptime Limited.",
"license": "MIT",
"devDependencies": {
"depcheck": "^1.4.3",

View File

@ -17,7 +17,7 @@ test_backend:
- sudo docker run --name mongo -p 27017:27017 -d mongo:4.2.3
- sudo docker run --name redis -p 6379:6379 -d redis:7.0.3 redis-server
- sudo docker run --name realtime --env-file ./realtime/.env -e PORT=3300 --net=host -d oneuptime/realtime:latest
- sudo docker run --name=samlIdp -p 9876:8080 -p 8443:8443 -e SIMPLESAMLPHP_SP_ENTITY_ID=hackerbay.io -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:3002/api/user/sso/callback -e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp -v $PWD/saml/users.php:/var/www/simplesamlphp/config/authsources.php -d kristophjunge/test-saml-idp
- sudo docker run --name=samlIdp -p 9876:8080 -p 8443:8443 -e SIMPLESAMLPHP_SP_ENTITY_ID=oneuptime.com -e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:3002/api/user/sso/callback -e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp -v $PWD/saml/users.php:/var/www/simplesamlphp/config/authsources.php -d kristophjunge/test-saml-idp
- sudo docker build -t oneuptime/InitScript:4.0.$CI_PIPELINE_ID ./InitScript
- sudo docker run -e NODE_ENV=development -e IS_SAAS_SERVICE=true -e IS_TESTING=true --net=host -d oneuptime/InitScript:4.0.$CI_PIPELINE_ID
- sudo docker build -t oneuptime/probe:4.0.$CI_PIPELINE_ID ./probe

View File

@ -104,7 +104,7 @@ export default class UserMiddleware {
if (tenantId) {
// get project level permissions if projectid exists in request.
debugger;
let userProjectAccessPermission: UserProjectAccessPermission | null =
await AccessTokenService.getUserProjectAccessPermission(
oneuptimeRequest.userAuthorization.userId,

View File

@ -473,7 +473,7 @@ class DatabaseService<TBaseModel extends BaseModel> {
existingItemsWithSameNameCount = (
await this.countBy({
query: {
[key]: QueryHelper.findWithSameName(
[key]: QueryHelper.findWithSameText(
(createBy.data as any)[key]
? ((createBy.data as any)[key]! as string)
: ''
@ -580,8 +580,9 @@ class DatabaseService<TBaseModel extends BaseModel> {
modelPermissions
)
) {
debugger;
throw new NotAuthorizedException(
`You do not have permissions to ${type} record of type ${
`You do not have permissions to ${type} ${
this.model.singularName
}. You need one of these permissions: ${PermissionHelper.getPermissionTitles(
modelPermissions

View File

@ -25,7 +25,7 @@ export class Service extends DatabaseService<Model> {
return item.toString();
}
) || [],
name: QueryHelper.findWithSameName(createBy.data.name!),
name: QueryHelper.findWithSameText(createBy.data.name!),
projectId: createBy.props.tenantId!,
},
props: {

View File

@ -50,7 +50,7 @@ export class Service extends DatabaseService<Model> {
return item.toString();
}
) || [],
name: QueryHelper.findWithSameName(data.data.name!),
name: QueryHelper.findWithSameText(data.data.name!),
},
props: {
isRoot: true,
@ -98,7 +98,6 @@ export class Service extends DatabaseService<Model> {
createdIncidentState.projectId = createdItem.id!;
createdIncidentState.order = 1;
createdIncidentState = await IncidentStateService.create({
data: createdIncidentState,
props: {

View File

@ -1,17 +1,24 @@
import ObjectID from 'Common/Types/ObjectID';
import { FindOperator, Raw } from 'typeorm';
import Text from 'Common/Types/Text';
import Typeof from 'Common/Types/Typeof';
export default class QueryHelper {
public static findWithSameName(name: string): FindOperator<any> {
name = name.toLowerCase().trim();
public static findWithSameText(text: string | number): FindOperator<any> {
let isString = false;
if (typeof text === Typeof.String) {
text = (text as string).toLowerCase().trim();
isString = true;
}
const rid: string = Text.generateRandomText(10);
return Raw(
(alias: string) => {
return `LOWER(${alias}) = :${rid}`;
return isString ? `LOWER(${alias}) = :${rid}`: `${alias} = :${rid}`;
},
{
[rid]: `${name}`,
[rid]: `${text}`,
}
);
}

View File

@ -87,6 +87,8 @@ export interface ComponentProps<TBaseModel extends BaseModel> {
onBeforeEdit?: ((item: TBaseModel) => Promise<TBaseModel>) | undefined;
onBeforeDelete?: ((item: TBaseModel) => Promise<TBaseModel>) | undefined;
onBeforeView?: ((item: TBaseModel) => Promise<TBaseModel>) | undefined;
sortBy?: string | undefined;
sortOrder?: SortOrder | undefined
orderedStatesListProps?: {
titleField: string;
descriptionField?: string | undefined;
@ -102,9 +104,11 @@ enum ModalType {
const ModelTable: Function = <TBaseModel extends BaseModel>(
props: ComponentProps<TBaseModel>
): ReactElement => {
let showTableAs = props.showTableAs;
if (!props.showTableAs) {
props.showTableAs = ShowTableAs.Table;
if (!showTableAs) {
showTableAs = ShowTableAs.Table;
}
@ -128,8 +132,8 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
const [showModel, setShowModal] = useState<boolean>(false);
const [showTableFilter, setShowTableFilter] = useState<boolean>(false);
const [modalType, setModalType] = useState<ModalType>(ModalType.Create);
const [sortBy, setSortBy] = useState<string>('');
const [sortOrder, setSortOrder] = useState<SortOrder>(SortOrder.Ascending);
const [sortBy, setSortBy] = useState<string>(props.sortBy || '');
const [sortOrder, setSortOrder] = useState<SortOrder>(props.sortOrder || SortOrder.Ascending);
const [showDeleteConfirmModal, setShowDeleteConfirmModal] =
useState<boolean>(false);
const [currentEditableItem, setCurrentEditableItem] =
@ -245,7 +249,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
_id: true,
};
for (const column of props.columns) {
for (const column of props.columns || []) {
const key: string | null = column.field
? (Object.keys(column.field)[0] as string)
: null;
@ -269,7 +273,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
const getPopulate: Function = (): Populate<TBaseModel> => {
const populate: Populate<TBaseModel> = {};
for (const column of props.columns) {
for (const column of props.columns || []) {
const key: string | null = column.field
? (Object.keys(column.field)[0] as string)
: null;
@ -299,7 +303,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
);
// because ordered list add button is inside the table and not on the card header.
if (props.isCreateable && hasPermissionToCreate && props.showTableAs !== ShowTableAs.OrderedStatesList) {
if (props.isCreateable && hasPermissionToCreate && showTableAs !== ShowTableAs.OrderedStatesList) {
headerbuttons.push({
title: `${props.createVerb || 'Create'} ${props.singularName || model.singularName
}`,
@ -391,7 +395,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
const accessControl: Dictionary<ColumnAccessControl> =
model.getColumnAccessControlForAllColumns();
for (const column of props.columns) {
for (const column of props.columns || []) {
const key: string | null = column.field
? (Object.keys(column.field)[0] as string)
: null;
@ -661,9 +665,24 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
const getOrderedStatesList: Function = (): ReactElement => {
if (!props.orderedStatesListProps) {
throw new BadDataException("props.orderedStatesListProps required when props.showTableAs === ShowTableAs.OrderedStatesList")
throw new BadDataException("props.orderedStatesListProps required when showTableAs === ShowTableAs.OrderedStatesList")
}
let getTitleElement: ((item: JSONObject) => ReactElement) | undefined = undefined;
let getDescriptionElement: ((item: JSONObject) => ReactElement) | undefined = undefined;
for (const column of props.columns) {
const key = Object.keys(column.field as Object)[0];
if (key === props.orderedStatesListProps.titleField) {
getTitleElement = column.getColumnElement;
}
if (key === props.orderedStatesListProps.descriptionField) {
getDescriptionElement = column.getColumnElement;
}
}
return (
<OrderedStatesList
error={error}
@ -687,6 +706,8 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
}
pluralLabel={props.pluralName || model.pluralName || 'Items'}
actionButtons={actionButtonSchema}
getTitleElement={getTitleElement}
getDescriptionElement={getDescriptionElement}
/>
);
};
@ -725,7 +746,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
};
const getCardComponent: Function = (): ReactElement => {
if (props.showTableAs === ShowTableAs.List) {
if (showTableAs === ShowTableAs.List) {
return (
<div>
{props.cardProps && (
@ -741,7 +762,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
{!props.cardProps && getList()}
</div>
);
} else if (props.showTableAs === ShowTableAs.Table) {
} else if (showTableAs === ShowTableAs.Table) {
return (
<div>
{props.cardProps && (
@ -808,7 +829,7 @@ const ModelTable: Function = <TBaseModel extends BaseModel>(
}}
onBeforeCreate={async (item: TBaseModel) => {
if (props.showTableAs === ShowTableAs.OrderedStatesList && props.orderedStatesListProps?.orderField && orderedStatesListNewItemOrder) {
if (showTableAs === ShowTableAs.OrderedStatesList && props.orderedStatesListProps?.orderField && orderedStatesListNewItemOrder) {
item.setColumnValue(props.orderedStatesListProps.orderField, orderedStatesListNewItemOrder);
}

View File

@ -9,6 +9,8 @@ export interface ComponentProps {
actionButtons?: undefined | Array<ActionButtonSchema>;
titleField: string;
descriptionField?: string | undefined;
getTitleElement?: ((item: JSONObject) => ReactElement) | undefined;
getDescriptionElement?: ((item: JSONObject) => ReactElement) | undefined;
}
const Item: FunctionComponent<ComponentProps> = (
@ -24,7 +26,7 @@ const Item: FunctionComponent<ComponentProps> = (
const [error, setError] = useState<string>('');
return (
<div>
<div className='ordered-list-item'>
{error && (
<ConfirmModal
title={`Error`}
@ -35,9 +37,14 @@ const Item: FunctionComponent<ComponentProps> = (
}}
/>
)}
<div>{props.item[props.titleField] ? props.item[props.titleField] as string : '' }</div>
<div>{props.descriptionField && props.item[props.descriptionField] ? props.item[props.descriptionField] as string : ''}</div>
<div>
{!props.getTitleElement && <div>{props.item[props.titleField] ? props.item[props.titleField] as string : ''}</div>}
{props.getTitleElement && <div>{props.getTitleElement(props.item)}</div>}
<div className='margin-10'>
{props.getDescriptionElement && <div>{props.getDescriptionElement(props.item)}</div>}
{!props.getDescriptionElement && <div>{props.descriptionField && props.item[props.descriptionField] ? props.item[props.descriptionField] as string : ''}</div>}
</div>
<div className='margin-10'>
{props.actionButtons?.map(
(button: ActionButtonSchema, i: number) => {
return (

View File

@ -3,7 +3,7 @@ import React, { FunctionComponent, ReactElement } from 'react';
import ActionButtonSchema from '../ActionButton/ActionButtonSchema';
import ComponentLoader from '../ComponentLoader/ComponentLoader';
import ErrorMessage from '../ErrorMessage/ErrorMessage';
import Icon, { IconProp } from '../Icon/Icon';
import Icon, { IconProp, SizeProp, ThickProp } from '../Icon/Icon';
import Item from './Item';
export interface ComponentProps {
@ -17,9 +17,11 @@ export interface ComponentProps {
pluralLabel: string;
id?: string;
actionButtons?: undefined | Array<ActionButtonSchema>;
titleField: string;
titleField: string;
descriptionField?: string | undefined;
orderField: string;
getTitleElement?: ((item: JSONObject) => ReactElement) | undefined;
getDescriptionElement?: ((item: JSONObject) => ReactElement) | undefined;
}
const OrderedStatesList: FunctionComponent<ComponentProps> = (
@ -55,8 +57,7 @@ const OrderedStatesList: FunctionComponent<ComponentProps> = (
}
return (
<div>
<div className='margin-30'>
{props.error && <p>{props.error}</p>}
{!props.error && props.data &&
props.data.length > 0 &&
@ -68,16 +69,22 @@ const OrderedStatesList: FunctionComponent<ComponentProps> = (
titleField={props.titleField}
descriptionField={props.descriptionField}
actionButtons={props.actionButtons}
getTitleElement={props.getTitleElement}
getDescriptionElement={props.getDescriptionElement}
/>
<div className="vertical-list"></div>
<div className="vertical-list text-center margin-30">
<Icon icon={IconProp.ChevronDown} thick={ThickProp.Thick} size={SizeProp.Larger} />
</div>
{props.onCreateNewItem && (
<div>
<div className='poointer' onClick={() => {
<div className='pointer ordered-list-item ordered-list-item-add-button background-very-light-grey-on-hover' onClick={() => {
props.onCreateNewItem && props.onCreateNewItem(item[props.orderField] ? (item[props.orderField] as number + 1) : 0);
}}>
<Icon icon={IconProp.Add} /> Add Item
<div className="flex text-center "><Icon icon={IconProp.Add} thick={ThickProp.Thick} className="margin-side-5" /> Add New Item</div>
</div>
<div className="vertical-list"></div>
{(i+1) < props.data.length && <div className="vertical-list text-center margin-30">
<Icon icon={IconProp.ChevronDown} thick={ThickProp.Thick} size={SizeProp.Larger} />
</div>}
</div>
)}
</div>

View File

@ -83,6 +83,12 @@
margin: 5px
}
.margin-side-5{
margin-left: 5px;
margin-right: 5px
}
.margin-50{
margin: 50px
@ -173,6 +179,10 @@
padding-left: 10px;
}
.margin-30{
margin: 30px;
}
.width-max {
width: 100% !important;
}
@ -234,4 +244,24 @@
.text-align-left{
text-align: left;
}
//// Ordered List
.ordered-list-item{
border-style: solid;
margin: auto;
text-align: center;
width: 400px;
padding: 20px;
border-width: 1px;
border-radius: 10px;
border-color: $color-lighter-grey;
}
.ordered-list-item-add-button{
border-style: dashed;
border-radius: 500px;
width: 300px;
}

View File

@ -11,7 +11,7 @@
"audit": "npm audit --audit-level=low",
"dep-check": "depcheck ./ --skip-missing=true"
},
"author": "HackerBay, Inc.",
"author": "OneUptime Limited.",
"license": "MIT",
"type": "module",
"dependencies": {

View File

@ -5,16 +5,18 @@ import PageMap from '../../Utils/PageMap';
import RouteMap from '../../Utils/RouteMap';
import PageComponentProps from '../PageComponentProps';
import DashboardSideMenu from './SideMenu';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import Label from 'Model/Models/Label';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import ModelTable, { ShowTableAs } from 'CommonUI/src/Components/ModelTable/ModelTable';
import IncidentState from 'Model/Models/IncidentState';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import { JSONObject } from 'Common/Types/JSON';
import Pill from 'CommonUI/src/Components/Pill/Pill';
import Color from 'Common/Types/Color';
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
import SortOrder from 'Common/Types/Database/SortOrder';
import BadDataException from 'Common/Types/Exception/BadDataException';
const IncidentState: FunctionComponent<PageComponentProps> = (
const IncidentsPage: FunctionComponent<PageComponentProps> = (
props: PageComponentProps
): ReactElement => {
return (
@ -30,62 +32,42 @@ const IncidentState: FunctionComponent<PageComponentProps> = (
to: RouteMap[PageMap.SETTINGS] as Route,
},
{
title: 'Labels',
to: RouteMap[PageMap.SETTINGS_LABELS] as Route,
title: 'Incidents',
to: RouteMap[PageMap.SETTINGS_INCIDENTS] as Route,
},
]}
sideMenu={<DashboardSideMenu />}
>
<ModelTable<Label>
modelType={Label}
id="labels-table"
<ModelTable<IncidentState>
modelType={IncidentState}
id="incident-state-table"
isDeleteable={true}
isEditable={true}
isCreateable={true}
cardProps={{
icon: IconProp.Label,
title: 'Labels',
icon: IconProp.Alert,
title: 'Incident State',
description:
'Labels help you categorize resources in your project and give granular permissions to access those resources to team members.',
'Incidents have multiple states like - created, acknowledged and resolved. You can more states help you manage incidents here.',
}}
sortBy="order"
sortOrder={SortOrder.Ascending}
onBeforeDelete={(item: IncidentState) => {
if (item.isCreatedState) {
throw new BadDataException("This incident cannot be deleted because its the created incident state of for this project. Created, Acknowledged, Resolved incident states cannot be deleted.");
}
if (item.isAcknowledgedState) {
throw new BadDataException("This incident cannot be deleted because its the acknowledged incident state of for this project. Created, Acknowledged, Resolved incident states cannot be deleted.");
}
if (item.isResolvedState) {
throw new BadDataException("This incident cannot be deleted because its the resolved incident state of for this project. Created, Acknowledged, Resolved incident states cannot be deleted.");
}
return item;
}}
noItemsMessage={'No labels created for this project so far.'}
currentPageRoute={props.pageRoute}
formFields={[
{
field: {
name: true,
},
title: 'Name',
fieldType: FormFieldSchemaType.Text,
required: true,
placeholder: 'internal-service',
validation: {
noSpaces: true,
minLength: 2,
},
},
{
field: {
description: true,
},
title: 'Description',
fieldType: FormFieldSchemaType.LongText,
required: true,
placeholder:
'This label is for all the internal services.',
},
{
field: {
color: true,
},
title: 'Label Color',
fieldType: FormFieldSchemaType.Color,
required: true,
placeholder: 'Please select color for this label.',
},
]}
showRefreshButton={true}
showFilterButton={true}
columns={[
{
field: {
@ -93,9 +75,11 @@ const IncidentState: FunctionComponent<PageComponentProps> = (
},
title: 'Name',
type: FieldType.Text,
isFilterable: true,
moreFields: {
color: true,
isCreatedState: true,
isAcknowledgedState: true,
isResolvedState: true
},
getColumnElement: (item: JSONObject): ReactElement => {
return (
@ -112,12 +96,53 @@ const IncidentState: FunctionComponent<PageComponentProps> = (
},
title: 'Description',
type: FieldType.Text,
isFilterable: true,
},
]}
noItemsMessage={'No incident state created for this project so far.'}
currentPageRoute={props.pageRoute}
formFields={[
{
field: {
name: true,
},
title: 'Name',
fieldType: FormFieldSchemaType.Text,
required: true,
placeholder: 'Investigating',
validation: {
minLength: 2,
},
},
{
field: {
description: true,
},
title: 'Description',
fieldType: FormFieldSchemaType.LongText,
required: true,
placeholder:
'This incident state happens when the incident is investigated',
},
{
field: {
color: true,
},
title: 'Color',
fieldType: FormFieldSchemaType.Color,
required: true,
placeholder: 'Please select color for this incident state.',
},
]}
showRefreshButton={true}
showTableAs={ShowTableAs.OrderedStatesList}
orderedStatesListProps={{
titleField: "name",
descriptionField: "description",
orderField: "order"
}}
/>
</Page>
);
};
export default IncidentState;
export default IncidentsPage;

View File

@ -17,9 +17,9 @@
"ssl",
"oneuptime"
],
"author": "HackerBay, Inc. <hello@hackerbay.io>",
"author": "OneUptime Limited. <hello@oneuptime.com>",
"contributors": [
"HackerBay, Inc. <hello@hackerbay.io>"
"OneUptime Limited. <hello@oneuptime.com>"
],
"license": "MIT",
"type": "module",

View File

@ -1,4 +1,4 @@
Copyright (c) 2021 HACKERBAY (https://hackerbay.io) and individual contributors.
Copyright (c) 2021 HACKERBAY (https://oneuptime.com) and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -141,7 +141,7 @@ CaptureMessage("Dang! Error Again")
Main API to send logs to the server.
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime SDK](#oneuptime-sdk)
- [Installation](#installation)

View File

@ -100,7 +100,7 @@ brew install swaks
# Test
swaks --to jude@hackerbay.io --from support@oneuptime.com --server localhost \
swaks --to jude@oneuptime.com --from support@oneuptime.com --server localhost \
--port 2525 --auth-user user@oneuptime.com --auth-password oneuptime
```

View File

@ -1,8 +1,8 @@
End-User License Agreement (EULA) of OneUptime
This End-User License Agreement ("EULA") is a legal agreement between you and HackerBay, Inc.
This End-User License Agreement ("EULA") is a legal agreement between you and OneUptime Limited.
This EULA agreement governs your acquisition and use of our OneUptime software ("Software") directly from HackerBay, Inc. or indirectly through a HackerBay, Inc. authorized reseller or distributor (a "Reseller").
This EULA agreement governs your acquisition and use of our OneUptime software ("Software") directly from OneUptime Limited. or indirectly through a OneUptime Limited. authorized reseller or distributor (a "Reseller").
Please read this EULA agreement carefully before completing the installation process and using the OneUptime software. It provides a license to use the OneUptime software and contains warranty information and liability disclaimers.
@ -10,10 +10,10 @@ If you register for a free trial of the OneUptime software, this EULA agreement
If you are entering into this EULA agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity and its affiliates to these terms and conditions. If you do not have such authority or if you do not agree with the terms and conditions of this EULA agreement, do not install or use the Software, and you must not accept this EULA agreement.
This EULA agreement shall apply only to the Software supplied by HackerBay, Inc. herewith regardless of whether other software is referred to or described herein. The terms also apply to any HackerBay, Inc. updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply. This EULA was created by EULA Template for OneUptime.
This EULA agreement shall apply only to the Software supplied by OneUptime Limited. herewith regardless of whether other software is referred to or described herein. The terms also apply to any OneUptime Limited. updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply. This EULA was created by EULA Template for OneUptime.
License Grant
HackerBay, Inc. hereby grants you a personal, non-transferable, non-exclusive licence to use the OneUptime software on your devices in accordance with the terms of this EULA agreement.
OneUptime Limited. hereby grants you a personal, non-transferable, non-exclusive licence to use the OneUptime software on your devices in accordance with the terms of this EULA agreement.
You are permitted to load the OneUptime software under your control. You are responsible for ensuring your device meets the minimum requirements of the OneUptime software.
@ -23,20 +23,20 @@ Edit, alter, modify, adapt, translate or otherwise change the whole or any part
Reproduce, copy, distribute, resell or otherwise use the Software for any commercial purpose
Allow any third party to use the Software on behalf of or for the benefit of any third party
Use the Software in any way which breaches any applicable local, national or international law
use the Software for any purpose that HackerBay, Inc. considers is a breach of this EULA agreement
use the Software for any purpose that OneUptime Limited. considers is a breach of this EULA agreement
Intellectual Property and Ownership
HackerBay, Inc. shall at all times retain ownership of the Software as originally downloaded by you and all subsequent downloads of the Software by you. The Software (and the copyright, and other intellectual property rights of whatever nature in the Software, including any modifications made thereto) are and shall remain the property of HackerBay, Inc..
OneUptime Limited. shall at all times retain ownership of the Software as originally downloaded by you and all subsequent downloads of the Software by you. The Software (and the copyright, and other intellectual property rights of whatever nature in the Software, including any modifications made thereto) are and shall remain the property of OneUptime Limited..
HackerBay, Inc. reserves the right to grant licences to use the Software to third parties.
OneUptime Limited. reserves the right to grant licences to use the Software to third parties.
Termination
This EULA agreement is effective from the date you first use the Software and shall continue until terminated. You may terminate it at any time upon written notice to HackerBay, Inc..
This EULA agreement is effective from the date you first use the Software and shall continue until terminated. You may terminate it at any time upon written notice to OneUptime Limited..
It will also terminate immediately if you fail to comply with any term of this EULA agreement. Upon such termination, the licenses granted by this EULA agreement will immediately terminate and you agree to stop all access and use of the Software. The provisions that by their nature continue and survive will survive any termination of this EULA agreement.
Governing Law
This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of us.
Copyright (C) HackerBay, Inc - All Rights Reserved
Copyright (C) OneUptime Limited - All Rights Reserved
Unauthorized copying of this project, via any medium is strictly prohibited
This project is proprietary and confidential

View File

@ -150,7 +150,7 @@ Main API to authenticate user, start and stop server monitoring.
- module:helpers
- module:logger
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime Server Monitor](#oneuptime server-monitor)
- [Installation](#installation)

View File

@ -24,7 +24,7 @@
"logs",
"tracker"
],
"author": "HackerBay, Inc.",
"author": "OneUptime Limited.",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.17.6",

View File

@ -151,7 +151,7 @@ Main API to authenticate user, start and stop server monitoring.
- module:helpers
- module:logger
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime Server Monitor](#oneuptime-server-monitor)
- [Installation](#installation)

View File

@ -2,7 +2,7 @@
/**
* @fileoverview Main CLI that is run via the oneuptime-server-monitor command.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module server-monitor
* @see module:api
*/

View File

@ -1,6 +1,6 @@
/**
* @fileoverview Main API to authenticate user, start and stop server monitoring.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module api
* @see module:helpers
* @see module:logger

View File

@ -1,6 +1,6 @@
/**
* @fileoverview Main application config module.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module config
*/

View File

@ -1,6 +1,6 @@
/**
* @fileoverview HTTP wrapper functions module.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module helpers
* @see module:config
* @see module:logger

View File

@ -1,6 +1,6 @@
/**
* @fileoverview Default message and error logger service.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module logger
*/

View File

@ -30,7 +30,7 @@
/**
* @fileoverview Main CLI that is run via the oneuptime-server-monitor command.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module server-monitor
* @see module:api
*/

View File

@ -138,7 +138,7 @@ monitor.start();
<li>module:helpers</li>
<li>module:logger</li>
</ul>
<p><strong>Author</strong>: HackerBay, Inc.</p>
<p><strong>Author</strong>: OneUptime Limited.</p>
<ul>
<li><a href="#oneuptime-server-monitor">OneUptime Server Monitor</a>
<ul>

View File

@ -28,7 +28,7 @@
<article>
<pre class="prettyprint source linenums"><code>/**
* @fileoverview Main API to authenticate user, start and stop server monitoring.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module api
* @see module:helpers
* @see module:logger

View File

@ -28,7 +28,7 @@
<article>
<pre class="prettyprint source linenums"><code>/**
* @fileoverview Main application config module.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module config
*/

View File

@ -28,7 +28,7 @@
<article>
<pre class="prettyprint source linenums"><code>/**
* @fileoverview HTTP wrapper functions module.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module helpers
* @see module:config
* @see module:logger

View File

@ -28,7 +28,7 @@
<article>
<pre class="prettyprint source linenums"><code>/**
* @fileoverview Default message and error logger service.
* @author HackerBay, Inc.
* @author OneUptime Limited.
* @module logger
*/

View File

@ -82,7 +82,7 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>HackerBay, Inc.</li>
<li>OneUptime Limited.</li>
</ul>
</dd>

View File

@ -80,7 +80,7 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>HackerBay, Inc.</li>
<li>OneUptime Limited.</li>
</ul>
</dd>

View File

@ -80,7 +80,7 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>HackerBay, Inc.</li>
<li>OneUptime Limited.</li>
</ul>
</dd>

View File

@ -80,7 +80,7 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>HackerBay, Inc.</li>
<li>OneUptime Limited.</li>
</ul>
</dd>

View File

@ -80,7 +80,7 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>HackerBay, Inc.</li>
<li>OneUptime Limited.</li>
</ul>
</dd>

View File

@ -128,7 +128,7 @@ public class SampleClass {
Main API to send logs to the server.
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime SDK](#oneuptime-sdk)
- [Installation](#installation)

View File

@ -143,10 +143,10 @@
</licenses>
<developers>
<developer>
<name>HackerBay, Inc.</name>
<email>hello@hackerbay.io</email>
<organization>HackerBay, Inc.</organization>
<organizationUrl>http://www.hackerbay.io</organizationUrl>
<name>OneUptime Limited.</name>
<email>hello@oneuptime.com</email>
<organization>OneUptime Limited.</organization>
<organizationUrl>http://www.oneuptime.com</organizationUrl>
</developer>
</developers>
<scm>

View File

@ -11,9 +11,9 @@
"mongo",
"oneuptime"
],
"author": "HackerBay, Inc. <hello@hackerbay.io>",
"author": "OneUptime Limited. <hello@oneuptime.com>",
"contributors": [
"HackerBay, Inc. <hello@hackerbay.io>"
"OneUptime Limited. <hello@oneuptime.com>"
],
"license": "MIT",
"type": "module",

View File

@ -10,7 +10,7 @@
"audit": "npm audit --audit-level=low",
"dep-check": "depcheck ./ --skip-missing=true"
},
"author": "HackerBay, Inc.",
"author": "OneUptime Limited.",
"license": "MIT",
"type": "module",
"dependencies": {

View File

@ -1,3 +1,3 @@
# Partner Logos
You'll find logos for OneUptime partners here. If you want to be a partner, please check - https://partners.hackerbay.io
You'll find logos for OneUptime partners here. If you want to be a partner, please check - https://partners.oneuptime.com

View File

@ -16,7 +16,7 @@
OneUptime is headquartered in [[New York, NY]] <ref>{{Cite web|url=https://www.crunchbase.com/organization/oneuptime|website=www.crunchbase.com|title=OneUptime, Crunchbase}}</ref> with operations in [[Hyderabad, India]]. Its platform is designed to alert clients to disruptions and outages through [[machine learning]] and automation.
OneUptime is a owned by HackerBay, Inc. an enterprise software company responsible for building products like [[CloudBoost]]<ref>{{Cite web|url=https://cloudboost.io|website=www.cloudboost.io|title=CloudBoost}}</ref>, OneUptime and many more. <ref>{{Cite web|url=https://hackerbay.io|website=www.hackerbay.io|title=HackerBay}}</ref>
OneUptime is a owned by OneUptime Limited. an enterprise software company responsible for building products like [[CloudBoost]]<ref>{{Cite web|url=https://cloudboost.io|website=www.cloudboost.io|title=CloudBoost}}</ref>, OneUptime and many more. <ref>{{Cite web|url=https://oneuptime.com|website=www.oneuptime.com|title=HackerBay}}</ref>
==History==
The company was founded 2014 in Hyderabad, India, by Nawaz Dhandala. The company was incubated at the [[MassChallenge]]<ref>{{Cite web|url=https://masschallenge.org/media/masschallenge-boston-announces-2017-cohort|website=www.masschallenge.com|title=MassChallenge}}</ref>.
@ -30,7 +30,7 @@ In 2017, OneUptime launched an update with let's customers build beautiful and c
==External Links==
* {{Official Website|https://www.oneuptime.com}}
* [https://hackerbay.io HackerBay]
* [https://oneuptime.com HackerBay]
* [https://blog.oneuptime.com Official Blog]
* [https://oneuptime.com/docs API Reference]
* [https://oneuptime.com/customers Customers]

View File

@ -122,7 +122,7 @@ NonExistingMethod(); // calling this will trigger an error and its sent to your
Main API to send logs to the server.
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime SDK](#oneuptime-sdk)
- [Installation](#installation)

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@
"test": "jest"
},
"keywords": [],
"author": "HackerBay, Inc. ",
"author": "OneUptime Limited. ",
"license": "MIT",
"type": "module",
"dependencies": {

View File

@ -10,7 +10,7 @@ Usage can be found at [Examples and Usage](README.rst)
Main API to send logs to the server.
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
<a name="logger_api--logger"></a>

View File

@ -4,8 +4,8 @@ current_version = 1.0.0
[metadata]
name = oneuptime_sdk
version = 1.0.0
author = HackerBay, Inc.
author_email = hello@hackerbay.io
author = OneUptime Limited.
author_email = hello@oneuptime.com
description = A OneUptime package that tracks error event and send logs from your applications to your oneuptime dashboard.
long_description = file: README.md
long_description_content_type = text/markdown

View File

@ -10,8 +10,8 @@ README = (HERE / "README.rst").read_text()
setup(
name="oneuptime_sdk", # Replace with your own username
version="1.0.0",
author="HackerBay, Inc.",
author_email="hello@hackerbay.io",
author="OneUptime Limited.",
author_email="hello@oneuptime.com",
description="A OneUptime package that tracks error event and send logs from your applications to your oneuptime dashboard.",
long_description=README,
long_description_content_type="text/x-rst",

View File

@ -131,7 +131,7 @@ NonExistingMethod() # calling this will trigger an error and its sent to your on
Main API to send logs to the server.
**Author**: HackerBay, Inc.
**Author**: OneUptime Limited.
- [OneUptime SDK](#oneuptime-sdk)
- [Installation](#installation)

View File

@ -4,8 +4,8 @@ Gem::Specification.new do |spec|
spec.name = OneUptime::NAME
spec.version = OneUptime::VERSION
spec.authors = ['HackerBay, Inc.']
spec.email = ['hello@hackerbay.io']
spec.authors = ['OneUptime Limited.']
spec.email = ['hello@oneuptime.com']
spec.summary = 'OneUptime for Logging and Tracking'
spec.description = 'OneUptime is a ruby package that tracks error event and send logs from your applications to your oneuptime dashboard.'
spec.homepage = 'https://github.com/OneUptime/app'

View File

@ -1,17 +1,17 @@
# This script will run the saml server with the following configurations
# domain: 'tests.hackerbay.io'
# domain: 'tests.oneuptime.com'
# samlSsoUrl: 'http://localhost:9876/simplesaml/saml2/idp/SSOService.php'
# remoteLogoutUrl: 'http://localhost:9876/logout'
# The saml database will have the following records (from users.php)
# email | id | password
# user1@tests.hackerbay.io | user1 | user1pass
# user2@tests.hackerbay.io | user2 | user2pass
# user1@tests.oneuptime.com | user1 | user1pass
# user2@tests.oneuptime.com | user2 | user2pass
docker run \
--name=samlIdp \
-p 9876:8080 \
-p 8443:8443 \
-e SIMPLESAMLPHP_SP_ENTITY_ID=hackerbay.io \
-e SIMPLESAMLPHP_SP_ENTITY_ID=oneuptime.com \
-e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:3002/api/user/sso/callback \
-e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost/simplesaml/module.php/saml/sp/saml2-logout.php/test-sp \
-v $PWD/users.php:/var/www/simplesamlphp/config/authsources.php \

View File

@ -11,12 +11,12 @@ $config = array(
'user1:user1pass' => array(
'uid' => array('1'),
'eduPersonAffiliation' => array('group1'),
'email' => 'user1@tests.hackerbay.io',
'email' => 'user1@tests.oneuptime.com',
),
'user2:user2pass' => array(
'uid' => array('2'),
'eduPersonAffiliation' => array('group2'),
'email' => 'user2@tests.hackerbay.io',
'email' => 'user2@tests.oneuptime.com',
),
),

View File

@ -2,7 +2,7 @@
## Colors
OneUptime brand color is black, just like HackerBay.io. This will help all the HackerBay products to conform to this standard.
OneUptime brand color is black, just like oneuptime.com. This will help all the HackerBay products to conform to this standard.
- Default: black
- Unhighlighted Text / Small Text: #939da3 (grey)

View File

@ -81,8 +81,8 @@ describe('SSO login', () => {
await moveToSsoPage(page);
await createSso(page, {
'saml-enabled': false,
applicationId: 'hackerbay.io',
domain: `disabled-domain.hackerbay.io`,
applicationId: 'oneuptime.com',
domain: `disabled-domain.oneuptime.com`,
samlSsoUrl:
'http://localhost:9876/simplesaml/saml2/idp/SSOService.php',
certificateFingerprint: 'AZERTYUIOP',
@ -91,8 +91,8 @@ describe('SSO login', () => {
});
await createSso(page, {
'saml-enabled': true,
domain: `tests.hackerbay.io`,
applicationId: 'hackerbay.io',
domain: `tests.oneuptime.com`,
applicationId: 'oneuptime.com',
samlSsoUrl:
'http://localhost:9876/simplesaml/saml2/idp/SSOService.php',
certificateFingerprint: 'AZERTYUIOP',
@ -125,7 +125,7 @@ describe('SSO login', () => {
await init.pageType(
page,
'input[name=email]',
'email@inexistent-domain.hackerbay.io'
'email@inexistent-domain.oneuptime.com'
);
await Promise.all([
init.pageClick(page, 'button[type=submit]'),
@ -163,7 +163,7 @@ describe('SSO login', () => {
await init.pageType(
page,
'input[name=email]',
'email@disabled-domain.hackerbay.io'
'email@disabled-domain.oneuptime.com'
);
await Promise.all([
init.pageClick(page, 'button[type=submit]'),
@ -201,7 +201,7 @@ describe('SSO login', () => {
await init.pageType(
page,
'input[name=email]',
'email@tests.hackerbay.io'
'email@tests.oneuptime.com'
);
const [response] = await Promise.all([
page.waitForNavigation('networkidle2'),

View File

@ -7,7 +7,7 @@ import init from '../../test-init';
let browser: $TSFixMe, otherBrowser: $TSFixMe;
let page: $TSFixMe, otherPage: $TSFixMe;
const email: string = 'masteradmin@hackerbay.io';
const email: string = 'masteradmin@oneuptime.com';
const password: string = '1234567890';
const user: $TSFixMe = {
email,

View File

@ -9,7 +9,7 @@ const userEmail: Email = utils.generateRandomBusinessEmail();
const password: string = '1234567890';
let browser: $TSFixMe, page: $TSFixMe;
const masterAdmin: $TSFixMe = {
email: 'masteradmin@hackerbay.io',
email: 'masteradmin@oneuptime.com',
password: '1234567890',
};

View File

@ -48,7 +48,7 @@ describe('Enterprise Admin Dashboard API', () => {
localStorageData.should.have.property('access_token');
localStorageData.should.have.property(
'email',
'masteradmin@hackerbay.io'
'masteradmin@oneuptime.com'
);
page.url().should.containEql(utils.ADMIN_DASHBOARD_URL);
done();

View File

@ -8,7 +8,7 @@ let browser: $TSFixMe,
page: $TSFixMe,
browserPage: $TSFixMe;
const admin: $TSFixMe = {
email: 'masteradmin@hackerbay.io',
email: 'masteradmin@oneuptime.com',
password: '1234567890',
};
// User credentials

View File

@ -9,7 +9,7 @@ const request: $TSFixMe = chai.request.agent(app);
import AirtableService from '../../../../licensing/src/services/airtableService';
const tableName: string = 'License';
const email: string = 'license@hackerbay.io';
const email: string = 'license@oneuptime.com';
let validLicenseId: $TSFixMe, expiredLicenseId: $TSFixMe;
describe('License API', function (): void {

View File

@ -7,7 +7,7 @@ let browser: $TSFixMe, page: $TSFixMe;
import 'should';
// User credentials
const email: string = 'masteradmin@hackerbay.io';
const email: string = 'masteradmin@oneuptime.com';
const password: string = '1234567890';
const user: $TSFixMe = {
email: utils.generateRandomBusinessEmail(),

View File

@ -8,7 +8,7 @@ let browser: $TSFixMe, page: $TSFixMe;
import 'should';
// User credentials
const email: string = 'masteradmin@hackerbay.io';
const email: string = 'masteradmin@oneuptime.com';
const password: string = '1234567890';
const smtpName: string = 'Hackerbay';

View File

@ -6,7 +6,7 @@ let browser: $TSFixMe, page: $TSFixMe;
import 'should';
// User credentials
const email: string = 'masteradmin@hackerbay.io';
const email: string = 'masteradmin@oneuptime.com';
const password: string = '1234567890';
const moveToSsoPage: Function = async (page: $TSFixMe): void => {
@ -108,11 +108,11 @@ describe('SSO API', () => {
await init.pageWaitForSelector(page, '#no-sso-message');
await createSso(page, {
domain: 'test.hackerbay.io',
entityId: 'hackerbay.io', //Updated UI
remoteLoginUrl: 'test.hackerbay.io/login',
domain: 'test.oneuptime.com',
entityId: 'oneuptime.com', //Updated UI
remoteLoginUrl: 'test.oneuptime.com/login',
certificateFingerprint: 'AZERTYUIOP',
remoteLogoutUrl: 'test.hackerbay.io/logout',
remoteLogoutUrl: 'test.oneuptime.com/logout',
ipRanges: '127.0.0.1',
});
@ -136,7 +136,7 @@ describe('SSO API', () => {
}
);
expect(tbody).toContain('test.hackerbay.io');
expect(tbody).toContain('test.oneuptime.com');
done();
},
@ -178,7 +178,7 @@ describe('SSO API', () => {
await page.keyboard.up('Control');
await page.keyboard.press('Backspace');
await init.pageType(page, '#domain', 'updated.test.hackerbay.io');
await init.pageType(page, '#domain', 'updated.test.oneuptime.com');
await init.pageClick(page, '#save-button');
@ -191,7 +191,7 @@ describe('SSO API', () => {
return e.innerHTML;
}
);
expect(tbody).toContain('updated.test.hackerbay.io');
expect(tbody).toContain('updated.test.oneuptime.com');
done();
},
@ -254,11 +254,11 @@ describe('SSO API', () => {
for (let i: $TSFixMe = 0; i <= 11; i++) {
await createSso(page, {
domain: `subdomain.${i}.test.hackerbay.io`,
entityId: 'hackerbay.io', //Updated UI
remoteLoginUrl: 'test.hackerbay.io/login',
domain: `subdomain.${i}.test.oneuptime.com`,
entityId: 'oneuptime.com', //Updated UI
remoteLoginUrl: 'test.oneuptime.com/login',
certificateFingerprint: 'AZERTYUIOP',
remoteLogoutUrl: 'test.hackerbay.io/logout',
remoteLogoutUrl: 'test.oneuptime.com/logout',
ipRanges: '127.0.0.1',
});
}
@ -282,8 +282,8 @@ describe('SSO API', () => {
return e.innerHTML;
}
);
expect(firstPageTbody).toContain('subdomain.11.test.hackerbay.io');
expect(firstPageTbody).toContain('subdomain.2.test.hackerbay.io');
expect(firstPageTbody).toContain('subdomain.11.test.oneuptime.com');
expect(firstPageTbody).toContain('subdomain.2.test.oneuptime.com');
await init.pageClick(page, '#next-button');
@ -294,8 +294,8 @@ describe('SSO API', () => {
return e.innerHTML;
}
);
expect(secondPageTbody).toContain('subdomain.1.test.hackerbay.io');
expect(secondPageTbody).toContain('subdomain.0.test.hackerbay.io');
expect(secondPageTbody).toContain('subdomain.1.test.oneuptime.com');
expect(secondPageTbody).toContain('subdomain.0.test.oneuptime.com');
await init.pageClick(page, '#previous-button');
@ -307,8 +307,8 @@ describe('SSO API', () => {
}
);
expect(initalPageTbody).toContain('subdomain.11.test.hackerbay.io');
expect(initalPageTbody).toContain('subdomain.2.test.hackerbay.io');
expect(initalPageTbody).toContain('subdomain.11.test.oneuptime.com');
expect(initalPageTbody).toContain('subdomain.2.test.oneuptime.com');
done();
},

View File

@ -6,7 +6,7 @@ import init from '../../test-init';
import 'should';
let browser: $TSFixMe, page: $TSFixMe;
// User credentials
const email: string = 'masteradmin@hackerbay.io';
const email: string = 'masteradmin@oneuptime.com';
const password: string = '1234567890';
const createUserMail: Email = utils.generateRandomBusinessEmail();

View File

@ -510,7 +510,7 @@ const _this: $TSFixMe = {
page: $TSFixMe
): void {
const masterAdmin: $TSFixMe = {
email: 'masteradmin@hackerbay.io',
email: 'masteradmin@oneuptime.com',
password: '1234567890',
};
await page.goto(utils.ACCOUNTS_URL + '/login', {

View File

@ -3,7 +3,7 @@
"version": "3.0.18",
"description": "OneUptime is an automation tool that helps you monitor the performance and downtime of your APIs and Web apps.",
"homepage": "https://oneuptime.com",
"author": "HackerBay <hello@hackerbay.io>",
"author": "HackerBay <hello@oneuptime.com>",
"license": "MIT",
"main": "index.ts",
"scripts": {