mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Fix lint
This commit is contained in:
committed by
Nawaz Dhandala
parent
4a39626061
commit
13237ceef7
23589
accounts/package-lock.json
generated
23589
accounts/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -921,7 +921,7 @@ router.get(
|
||||
const timelineAlerts = [
|
||||
...timeline,
|
||||
...alerts,
|
||||
...incidentMessages
|
||||
...incidentMessages,
|
||||
].sort((a, b) => {
|
||||
return b.createdAt - a.createdAt;
|
||||
});
|
||||
|
||||
@@ -158,7 +158,6 @@ module.exports = {
|
||||
|
||||
sendRealTimeUpdate: async function({ incidentId, projectId }) {
|
||||
const _this = this;
|
||||
let result;
|
||||
let incidentMessages = await IncidentMessageService.findBy({
|
||||
incidentId,
|
||||
type: 'internal',
|
||||
@@ -183,7 +182,7 @@ module.exports = {
|
||||
const timelineAlerts = [
|
||||
...timeline,
|
||||
...alerts,
|
||||
...incidentMessages
|
||||
...incidentMessages,
|
||||
].sort((a, b) => {
|
||||
return b.createdAt - a.createdAt;
|
||||
});
|
||||
@@ -202,7 +201,7 @@ module.exports = {
|
||||
a.status !== 'internal notes updated'
|
||||
);
|
||||
filteredMsg = await Services.rearrangeDuty(filteredMsg);
|
||||
result = {
|
||||
const result = {
|
||||
data: filteredMsg,
|
||||
incidentId,
|
||||
projectId,
|
||||
|
||||
@@ -18,10 +18,10 @@ module.exports = {
|
||||
_id: incidentMessage._id,
|
||||
});
|
||||
|
||||
if(incidentMessage.postOnStatusPage) {
|
||||
if (incidentMessage.postOnStatusPage) {
|
||||
await RealTimeService.addIncidentNote(incidentMessage);
|
||||
}
|
||||
|
||||
|
||||
return incidentMessage;
|
||||
} catch (error) {
|
||||
ErrorService.log('incidentMessageService.create', error);
|
||||
|
||||
@@ -104,7 +104,7 @@ module.exports = {
|
||||
.limit(limit)
|
||||
.skip(skip)
|
||||
.populate('createdById', 'name')
|
||||
.populate({path: 'probeId', select: 'probeName probeImage'});
|
||||
.populate({ path: 'probeId', select: 'probeName probeImage' });
|
||||
|
||||
return incidentTimelines;
|
||||
} catch (error) {
|
||||
|
||||
28859
dashboard/package-lock.json
generated
28859
dashboard/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -75,13 +75,15 @@
|
||||
"redux-form": "^7.3.0",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-thunk": "^2.2.0",
|
||||
"rxjs": "^6.6.6",
|
||||
"sane-email-validation": "^1.1.0",
|
||||
"should": "^13.2.3",
|
||||
"slick-carousel": "^1.8.1",
|
||||
"socket.io-client": "^2.3.0",
|
||||
"to-pascal-case": "^1.0.0",
|
||||
"universal-cookie": "^4.0.0",
|
||||
"valid-url": "^1.0.9"
|
||||
"valid-url": "^1.0.9",
|
||||
"workbox-build": "^4.3.1"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@@ -107,8 +109,7 @@
|
||||
"jest-localstorage-mock": "^2.2.0",
|
||||
"npm-force-resolutions": "0.0.3",
|
||||
"redux-mock-store": "^1.5.3",
|
||||
"should": "^13.2.3",
|
||||
"workbox-build": "^4.3.1"
|
||||
"should": "^13.2.3"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
|
||||
@@ -118,7 +118,8 @@ export class AddScheduleModal extends Component {
|
||||
const fileName = file.name;
|
||||
this.setState({ fileName: fileName, fileUploaded: true });
|
||||
};
|
||||
removeIntroAudio = () => { // unused 'e'
|
||||
removeIntroAudio = () => {
|
||||
// unused 'e'
|
||||
const _this = this;
|
||||
const { currentProject, data, removeIntroAudio } = this.props;
|
||||
removeIntroAudio(currentProject._id, data.callRoutingId).then(
|
||||
|
||||
@@ -145,7 +145,6 @@ class ErrorEventStackTrace extends Component {
|
||||
{frame.fileName}
|
||||
{' '}
|
||||
</span>
|
||||
|
||||
{' '}
|
||||
in{' '}
|
||||
<span className="Text-fontWeight--bold">
|
||||
|
||||
@@ -241,7 +241,7 @@ const mapStateToProps = state => {
|
||||
};
|
||||
|
||||
IncidentAlert.propTypes = {
|
||||
page : PropTypes.number,
|
||||
page: PropTypes.number,
|
||||
previous: PropTypes.func.isRequired,
|
||||
isRequesting: PropTypes.bool,
|
||||
alerts: PropTypes.array,
|
||||
|
||||
@@ -43,7 +43,9 @@ export class IncidentMessageThread extends Component {
|
||||
<div className="Box-root">
|
||||
<span className="Text-color--inherit Text-display--inline Text-fontSize--16 Text-fontWeight--medium Text-lineHeight--24 Text-typeface--base Text-wrap--wrap">
|
||||
<span>
|
||||
{title === 'Status Page' ? title : 'Incident Timeline'}
|
||||
{title === 'Status Page'
|
||||
? title
|
||||
: 'Incident Timeline'}
|
||||
</span>
|
||||
</span>
|
||||
<p>
|
||||
|
||||
@@ -264,9 +264,7 @@ class CreateIncident extends Component {
|
||||
]}
|
||||
onChange={(
|
||||
event,
|
||||
newValue,
|
||||
previousValue,
|
||||
name
|
||||
newValue
|
||||
) => {
|
||||
this.setState(
|
||||
{
|
||||
|
||||
@@ -549,7 +549,6 @@ MonitorSla.propTypes = {
|
||||
setActiveMonitorSla: PropTypes.func,
|
||||
activeSla: PropTypes.string,
|
||||
monitors: PropTypes.array,
|
||||
page: PropTypes.number,
|
||||
// paginatePrev: PropTypes.func, imported and dispatched but not used in the code
|
||||
// paginateNext: PropTypes.func, imported and dispatched but not used in the code
|
||||
};
|
||||
@@ -582,7 +581,6 @@ const mapStateToProps = (state, ownProps) => {
|
||||
monitorSlas: state.monitorSla.monitorSlas.slas,
|
||||
activeSla: state.monitorSla.activeSla,
|
||||
monitors,
|
||||
page: state.monitorSla.page,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ SubscriberAlert.propTypes = {
|
||||
PropTypes.string,
|
||||
PropTypes.oneOf([null, undefined]),
|
||||
]),
|
||||
page: PropTypes.number
|
||||
page: PropTypes.number,
|
||||
};
|
||||
|
||||
export default withRouter(
|
||||
|
||||
@@ -77,6 +77,9 @@ export const UPDATE_ERROR_EVENT_MEMBER_RESET =
|
||||
export const NEW_ERROR_EVENT_SUCCESS = 'NEW_ERROR_EVENT_SUCCESS';
|
||||
|
||||
//Delete an Error Tracker Issue
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_SUCCESS = 'DELETE_ERROR_TRACKER_ISSUE_SUCCESS';
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_FAILURE = 'DELETE_ERROR_TRACKER_ISSUE_FAILURE';
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_REQUEST = 'DELETE_ERROR_TRACKER_ISSUE_REQUEST';
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_SUCCESS =
|
||||
'DELETE_ERROR_TRACKER_ISSUE_SUCCESS';
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_FAILURE =
|
||||
'DELETE_ERROR_TRACKER_ISSUE_FAILURE';
|
||||
export const DELETE_ERROR_TRACKER_ISSUE_REQUEST =
|
||||
'DELETE_ERROR_TRACKER_ISSUE_REQUEST';
|
||||
|
||||
@@ -364,7 +364,8 @@ const mapDispatchToProps = dispatch => {
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => { // removal of unused props
|
||||
const mapStateToProps = state => {
|
||||
// removal of unused props
|
||||
const component = state.component;
|
||||
let subProjects = state.subProject.subProjects.subProjects;
|
||||
let monitors = [];
|
||||
|
||||
@@ -844,7 +844,12 @@ export function moreIncidentNotesFailure(error) {
|
||||
};
|
||||
}
|
||||
|
||||
export function moreIncidentNotes(projectId, incidentId, postOnStatusPage, skip) {
|
||||
export function moreIncidentNotes(
|
||||
projectId,
|
||||
incidentId,
|
||||
postOnStatusPage,
|
||||
skip
|
||||
) {
|
||||
return async function(dispatch) {
|
||||
try {
|
||||
dispatch(moreIncidentNotesRequest());
|
||||
|
||||
@@ -65,11 +65,7 @@ class Incident extends Component {
|
||||
if (statusData && statusData._id) {
|
||||
fetchLastIncidentTimeline(statusData.projectId._id, incidentId);
|
||||
fetchIncident(statusData.projectId._id, incidentId);
|
||||
fetchIncidentNotes(
|
||||
statusData.projectId._id,
|
||||
incidentId,
|
||||
true
|
||||
);
|
||||
fetchIncidentNotes(statusData.projectId._id, incidentId, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +82,7 @@ class Incident extends Component {
|
||||
if (prevProps.statusData._id !== statusData._id) {
|
||||
fetchLastIncidentTimeline(statusData.projectId._id, incidentId);
|
||||
fetchIncident(statusData.projectId._id, incidentId);
|
||||
fetchIncidentNotes(
|
||||
statusData.projectId._id,
|
||||
incidentId,
|
||||
true
|
||||
);
|
||||
fetchIncidentNotes(statusData.projectId._id, incidentId, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,12 +95,7 @@ class Incident extends Component {
|
||||
} = this.props;
|
||||
const { incidentId } = params;
|
||||
|
||||
moreIncidentNotes(
|
||||
statusData.projectId._id,
|
||||
incidentId,
|
||||
true,
|
||||
skip + 1
|
||||
);
|
||||
moreIncidentNotes(statusData.projectId._id, incidentId, true, skip + 1);
|
||||
}
|
||||
|
||||
handleIncidentStatus = () => {
|
||||
|
||||
Reference in New Issue
Block a user