Replace .map() with .forEach() where return value is unused
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,7 +97,7 @@ export default defineStore('allMapDataStore', {
|
||||
},
|
||||
filterAttrs: state => {
|
||||
if(state.allFilterAttrs !== null){
|
||||
state.allFilterAttrs.map(att => {
|
||||
state.allFilterAttrs.forEach(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.min = att.min !== null ? moment(att.min).format('YYYY/MM/DD HH:mm') : null;
|
||||
@@ -193,10 +193,10 @@ export default defineStore('allMapDataStore', {
|
||||
const response = await this.$axios.get(api);
|
||||
this.allTraceTaskSeq = response.data.task_seq;
|
||||
this.allCase = response.data.cases;
|
||||
this.allCase.map(c => {
|
||||
this.allCase.forEach(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.attributes.map(att => {
|
||||
c.attributes.forEach(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:mm') : null;
|
||||
@@ -232,10 +232,10 @@ export default defineStore('allMapDataStore', {
|
||||
const response = await this.$axios.get(api);
|
||||
this.allBaseTraceTaskSeq = response.data.task_seq;
|
||||
this.allBaseCase = response.data.cases;
|
||||
this.allBaseCase.map(c => {
|
||||
this.allBaseCase.forEach(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.attributes.map(att => {
|
||||
c.attributes.forEach(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:mm') : null;
|
||||
|
||||
@@ -123,7 +123,7 @@ export default defineStore('conformanceStore', {
|
||||
const newData = state.allCases.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.facets.map(fac => {
|
||||
c.facets.forEach(fac => {
|
||||
switch(fac.type) {
|
||||
case 'dummy': //sonar-qube
|
||||
case 'duration-list':
|
||||
@@ -135,7 +135,7 @@ export default defineStore('conformanceStore', {
|
||||
};
|
||||
return fac;
|
||||
});
|
||||
c.attributes.map(att => {
|
||||
c.attributes.forEach(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:MM:ss') : null;
|
||||
@@ -165,7 +165,7 @@ export default defineStore('conformanceStore', {
|
||||
const newData = state.allLoopCases.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:mm');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:mm');
|
||||
c.attributes.map(att => {
|
||||
c.attributes.forEach(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
att.value = att.value !== null ? moment(att.value).format('YYYY/MM/DD HH:mm:ss') : null;
|
||||
|
||||
@@ -69,7 +69,7 @@ export default defineStore('filesStore', {
|
||||
const response = await axios.get(api);
|
||||
|
||||
this.allEventFiles = response.data;
|
||||
this.allEventFiles.map(o => {
|
||||
this.allEventFiles.forEach(o => {
|
||||
switch (o.type) {
|
||||
case 'log':
|
||||
icon = 'work_history';
|
||||
|
||||
@@ -266,10 +266,10 @@ export default defineStore('useMapPathStore', {
|
||||
},
|
||||
async highlightMostFrequentPath() {
|
||||
const LIST_INDEX = 0;
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].nodes.map(nodeToHighlight => {
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].nodes.forEach(nodeToHighlight => {
|
||||
nodeToHighlight.data('nodeImageUrl', ImgCapsulesGlow[nodeToHighlight.data('level')]);
|
||||
});
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].edges.map(edgeToHighlight =>
|
||||
this.insightWithPath['most_freq_traces'][LIST_INDEX].edges.forEach(edgeToHighlight =>
|
||||
edgeToHighlight.addClass('highlight-edge'));
|
||||
},
|
||||
async highlightMostFrequentPathUnused() {
|
||||
|
||||
Reference in New Issue
Block a user