Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

directus-extension-cdh-tweets-report

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directus-extension-cdh-tweets-report - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

dist/api.js

@@ -7,4 +7,6 @@ function defineEndpoint(config) {

router.get("/profile-search", async (_req, res) => {
var _a;
if (!_req.query.id)
return res.json({});
const limit = Math.min(50, (_a = _req.query.limit) != null ? _a : 100);
const data = await ctx.database.select(

@@ -17,3 +19,3 @@ "users.id",

"users.url"
).count("tweets.id AS tweet_count").from("users").join("tweets", "users.id", "=", "tweets.user_id").join("tasks", "tweets.task_id", "=", "tasks.id").where("tasks.id", "=", _req.query.id).groupBy("users.id", "users.name").orderBy("tweet_count", "DESC");
).count("tweets.id AS tweet_count").from("users").join("tweets", "users.id", "=", "tweets.user_id").join("tasks", "tweets.task_id", "=", "tasks.id").where("tasks.id", "=", _req.query.id).groupBy("users.id", "users.name").orderBy("tweet_count", "DESC").limit(limit);
res.json({

@@ -20,0 +22,0 @@ data,

@@ -1,2 +0,2 @@

import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, createBlock, normalizeStyle, createCommentVNode, inject, ref, computed, watch, onMounted, onUnmounted, createTextVNode } from 'vue';
import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, createBlock, normalizeStyle, createCommentVNode, inject, ref, computed, watch, onMounted, onUnmounted } from 'vue';

@@ -320,4 +320,4 @@ function defineModule(config) {

var css = "\n.app-report #main-content {\n margin-right: auto !important;\n}\n.app-report #sidebar {\n display: none !important;\n}\n.app-report .contain {\n padding: 15px 32px 0;\n}\n.app-report .fchart {\n height: 15px;\n background: var(--primary);\n}\n.app-report .wrapChar {\n width: 200px;\n background: var(--primary-175);\n border-radius: 3px;\n overflow: hidden;\n}\n.app-report .formSearch {\n padding-bottom: 15px;\n margin-bottom: 10px;\n}\n.app-report .formSearch .field-label {\n display: none;\n}\n";
n(css,{});
var css$1 = "\n.app-report #main-content {\n margin-right: auto !important;\n}\n.app-report #sidebar {\n display: none !important;\n}\n.app-report .contain {\n padding: 15px 32px 0;\n}\n.app-report .fchart {\n height: 15px;\n background: var(--primary);\n}\n.app-report .wrapChar {\n width: 200px;\n background: var(--primary-175);\n border-radius: 3px;\n overflow: hidden;\n}\n.app-report .formSearch {\n padding-bottom: 15px;\n margin-bottom: 10px;\n}\n.app-report .formSearch .field-label {\n display: none;\n}\n";
n(css$1,{});

@@ -327,4 +327,13 @@ var topKeyword = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "key-words.vue"]]);

const _hoisted_1 = { class: "contain" };
const _hoisted_2 = ["src"];
const _hoisted_3 = { class: "wrapChar" };
const _hoisted_2 = /* @__PURE__ */ createElementVNode(
"div",
{ class: "__loading" },
" Loading... ",
-1
/* HOISTED */
);
const _hoisted_3 = { class: "" };
const _hoisted_4 = ["src"];
const _hoisted_5 = { class: "wrapChar" };
const df = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAA8ADwDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAAAAUGCP/EACIQAQABAwUAAgMAAAAAAAAAAAABAgMEBQYREhMVQQchM//EABYBAQEBAAAAAAAAAAAAAAAAAAABBv/EABcRAQEBAQAAAAAAAAAAAAAAAAABMRH/2gAMAwEAAhEDEQA/AO+wGtZQAAAAAAAAAAAAAAAAY+fxLsOb85E6Tk+lW5I3bM/JZXHykW4txd49OOnWIjx/l99Of22AlkurLZiPtvaWg7Sp1KjQcS7YjV9SyNXzPTJu3u+VfmJuVx6VVdImYjiiniiPqIWAWTmFvdABAAAAAAAAH//Z";
var _sfc_main = /* @__PURE__ */ defineComponent({

@@ -334,3 +343,3 @@ __name: "profile-search",

const api = useApi();
const loading = ref(true);
const loading = ref(false);
const tasks = ref([]);

@@ -346,2 +355,18 @@ const fields = ref([{

}
}, {
field: "limit",
meta: {
interface: "select-dropdown",
width: "half",
options: {
choices: (() => {
return [5, 10, 20].map((value) => {
return {
text: `Top ${value}`,
value
};
});
})()
}
}
}]);

@@ -357,7 +382,7 @@ const formSearch = ref({

const fetchData = async () => {
loading.value = true;
let max = 0;
const a = await api.get("/reports/profile-search", {
params: {
id: formSearch.value.task
id: formSearch.value.task,
limit: formSearch.value.limit
}

@@ -380,3 +405,2 @@ }).then((res) => {

});
console.log(a);
itemsReport.value = a.map((asy) => {

@@ -395,3 +419,3 @@ asy.percent = Math.ceil(asy.tweet_count / (max / 100));

value: "profile_image_url",
width: 140
width: 100
},

@@ -406,3 +430,3 @@ {

value: "followers_count",
width: 300
width: 120
},

@@ -433,7 +457,11 @@ {

() => {
loading.value = true;
fetchData();
},
{
immediate: true
}
);
let interval = false;
onMounted(() => {
onMounted(async () => {
interval = setInterval(() => {

@@ -443,3 +471,3 @@ fetchData().catch();

formSearch.value.task = "";
api.get("/items/tasks").then((res) => {
await api.get("/items/tasks").then((res) => {
var _a;

@@ -455,2 +483,3 @@ const data = res.data.data;

formSearch.value.task = (_a = data[0]) == null ? void 0 : _a.id;
fetchData();
});

@@ -464,2 +493,3 @@ });

const _component_v_form = resolveComponent("v-form");
const _component_tempelate = resolveComponent("tempelate");
const _component_v_table = resolveComponent("v-table");

@@ -482,24 +512,27 @@ const _component_private_view = resolveComponent("private-view");

}, null, 8, ["modelValue", "fields"]),
loading.value ? (openBlock(), createElementBlock(
Fragment,
{ key: 0 },
[
createTextVNode(" Loading... ")
],
64
/* STABLE_FRAGMENT */
)) : (openBlock(), createBlock(_component_v_table, {
loading.value ? (openBlock(), createBlock(_component_tempelate, { key: 0 }, {
default: withCtx(() => [
_hoisted_2
]),
_: 1
/* STABLE */
})) : (openBlock(), createBlock(_component_v_table, {
key: 1,
"row-height": "auto",
headers,
items: dataReport.value
}, {
[`item.profile_image_url`]: withCtx(({ item }) => [
createElementVNode("img", {
src: item.profile_image_url,
alt: "",
style: { "width": "120px", "height": "auto", "object-fit": "cover" }
}, null, 8, _hoisted_2)
]),
[`item.profile_image_url`]: withCtx(({ item }) => {
var _a;
return [
createElementVNode("div", _hoisted_3, [
createElementVNode("img", {
src: (_a = item.profile_image_url) != null ? _a : df,
class: "__avatar"
}, null, 8, _hoisted_4)
])
];
}),
[`item.percent`]: withCtx(({ item }) => [
createElementVNode("div", _hoisted_3, [
createElementVNode("div", _hoisted_5, [
createElementVNode(

@@ -529,2 +562,5 @@ "div",

var css = "\n.__loading {\n font-size: 40px;\n padding: 30px 0;\n opacity: 0.7;\n}\n.__avatar {\n width: 60px;\n height: 60px;\n object-fit: contain;\n border-radius: 50%;\n border: 1px solid var(--border-normal-alt);\n}\n";
n(css,{});
var ProfileSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "profile-search.vue"]]);

@@ -531,0 +567,0 @@

{
"name": "directus-extension-cdh-tweets-report",
"version": "1.0.6",
"version": "1.0.7",
"type": "module",

@@ -5,0 +5,0 @@ "directus:extension": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc