Skip to content

Commit

Permalink
Merge pull request #2 from redbox-mint/develop
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
shilob authored Dec 5, 2024
2 parents 532db0f + 529b4e2 commit e3a0a78
Show file tree
Hide file tree
Showing 83 changed files with 9,629 additions and 17,818 deletions.
106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 2.1
jobs:
build_and_publish:
docker:
- image: cimg/node:20.9.0
working_directory: ~/repo
steps:
- checkout
- run:
command: |
set +e
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- run: export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install && npm install && node_modules/.bin/tsc
- run: chmod +x support/build/compileAngularLegacy.sh && support/build/compileAngularLegacy.sh gitlab
# run tests!
# - run: npm test
# # store test results
# - store_test_results:
# path: test_results

# store code coverage
# - persist_to_workspace:
# root: ~/repo
# paths: .
- run:
name: Authenticate with NPM
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish --access public
build_only:
docker:
- image: cimg/node:20.9.0
working_directory: ~/repo
steps:
- checkout
- run:
command: |
set +e
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- run: export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install && npm install && node_modules/.bin/tsc
- run: chmod +x support/build/compileAngularLegacy.sh && support/build/compileAngularLegacy.sh gitlab
# run tests!
# - run: npm test
# # store test results
# - store_test_results:
# path: test_results

# store code coverage
# - persist_to_workspace:
# root: ~/repo
# paths: .


workflows:
publish:
jobs:
- build_and_publish:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
build:
jobs:
- build_only:
filters:
tags:
ignore: /.*/
branches:
only: /.*/
# jobs:
# build:
# docker:
# - image: "cimg/base:stable"
# - checkout
# - node/install:
# node-version: 12.16.0
# - run: npm install --production
# - run: node_modules/.bin/tsc
# - persist_to_workspace:
# root: .
# paths:
# - .
# test:
# machine: true
# steps:
# - docker/install-docker-compose
# - attach_workspace:
# at: /home/circleci/project
# - run: export NVM_DIR=/opt/circleci/.nvm && source /opt/circleci/.nvm/nvm.sh && nvm install 12.16.0 && nvm use 12.16.0
# - run: export NVM_DIR=/opt/circleci/.nvm && source /opt/circleci/.nvm/nvm.sh && nvm use 12.16.0 && node_modules/.bin/tsc -p tsconfig-codecov.json
# - run: (cd support/integration-testing && docker-compose -f docker-compose.newman.yml up --abort-on-container-exit --exit-code-from redboxportal && docker-compose -f docker-compose.mocha.yml up --abort-on-container-exit --exit-code-from redboxportal)
# - run: export NVM_DIR=/opt/circleci/.nvm && source /opt/circleci/.nvm/nvm.sh && nvm use 12.16.0 && npm i -g codecov && codecov -t $CODECOV_TOKEN
# - run: export NVM_DIR=/opt/circleci/.nvm && source /opt/circleci/.nvm/nvm.sh && nvm use 12.16.0 && node_modules/.bin/tsc
#
# orbs:
# node: circleci/node@4.0.0
# docker: circleci/docker@1.4.0
# version: 2.1
# workflows:
#
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules
redbox-portal

# IDEs and editors
/.idea
.idea
.project
.classpath
.c9/
Expand Down Expand Up @@ -45,4 +45,12 @@ e2e/*.map
Thumbs.db

test/angular

api/*

angular-legacy/shared
assets/angular
assets/default/default/images/leaflet
angular-legacy/assets
angular-legacy/gitlab/shared
angular-legacy/gitlab/app/shared
dist/
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.circleci
support
test
.editorconfig
.gitignore
angular-legacy
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.9.0
2 changes: 0 additions & 2 deletions .snapshotBranchGitIgnore

This file was deleted.

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "gitlab"
"name": "angular"
},
"apps": [
{
"name": "gitlab",
"root": "src",
"outDir": "dist",
"root": "gitlab",
"outDir": "../assets/angular/gitlab",
"assets": [
"assets",
"favicon.ico"
Expand All @@ -20,17 +20,17 @@
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
"styles.scss"
],
"scripts": [
"../node_modules/jquery/dist/jquery.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}

],
"e2e": {
"protractor": {
Expand Down
1 change: 1 addition & 0 deletions angular-legacy/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.19.0
5 changes: 3 additions & 2 deletions app/gitlab/README.md → angular-legacy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gitlab
# Angular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.4.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.7.

## Development server

Expand All @@ -21,6 +21,7 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Further help

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Input, Output, Component, OnInit, Inject, Injector, ElementRef, ViewChild, EventEmitter } from '@angular/core';
import { SimpleComponent } from '../shared/form/field-simple.component';
import { FieldBase } from '../shared/form/field-base';
import { SimpleComponent } from '../../../shared/form/field-simple.component';
import { FieldBase } from '../../../shared/form/field-base';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import * as _ from "lodash-es";
import * as _ from "lodash";

import { GitlabService } from '../gitlab.service';
import { Creation, CreationAlert, Template, Checks, CurrentWorkspace, Group, WorkspaceUser } from './shared';
Expand Down Expand Up @@ -136,7 +136,8 @@ export class CreateWorkspaceField extends FieldBase<any> {
this.creation.group = this.groups[0];
this.templates = [{pathWithNamespace: undefined}];
this.creation.template = this.templates[0];
jQuery('#createModal').modal({show: true, keyboard: false});
jQuery('#createModal').modal({ keyboard: false});
jQuery('#createModal').modal('show');
this.gitlabService.groups()
.then(response => {
this.groups = this.groups.concat(response);
Expand Down Expand Up @@ -204,8 +205,9 @@ export class CreateWorkspaceField extends FieldBase<any> {
pathWithNamespace: `${this.creation.namespace.path}/${this.creation.name}`,
currentWorkspace: this.creation, recordMap: this.recordMap})
.then(response => {
// raw response from an `updateRecordMeta` api call
if(!response.status) {
throw new Error(response.message.description);
throw new Error(response.message);
}
this.creationAlert.set({message: this.workspaceCreated, status: 'done', className: 'success'});
this.listWorkspaces.emit();
Expand Down Expand Up @@ -242,8 +244,9 @@ export class CreateWorkspaceField extends FieldBase<any> {
currentWorkspace: this.creation, recordMap: this.recordMap
})
.then(response => {
if(!response.status){
throw new Error(response.message.description);
// raw response from an `updateRecordMeta` api call
if(!response.success) {
throw new Error(response.message);
} else {
this.creationAlert.set({message: this.workspaceCreated, status: 'done', className: 'success'});
this.listWorkspaces.emit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4>{{ field.selectTemplate }}</h4>
<span *ngIf="field.creationAlert.status !== ('working' || 'done'); then buttonsCreate else buttonsBlocked;"></span>
<ng-template #buttonsCreate>
<button *ngIf="field.creationAlert.status !== 'done'" class="btn btn-primary" (click)="field.create()" type="submit">{{ field.createLabel }}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ field.dismissLabel }}</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ field.dismissLabel }}</button>
</ng-template>
<ng-template #buttonsBlocked>
<button disabled class="btn btn-primary disabled" type="submit">{{ field.createLabel }}</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Output, Component, OnInit, Inject, Injector, EventEmitter } from '@angular/core';
import { SimpleComponent } from '../shared/form/field-simple.component';
import { FieldBase } from '../shared/form/field-base';
import { SimpleComponent } from '../../../shared/form/field-simple.component';
import { FieldBase } from '../../../shared/form/field-base';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import * as _ from "lodash-es";
import * as _ from "lodash";

import { Checks, CurrentWorkspace } from './shared';
import { GitlabService } from '../gitlab.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Input, Output, Component, OnInit, Inject, Injector, EventEmitter} from '@angular/core';
import {SimpleComponent} from '../shared/form/field-simple.component';
import {FieldBase} from '../shared/form/field-base';
import {SimpleComponent} from '../../../shared/form/field-simple.component';
import {FieldBase} from '../../../shared/form/field-base';
import {FormGroup, FormControl, Validators} from '@angular/forms';
import {PaginationModule} from 'ngx-bootstrap';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Output, EventEmitter, Component, OnInit, Inject, Injector} from '@angular/core';
import {FormGroup, FormControl, Validators} from '@angular/forms';
import {SimpleComponent} from '../shared/form/field-simple.component';
import {FieldBase} from '../shared/form/field-base';
import * as _ from "lodash-es";
import {SimpleComponent} from '../../../shared/form/field-simple.component';
import {FieldBase} from '../../../shared/form/field-base';
import * as _ from "lodash";

declare var jQuery: any;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Input, Output, Component, OnInit, Inject, Injector, EventEmitter } from '@angular/core';
import { SimpleComponent } from '../shared/form/field-simple.component';
import { FieldBase } from '../shared/form/field-base';
import { SimpleComponent } from '../../../shared/form/field-simple.component';
import { FieldBase } from '../../../shared/form/field-base';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import * as _ from "lodash-es";
import * as _ from "lodash";

import { GitlabService } from '../gitlab.service';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Component, Inject, Input, ElementRef, Output, EventEmitter } from '@angular/core';
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { FormGroup, FormControl, Validators, NgForm } from '@angular/forms';
import { RecordsService } from './shared/form/records.service';
import { RecordsService } from '../../shared/form/records.service';
import { GitlabService } from './gitlab.service';
import { LoadableComponent } from './shared/loadable.component';
import { FieldControlService } from './shared/form/field-control.service';
import { LoadableComponent } from '../../shared/loadable.component';
import { FieldControlService } from '../../shared/form/field-control.service';
import { Observable } from 'rxjs/Observable';
import * as _ from "lodash-es";
import { TranslationService } from './shared/translation-service';
import * as _ from "lodash";
import { TranslationService } from '../../shared/translation-service';

import { ListWorkspaceDataField, ListWorkspaceDataComponent } from './components/list-workspaces.component';
import { LoginWorkspaceAppField, LoginWorkspaceAppComponent } from './components/login-workspaceapp.component';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ReactiveFormsModule, FormsModule} from "@angular/forms";
import { HttpModule } from '@angular/http';
import { GitlabFormComponent } from './gitlab-form.component';
import { GitlabService } from './gitlab.service';
import { SharedModule } from './shared/shared.module';
import { SharedModule } from '../../shared/shared.module';
import { PaginationModule } from 'ngx-bootstrap/pagination';

import { LoginWorkspaceAppComponent } from './components/login-workspaceapp.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'rxjs/add/operator/toPromise';
import 'rxjs/add/operator/delay';
import {Observable} from 'rxjs/Observable';

import {BaseService} from "./shared/base-service";
import {ConfigService} from "./shared/config-service";
import {BaseService} from "../../shared/base-service";
import {ConfigService} from "../../shared/config-service";

@Injectable()
export class GitlabService extends BaseService {
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion app/gitlab/src/main.ts → angular-legacy/gitlab/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { GitlabModule } from './app/gitlab.module';

import { environment } from './environments/environment';
import { GitlabModule } from './app/gitlab.module';

if (environment.production) {
enableProdMode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ import 'core-js/es7/reflect';
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
//(window as any).__Zone_enable_cross_context_check = true;
if (document['documentMode'] || /Edge/.test(navigator.userAgent)) {
(window as any).__Zone_enable_cross_context_check = true;
}


/***************************************************************************************************
* Zone JS is required by Angular itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/* You can add global styles to this file, and also import other style files */

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/gitlab/karma.conf.js → angular-legacy/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
// https://karma-runner.github.io/0.13/config/configuration-file.html

module.exports = function (config) {
config.set({
Expand Down
Loading

0 comments on commit e3a0a78

Please sign in to comment.