Skip to content

Commit

Permalink
Resolve #136: fix all dependabot issues marked critical (#158)
Browse files Browse the repository at this point in the history
* 136: Removed unused package crypto-js

* 136: Updated @vue/cli-service to latest version which updated webpack-bundle-analyzer which removed the ejs package

* #136: Removed deprecated bable-eslint, replacement @babel/eslint-parser is already installed

* #136: Upgraded @vue/cli-service, @babel/traverse, loader-utils

* #136: Upgraded @vue/cli-plugin-unit-mocha to latest version which upgraded flat to non-vulnerable version
  • Loading branch information
njbrunner authored Oct 30, 2024
1 parent c1528f8 commit 4b23567
Show file tree
Hide file tree
Showing 8 changed files with 6,065 additions and 7,572 deletions.
12 changes: 6 additions & 6 deletions anms-ui/public/app/components/adm/Adm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</tr>
</thead>
<tbody>
<template :key="index" v-for="(adm, index) in adms">
<tr >
<template v-for="(adm, index) in adms">
<tr :key="index">
<td>{{ adm.adm_enum }}</td>
<td v-b-tooltip.hover
title="Download ADM JSON" @click="download(adm)" ><b>{{ adm.adm_name }}</b></td>
Expand Down Expand Up @@ -54,8 +54,8 @@
</tr>
</thead>
<tbody>
<template :key="index" v-for="(error, index) in uploadErrors">
<tr>
<template v-for="(error, index) in uploadErrors">
<tr :key="index">
<td>{{ error.obj_type }}</td>
<td>{{ error.name }}</td>
<td>{{ error.issue }}</td>
Expand Down Expand Up @@ -118,7 +118,7 @@ export default {
}),
download(adm){
let json = {};
api_adm.apiGetAdm(adm.adm_enum).then(res => {
api_adm.apiGetAdm(adm.adm_enum).then(res => {
json= res.data;
const jsonData = json;
const blob = new Blob([jsonData], { type: 'application/json' });
Expand All @@ -145,7 +145,7 @@ export default {
toastr.success(this.uploadStatus);
await this.getAdms();
}
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@
</template>

<script>
import ParameterView from "./ParameterView.vue";
import vSelect from "vue-select";
export default {
name: "ExpressionParameter",
components: { ParameterView, vSelect, },
components: { vSelect, },
props: ["listComponents", "name", "parms", "type", "index"],
data() {
return {
Expand Down
43 changes: 0 additions & 43 deletions anms-ui/public/app/shared/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/
import Constants from '@app/shared/constants';
import axios from 'axios';
import CBOR from "cbor";
export default {
data() {
return {
Expand Down Expand Up @@ -248,47 +247,5 @@ export default {
return axios.get(Constants.BASE_API_URL + `transcoder/ui/log/search/${searchString}`, { params: params });
}
},

// TODO: Add apiGetAgents which is called by agents store
apiSendTBR(nodeEID, start, period, count, report, tbrCount) {
const zeroPad = (num, places) => String(num).padStart(places, '0')
var reportRaw = "";
var tbrNameHexString = "";
var pad = zeroPad(tbrCount.toString(16), 2).length / 2;
tbrNameHexString = "4" + pad + zeroPad(tbrCount.toString(16), 2)

switch (report) {
case "ltp_agent.endpointReport":
reportRaw = "8718414100"
break;
case "bp_agent.endpoint_report":
reportRaw = "87182d4101"
break;
case "bp_agent.full_report":
reportRaw = "87182d4100"
break;
case "amp_agent.full_report":
reportRaw = "8718194100"
break;
default:
reportRaw = "8718194100"
break;
}

var startArr = CBOR.encode(parseInt(start));
var startHexString = "";
startArr.forEach(par => startHexString = startHexString + (zeroPad(par.toString(16), 2)));

var periodArr = CBOR.encode(parseInt(period));
var periodHexString = "";
periodArr.forEach(par => periodHexString = periodHexString + (zeroPad(par.toString(16), 2)));

var countArr = CBOR.encode(parseInt(count));
var countHexString = "";
countArr.forEach(par => countHexString = countHexString + (zeroPad(par.toString(16), 2)));
var raw = `0xc115410a05062416161625128b01${tbrNameHexString}${startHexString}${periodHexString}${countHexString}81c11541050502252381${reportRaw}006747656e52707473`;

return [axios.put(Constants.BASE_API_URL+'nm/agents/eid/' + nodeEID + '/hex',{"data":raw}), raw]
}
}
};
6 changes: 2 additions & 4 deletions anms-ui/public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"bootswatch": "^4.5.0",
"braces": "^3.0.3",
"browserify-sign": "^4.2.2",
"cbor": "^8.1.0",
"collect": "^0.3.5",
"collect.js": "^4.32.0",
"core-js": "^3.6.5",
Expand Down Expand Up @@ -56,12 +55,11 @@
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.0",
"@vue/cli-plugin-router": "^4.4.1",
"@vue/cli-plugin-unit-mocha": "4.5.8",
"@vue/cli-plugin-unit-mocha": "^5.0.8",
"@vue/cli-plugin-vuex": "^4.4.1",
"@vue/cli-service": "4.5.19",
"@vue/cli-service": "5.0.8",
"@vue/eslint-config-standard": "^5.1.2",
"@vue/test-utils": "1.0.3",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"copy-webpack-plugin": "^5.1.1",
"eslint": "^7.1.0",
Expand Down
Loading

0 comments on commit 4b23567

Please sign in to comment.