This file contains hidden or 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
import { sandboxOf } from 'angular-playground'; | |
import { YourComponent } from './your.component'; | |
import { SharedModule } from '../../shared/shared.module'; | |
const sandboxConfig = { | |
imports: [SharedModule], | |
label: 'Label for below collection of component views' | |
} | |
export default sandboxOf(YourComponent, sandboxConfig) | |
.add('with no questions', { |
This file contains hidden or 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
import { sandboxOf } from 'angular-playground'; | |
import { QuestionListComponent } from './question-list.component'; | |
import { SharedModule } from '../../shared/shared.module'; | |
import { QuestionViewSmallComponent } from '../question-view-small/question-view-small.component'; | |
const sandboxConfig = { | |
imports: [SharedModule], | |
declarations: [QuestionViewSmallComponent], | |
label: 'QuestionList' | |
} |
This file contains hidden or 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
#--------------------------------------------------------- | |
# Superset specific config | |
#--------------------------------------------------------- | |
ROW_LIMIT = 5000 | |
SUPERSET_WEBSERVER_PORT = 8088 | |
#--------------------------------------------------------- | |
#--------------------------------------------------------- | |
# Flask App Builder configuration |
This file contains hidden or 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
from flask import redirect, g, flash, request | |
from flask_appbuilder.security.views import UserDBModelView,AuthDBView | |
from superset.security import SupersetSecurityManager | |
from flask_appbuilder.security.views import expose | |
from flask_appbuilder.security.manager import BaseSecurityManager | |
from flask_login import login_user, logout_user | |
class CustomAuthDBView(AuthDBView): | |
login_template = 'appbuilder/general/security/login_db.html' |
This file contains hidden or 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
import { KeycloakConfig } from 'keycloak-angular'; | |
// Add here your keycloak setup infos | |
let keycloakConfig: KeycloakConfig = { | |
url: 'http://KEYCLOAK-IP:8088/auth', | |
realm: 'your-realm-name', | |
clientId: 'your-client-id', | |
"credentials": { | |
"secret": "your-client-secret" | |
} |
This file contains hidden or 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
import { NgModule } from '@angular/core'; | |
import { Routes, RouterModule, PreloadAllModules } from '@angular/router'; | |
import { AppAuthGuard } from './app.authguard'; | |
... | |
const appRoutes: Routes = [ | |
{ | |
path: 'some-path-only-super-user-can-access', | |
loadChildren: () => SomeModule , | |
canActivate: [AppAuthGuard], |
This file contains hidden or 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
import { Injectable } from '@angular/core'; | |
import { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; | |
import { KeycloakService, KeycloakAuthGuard } from 'keycloak-angular'; | |
@Injectable() | |
export class AppAuthGuard extends KeycloakAuthGuard { | |
constructor(protected router: Router, protected keycloakAngular: KeycloakService) { | |
super(router, keycloakAngular); | |
} |
This file contains hidden or 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
import { Component, OnInit } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { KeycloakService } from 'keycloak-angular'; | |
@Component({ | |
.... | |
}) | |
export class SomeComponent implements OnInit { | |
constructor(protected router: Router, |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2017 Marcos Pereira <[email protected]> | |
# Modified by Sairam Krish <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |