Hi Hugh
It is called from server.js:
return await putACSClusters(details.userid)
.then(txt => statusCodeUpsert(details, "end_status", "".concat(txt, "", " Test Design")))
.then(()=> FutureTasks.upsert({userid: details.userid}, {$set: {count: 0}}, {multi: true}))
.then(txt => console.log('Correct conditionalACSEndAction end is :', txt))
.then(()=> ACSTasks.remove({}))
collections.js:
var ACSSchemas = {};
var Collections = {};
ACSSchemas.ACSTask = new SimpleSchema({
name: {
type: String,
label: "NAME",
max: 20,
optional: true
},
description: {
type: String,
label: "DESCRIPTION",
max: 50,
optional: true
},
id: {
type: String,
label: "ID",
optional: true
},
created: {
type: String,
label: "CREATED",
optional: true
},
});
ACSTasks = Collections.ACSTasks = new Mongo.Collection('acs_tasks');
ACSTasks.attachSchema(ACSSchemas.ACSTask);
and this is how collections is updated in server side(server.js)
async function jsonUpdateACSCollection(jsonString) {
var promise = await new Promise(function (resolve, reject) {
var contentObj = EJSON.parse(jsonString);
contentObj["ns2:users"].User.forEach(user => {
ACSTasks.upsert({
name: user.name[0],
id: user.id[0],
}, {
$set: {
identityGroupName: user.identityGroupName[0],
description: user.description[0],
created: user.created[0],
lastModified: user.lastModified[0],
}
});
}, (err, db) => {
err ? reject(err) : resolve(db);
});
});
return promise;
}
and client side React Griddle table
export default class Home4ACS extends TrackerReact(Component) {
constructor() {
super();
this.state = {
subscription: {
acs_tasks: Meteor.subscribe('all_acs_tasks')
}
}
}
componentWillUnmount() {
this.state.subscription.acs_tasks.stop();
}
acstasks() {
return ACSTasks.find().fetch();
}
render() {
let res = this.acstasks();
if (res.length < 1) {
return <div>
<h1>Detecting ACS status...</h1>
</div>
}
return (
<div id="griddle-advanced">
<Griddle results={res} tableClassName="table" showFilter={true} resultsPerPage="20"
showSettings={true} columns={["name", "description", "id", "identityGroupName", "created", "lastModified", "lastPasswordChange"]}/>
</div>
)
}
}
So not sure whether it has been removed and React not picking it up, or it has not been removed at all?