-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working locally now. Will deploy and see what breaks.
- Loading branch information
Showing
69 changed files
with
5,528 additions
and
1,285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
# Using dotenv-rails to set development environment variables | ||
# Example use below: | ||
SOLR_VERSION = 6.2.1 | ||
SOLR_URL: http://127.0.0.1:8983/solr/geoportal-core-development | ||
GEOBLACKLIGHT_DB_HOST=localhost | ||
GEOBLACKLIGHT_DB_DATABASE=geoportal_admin | ||
GEOBLACKLIGHT_DB_USER= | ||
GEOBLACKLIGHT_DB_PASSWORD= | ||
|
||
SOLR_VERSION=8.11.1 | ||
|
||
# Solr - Local development | ||
SOLR_URL=http://127.0.0.1:8983/solr/blacklight-core | ||
|
||
# Solr - Remote development | ||
# SOLR_URL=https://remote_server/solr/core | ||
# SOLR_BASIC_AUTH_USER=user | ||
# SOLR_BASIC_AUTH_PASSWORD=password | ||
|
||
# BL API | ||
BLACKLIGHT_URL=/ | ||
BLACKLIGHT_JSON_API=/admin/api.json | ||
BLACKLIGHT_JSON_API_IDS=/admin/api/ids.json | ||
BLACKLIGHT_JSON_API_FACETS=/admin/advanced_search/facets.json | ||
|
||
# BL IDS | ||
BLACKLIGHT_JSON_IDS=/admin/ids.json | ||
|
||
GEOMG_DB_DATABASE=geoblacklight_development | ||
GEOMG_DB_USER= | ||
GEOMG_DB_PASSWORD= | ||
|
||
GEOMG_DEVISE_SECRET_KEY=generated-by-rake-secret | ||
|
||
# Blazer | ||
BLAZER_UPLOADS_URL=postgresql://127.0.0.1:5432/geoblacklight_development | ||
MAPBOX_ACCESS_TOKEN=your-key-here | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
validate: false | ||
instance_dir: tmp/solr | ||
download_dir: tmp/solr | ||
collection: | ||
dir: solr/conf/ | ||
name: blacklight-core | ||
persist: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,6 @@ | |
//= require js-cookie/src/js.cookie.js | ||
|
||
//= require geoportal | ||
|
||
// Required by GBL Admin | ||
//= require activestorage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
# Connect! | ||
class Connection < ActionCable::Connection::Base | ||
identified_by :current_user | ||
|
||
def connect | ||
self.current_user = find_verified_user | ||
end | ||
|
||
private | ||
|
||
# check for authenticated user via devise | ||
def find_verified_user | ||
if verified_user = env['warden'].user | ||
verified_user | ||
else | ||
reject_unauthorized_connection | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
# ExportChannel | ||
class ExportChannel < ApplicationCable::Channel | ||
def subscribed | ||
stream_from 'export_channel' | ||
end | ||
|
||
def unsubscribed | ||
# Any cleanup needed when channel is unsubscribed | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Action Cable provides the framework to deal with WebSockets in Rails. | ||
// You can generate new channels where WebSocket features live using the `bin/rails generate channel` command. | ||
|
||
import { createConsumer } from "@rails/actioncable" | ||
|
||
export default createConsumer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import consumer from "./consumer" | ||
|
||
consumer.subscriptions.create({ channel: "ExportChannel" }, { | ||
connected() { | ||
// Called when the subscription is ready for use on the server | ||
console.log('Export Channel Connected'); | ||
}, | ||
|
||
disconnected() { | ||
// Called when the subscription has been terminated by the server | ||
console.log('Export Channel Disconnected'); | ||
}, | ||
|
||
received(data) { | ||
console.log('Export Channel Received'); | ||
console.log(data); | ||
|
||
if (data['progress']) { | ||
console.log(data['progress']); | ||
} | ||
|
||
if (data['actions']) { | ||
for (let index = 0; index < data.actions.length; ++index) { | ||
var fnstring = data.actions[index].method; | ||
var fn = window["GBLADMIN"][fnstring]; | ||
if (typeof fn === "function") fn(data.actions[index].payload); | ||
} | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Load all the channels within this directory and all subdirectories. | ||
// Channel files must be named *_channel.js. | ||
|
||
const channels = require.context('.', true, /_channel\.js$/) | ||
channels.keys().forEach(channels) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Controller } from 'stimulus' | ||
|
||
/* This is your application's ApplicationController. | ||
* All StimulusReflex controllers should inherit from this class. | ||
* | ||
* Example: | ||
* | ||
* import ApplicationController from './application_controller' | ||
* | ||
* export default class extends ApplicationController { ... } | ||
* | ||
* Learn more at: https://docs.stimulusreflex.com | ||
*/ | ||
|
||
// Adding a comment here | ||
export default class extends Controller { | ||
connect () { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Visit The Stimulus Handbook for more details | ||
// https://stimulusjs.org/handbook/introduction | ||
// | ||
// This example controller works with specially annotated HTML like: | ||
// | ||
// <div data-controller="results"> | ||
// <h1 data-target="results.selectAll"></h1> | ||
// </div> | ||
|
||
import { Application } from "stimulus" | ||
import ScrollTo from "stimulus-scroll-to" | ||
|
||
export default class extends ScrollTo { | ||
connect() { | ||
} | ||
|
||
// You can set default options in this getter for all your anchors. | ||
get defaultOptions () { | ||
return { | ||
behavior: 'smooth' | ||
} | ||
} | ||
} | ||
|
||
const application = Application.start() | ||
application.register("scroll-to", ScrollTo) |
Oops, something went wrong.