示例#1
0
def permalink_salt() -> Iterator[str]:
    from superset.key_value.shared_entries import get_permalink_salt, get_uuid_namespace
    from superset.key_value.types import SharedKey

    key = SharedKey.EXPLORE_PERMALINK_SALT
    salt = get_permalink_salt(key)
    yield salt
    namespace = get_uuid_namespace(salt)
    db.session.query(KeyValueEntry).filter_by(
        resource=KeyValueResource.APP,
        uuid=uuid3(namespace, key),
    )
    db.session.commit()
示例#2
0
 def salt(self) -> str:
     return get_permalink_salt(SharedKey.EXPLORE_PERMALINK_SALT)
示例#3
0
 def salt(self) -> str:
     return get_permalink_salt(SharedKey.DASHBOARD_PERMALINK_SALT)