Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Release/0.3.3" #141

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.3] - 2024-05-16
### Added
- YouTube Authorization flow[#122](https://github.com/ncsa/standalone-smm-smile/issues/122)
- YouTube basic keyword/hashtag search[#126](https://github.com/ncsa/standalone-smm-smile/issues/126)
- Policies and footer year update[#134](https://github.com/ncsa/standalone-smm-smile/issues/134)

## [0.3.2] - 2024-01-23
### Added
- Google Analytics 4 tag for user analysis [#107](https://github.com/ncsa/standalone-smm-smile/issues/107)
Expand Down
5 changes: 0 additions & 5 deletions www/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ SINGLE_USER = process.env.SINGLE_USER ? process.env.SINGLE_USER === 'true': true
CLOWDER_ON = process.env.CLOWDER_ON ? process.env.CLOWDER_ON ==='true': false;
TWITTER_ON = process.env.TWITTER_ON ? process.env.TWITTER_ON ==='true': true;
REDDIT_ON = process.env.REDDIT_ON ? process.env.REDDIT_ON === 'true': true;
GOOGLE_ON = process.env.GOOGLE_ON ? process.env.GOOGLE_ON === 'true': true;
SHARE_EXPIRE_IN = process.env.SHARE_EXPIRE_IN ? process.env.SHARE_EXPIRE_IN : 1;
CLOWDER_BASE_URL= process.env.CLOWDER_BASE_URL || "http://clowder.localhost/";
BUCKET_NAME = process.env.BUCKET_NAME ? process.env.BUCKET_NAME: 'macroscope-smile';
SMILE_GRAPHQL_URL = process.env.SMILE_GRAPHQL_URL ? process.env.SMILE_GRAPHQL_URL: "http://localhost:5050/graphql";
PRIVACY_POLICY_URL = process.env.PRIVACY_POLICY_URL ? process.env.PRIVACY_POLICY_URL: "https://www.vpaa.uillinois.edu/resources/web_privacy";
TERM_OF_USE_URL = process.env.TERM_OF_USE_URL ? process.env.TERM_OF_USE_URL: "https://www.vpaa.uillinois.edu/resources/terms_of_use";
email = true;

/**
Expand Down Expand Up @@ -64,7 +61,6 @@ if (process.env.DOCKERIZED === 'true') {
DROPBOX_CLIENT_SECRET = process.env.DROPBOX_CLIENT_SECRET;
GOOGLE_CLIENT_ID = process.env.GOOGLE_CLIENT_ID;
GOOGLE_CLIENT_SECRET = process.env.GOOGLE_CLIENT_SECRET;
GOOGLE_CALLBACK_URL = process.env.GOOGLE_CALLBACK_URL;

if (process.env.EMAIL_HOST === "" || process.env.EMAIL_HOST === undefined || process.env.EMAIL_HOST === null ||
process.env.EMAIL_FROM_ADDRESS === "" || process.env.EMAIL_FROM_ADDRESS === undefined || process.env.EMAIL_FROM_ADDRESS === null) {
Expand Down Expand Up @@ -174,7 +170,6 @@ if (process.env.DOCKERIZED === 'true') {
DROPBOX_CLIENT_SECRET = config.dropbox.client_secret;
GOOGLE_CLIENT_ID = config.google.client_id;
GOOGLE_CLIENT_SECRET = config.google.client_secret;
GOOGLE_CALLBACK_URL = config.google.callback_url;

lambdaHandler = new LambdaHelper(AWS_ACCESSKEY, AWS_ACCESSKEYSECRET);
batchHandler = new BatchHelper(AWS_ACCESSKEY, AWS_ACCESSKEYSECRET);
Expand Down
16 changes: 4 additions & 12 deletions www/columnHeaders.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"title",
"_source.body",
"_source.title",
"contents",
"snippet.title",
"snippet.description"
"contents"
],
"network": [
"user.screen_name",
Expand All @@ -25,9 +23,7 @@
"title",
"_source.body",
"_source.title",
"contents",
"snippet.title",
"snippet.description"
"contents"
],
"preprocess": [
"text",
Expand All @@ -37,9 +33,7 @@
"title",
"_source.body",
"_source.title",
"contents",
"snippet.title",
"snippet.description"
"contents"
],
"classification": [
"text",
Expand All @@ -49,8 +43,6 @@
"body",
"_source.body",
"_source.title",
"contents",
"snippet.title",
"snippet.description"
"contents"
]
}
4 changes: 2 additions & 2 deletions www/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smile_server",
"version": "0.3.3",
"version": "0.3.2",
"description": "",
"main": "app.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion www/public/bootstrap/css/customized/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ nav-tabs li a:hover{

.grid-element{
width:calc(31%);
height:400px;
height:350px;
float:left;
margin:8px 8px;
background-color:#f5f5f5;
Expand Down
Binary file removed www/public/bootstrap/img/logo/youtube-sm-logo.png
Binary file not shown.
6 changes: 0 additions & 6 deletions www/public/bootstrap/js/customized/history_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ $.getScript("bootstrap/js/customized/view_helperFunc.js", function(){
else if (key1 === 'reddit-Historical-Comment') {
var secondLevel = 'Reddit Historical Comment';
}
else if (key1 === 'userspec-Others') {
var secondLevel = 'User Imported Data';
}
else if (key1 === 'youtube-Search') {
var secondLevel = 'YouTube Search Results';
}
else if (key1 === 'networkx') {
var secondLevel = 'Python NetworkX';
}
Expand Down
26 changes: 10 additions & 16 deletions www/public/bootstrap/js/customized/query_auth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function authorize(platform){
// showing the check mark
$("#youtube-auth").find(".export-success").show();
$("#" + platform + "-auth").find('img').show();

// toggle the second auth panel
$("#unauthorized").find("." + platform + "-auth").hide();
Expand All @@ -20,26 +20,21 @@ function authorize(platform){
$("#social-media option[value='redditPost']").removeAttr('disabled');
$("#social-media option[value='redditComment']").removeAttr('disabled');
}
else if (platform === 'youtube') {
$("#social-media option[value='queryYoutube']").removeAttr('disabled');
}
}


$(document).ready(function () {
$.ajax({
type: 'get',
url: "authorized",
success: function(data) {
if ('ERROR' in data) {
type:'get',
url:"authorized",
success: function(data){
if ('ERROR' in data){
$("#error").val(JSON.stringify(data));
$("#warning").modal("show");
} else {
// Dynamically find authorization elements
$('[id$="-auth"]').each(function () {
var platformId = $(this).attr('id'); // e.g., "reddit-auth"
var platform = platformId.replace('-auth', ''); // Removes '-auth', leaves "reddit"

// Check if data contains the platform and if it is authorized
}
else{
var platforms = ['twitter', 'twitterV2', 'reddit'];
$.each(platforms, function (i, platform) {
if (data[platform]) {
authorize(platform);
}
Expand All @@ -49,7 +44,6 @@ $(document).ready(function () {
});
});


$("#auth-next").on("click", function () {
$("#auth-panel").hide();
$("#searchPage").show();
Expand Down
3 changes: 0 additions & 3 deletions www/public/bootstrap/js/customized/query_formValid.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ function formValid(searchID){
$("#alert").modal('show');
return false
}
}else if ($("#social-media option:selected").val() === 'queryYoutube'){
// TODO implement form check for advanced search
return true;
}
}

Expand Down
65 changes: 23 additions & 42 deletions www/public/bootstrap/js/customized/query_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ function init(){
rdComment:{},
rdPost:{},
psPost:{},
psComment:{},
youtubeSearch:{}
psComment:{}
};

// initialization
Expand Down Expand Up @@ -65,7 +64,7 @@ function init(){
// customize advance dropdown
$('#dropdownButton').on('click',function(){
if ($("#searchbox").val() !== '' && $("#searchbox").val() !== undefined){
if (queryTerm !== "queryTweetV2" && queryTerm !== "queryYoutube"){
if (queryTerm !== "queryTweetV2"){
$(this).parent().toggleClass('open');
if ($(this).parent().attr('class') === 'dropdown dropdown-lg open'){
// disable search and enable advanced search
Expand Down Expand Up @@ -140,7 +139,7 @@ function init(){
$("#input").val(`{\n\n` + Query +`\n\n}`);
}
else {
$("#modal-message").append(`<h4>We currently don't support advanced settings for this search function.</h4>`);
$("#modal-message").append(`<h4>We currently don't support advanced settings for search Twitter/X using V2 endpoints.</h4>`);
$("#alert").modal('show');
$("#searchbox").focus();
}
Expand Down Expand Up @@ -182,8 +181,7 @@ function init(){
$(".reddit-comment").hide();
$(".pushshift-post").hide();
$(".pushshift-comment").hide();
$(".youtube-search").hide();


$(".form-group.geocode").hide();
$(".form-group.dateRange").hide();
$(".form-group.rd-subreddit").hide();
Expand Down Expand Up @@ -258,19 +256,6 @@ function init(){
$("#searchbox").attr("placeholder","Keyword that you wish to search...");
$("boolean").tooltip('hide');
}
else if ( queryTerm === 'queryYoutube'){
$(".youtube-search").show();
$("#searchbox").attr("placeholder","Keywords for the Youtube content that you wish to search...");

// tooltip to show YouTube rules
$("boolean").attr('data-original-title',
"YouTube keyword search supports boolean NOT (-) and OR (|) operators to exclude videos or to find videos " +
"that are associated with one of several search terms. Details please refer to the&nbsp" +
"<a href='https://developers.google.com/youtube/v3/docs/search/list#parameters' target='_blank'>" +
"API documentations</a>")
.tooltip('fixTitle')
.tooltip('show');
}

Query = updateString(queryTerm,parameters);
$("#input").val(`{\n\n` + Query +`\n\n}`);
Expand Down Expand Up @@ -320,7 +305,8 @@ function init(){
$(".prompt-user").on("click", function(){
$("#searchbox").val($(this).find(".prompt-screen-name").text());

var keyword = $("#searchbox").val().replace(/[\"]+/g, `\\"`);
var keyword = $("#searchbox").val();
var keyword = keyword.replace(/[\"]+/g, `\\"`);
parameters['twtTimeline']['screen_name:'] = keyword;
parameters['tweet']['q:'] = keyword;
parameters['twtTimeline']['screen_name:'] = keyword;
Expand All @@ -347,8 +333,10 @@ function init(){
}
}

// escape double quotation mark
var keyword = $("#searchbox").val().replace(/[\"]+/g, `\\"`);
// escape doule quotation mark
var keyword = $("#searchbox").val();
var keyword = keyword.replace(/[\"]+/g, `\\"`);

parameters['tweet']['q:'] = keyword;
parameters['twtTimeline']['screen_name:'] = keyword;
parameters['tweetV2']['q:'] = keyword;
Expand All @@ -357,7 +345,6 @@ function init(){
parameters['rdComment']['subredditName:'] = keyword;
parameters['psPost']['q:'] = keyword;
parameters['psComment']['q:'] = keyword;
parameters['youtubeSearch']['q:'] = keyword;

Query =updateString(queryTerm,parameters);
$("#input").val(`{\n\n` + Query +`\n\n}`);
Expand Down Expand Up @@ -837,14 +824,14 @@ function init(){
$("#input").val(`{\n\n` + Query +`\n\n}`);

});

/*----------------------------------------------------- Youtube Search-------------------------------------------------------*/
// TODO implement advanced youtube search here


/*----------------------set intervals--------------------------------------------*/
$('input[name=histogram-interval]').change(function(){
setHitogramInterval($("input[name=histogram-interval]:checked").val());
});

/*---------------------- toggle css effect on dropdown----------------------*/

}

function epochTime(datestring){
Expand Down Expand Up @@ -878,7 +865,7 @@ function constructQuery(parameterObj){

}

function updateString(queryTerm, parameters){
function updateString(queryTerm,parameters){
var query = '';
if (queryTerm === 'getTimeline'){
query = `\ttwitter{\n\t\t` + queryTerm + `(` + constructQuery(parameters.twtTimeline) + `\n\t\t}\n\t}`;
Expand All @@ -904,9 +891,6 @@ function updateString(queryTerm, parameters){
else if (queryTerm === 'pushshiftComment'){
query = `\treddit{\n\t\tpushshiftComment(`+ constructQuery(parameters.psComment) + `\n\t\t}\n\t}`;
}
else if (queryTerm === 'youtubeSearch'){
query = `\tyoutube{\n\t\tsearch(${constructQuery(parameters.youtubeSearch)}\n\t\t}\n\t}`;
}

return query;
}
Expand Down Expand Up @@ -955,25 +939,22 @@ function setHitogramInterval(freq){
var filename = $("#sn-filename").val();

var queryTerm = $("#social-media").find(':selected').val();
var prefix ;
if (queryTerm === 'queryTweet'){
prefix = 'twitter-Tweet';
var prefix = 'twitter-Tweet';
}else if (queryTerm === 'queryTweetV2'){
prefix = 'twitterV2-Tweet';
var prefix = 'twitterV2-Tweet';
}else if (queryTerm === 'getTimeline'){
prefix = 'twitter-Timeline';
var prefix = 'twitter-Timeline';
}else if (queryTerm === 'queryReddit'){
prefix = 'reddit-Search';
var prefix = 'reddit-Search';
}else if (queryTerm === 'redditPost'){
prefix = 'reddit-Post';
var prefix = 'reddit-Post';
}else if (queryTerm === 'redditComment'){
prefix = 'reddit-Comment';
var prefix = 'reddit-Comment';
}else if (queryTerm === 'pushshiftPost'){
prefix = 'reddit-Historical-Post';
var prefix = 'reddit-Historical-Post';
}else if (queryTerm === 'pushshiftComment'){
prefix = 'reddit-Historical-Comment';
}else if (queryTerm === 'youtubeSearch'){
prefix = 'youtube-Search';
var prefix = 'reddit-Historical-Comment';
}

if (prefix === undefined || filename === '' || filename === undefined){
Expand Down
Loading
Loading