Commit 47420959 authored by Zac Wood's avatar Zac Wood
Browse files

Merge branch 'v2-ui' into 'dev-v2'

V2 ui

See merge request !25
parents 894575fb 9a163119
Pipeline #2947 passed with stage
in 2 minutes and 14 seconds
...@@ -2,38 +2,17 @@ stages: ...@@ -2,38 +2,17 @@ stages:
- test - test
- build - build
test_api: test:
image: ruby:2.5 image: ruby:2.5
stage: test stage: test
script: script:
- cd schedules_api - cd schedules
- bundle install - bundle install
- rails db:migrate - rails db:migrate
- rails test - rails test
- rubocop - rubocop
test_web: build:
image: node:9
stage: test
script:
- cd schedules_web
- yarn
- yarn build
build_web:
stage: build
retry: 2
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/schedules_web --dockerfile $CI_PROJECT_DIR/schedules_web/Dockerfile --destination $CI_REGISTRY_IMAGE/web:$CI_COMMIT_TAG
only:
- tags
build_api:
stage: build stage: build
retry: 2 retry: 2
image: image:
...@@ -42,6 +21,6 @@ build_api: ...@@ -42,6 +21,6 @@ build_api:
script: script:
- mkdir -p /root/.docker - mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/schedules_api --dockerfile $CI_PROJECT_DIR/schedules_api/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG - /kaniko/executor --context $CI_PROJECT_DIR/schedules --dockerfile $CI_PROJECT_DIR/schedules/Dockerfile --destination $CI_REGISTRY_IMAGE/api:$CI_COMMIT_TAG
only: only:
- tags - tags
...@@ -70,3 +70,7 @@ gem 'apipie-rails' ...@@ -70,3 +70,7 @@ gem 'apipie-rails'
# Markdown for API docs # Markdown for API docs
gem 'maruku' gem 'maruku'
# gem 'jquery-rails'
# gem 'font-awesome-sass', '~> 5.3.1'
class SectionCard {
constructor(section) {
this._html = `
<li id="section-${section.crn}" class="list-group-item schedule-section-card" onclick="removeFromSchedule(this)">
<span style="float:left"><b class="subj">${section.name}</b>: ${section.title}</span>
<span style="float:right"><i class="fas fa-map-marker-alt"></i> ${section.location} </span>
<div style="clear: both"></div>
<span style="float:left"><i class="fas fa-chalkboard-teacher"></i> TODO </span>
<span style="float:right"><i class="fas fa-clock"></i> ${section.days}, ${section.start_time}-${section.end_time} </span>
<div style="clear: both"></div>
</li>`;
}
}
...@@ -12,4 +12,13 @@ ...@@ -12,4 +12,13 @@
// //
//= require rails-ujs //= require rails-ujs
//= require turbolinks //= require turbolinks
//= require FileSaver
//= require_tree . //= require_tree .
// require jquery3
// require popper
// require bootstrap-sprockets
const elementFromString = string => {
const html = new DOMParser().parseFromString(string, 'text/html');
return html.body.firstChild;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment