Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cn-uat' into uat
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Apr 19, 2024
2 parents b4866a8 + dc06626 commit f9776bf
Show file tree
Hide file tree
Showing 26 changed files with 4,916 additions and 9,711 deletions.
13,734 changes: 4,495 additions & 9,239 deletions client/package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"build": "export NODE_ENV=production && webpack --progress --profile --colors"
},
"dependencies": {
"firebase": "9.6.11",
"newsroom-core": "github:superdesk/newsroom-core#hotfix/2.5.1"
"newsroom-core": "github:superdesk/newsroom-core#v2.6.2"
},
"devDependencies": {
"babel-plugin-transform-object-rest-spread": "^6.26.0",
Expand Down
23 changes: 0 additions & 23 deletions client/src/auth.js

This file was deleted.

57 changes: 0 additions & 57 deletions client/src/login.js

This file was deleted.

42 changes: 0 additions & 42 deletions client/src/reset-password.js

This file was deleted.

8 changes: 1 addition & 7 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
const path = require('path');
const config = require('newsroom-core/webpack.config');

config.entry.login = path.resolve(__dirname, 'src', 'login.js');
config.entry.reset_password = path.resolve(__dirname, 'src', 'reset-password.js');

module.exports = config;
module.exports = require('newsroom-core/webpack.config')
107 changes: 0 additions & 107 deletions server/cp/auth.py

This file was deleted.

2 changes: 2 additions & 0 deletions server/cp/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import fix_language # noqa
from . import fix_mediaformat # noqa
35 changes: 35 additions & 0 deletions server/cp/commands/fix_mediaformat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import time

from superdesk import get_resource_service
from cp.signals import get_media_type_name, get_media_type_scheme
from newsroom.commands.manager import manager


@manager.command
def fix_mediaformat(resource="items", limit=500, sleep_secs=2):
service = get_resource_service(resource)
media_type_scheme = get_media_type_scheme()
source = {
"query": {
"bool": {"must_not": {"term": {"subject.scheme": media_type_scheme}}}
},
"size": 100,
}
for i in range(int(limit)):
items = service.search(source)
if not items.count():
break
for item in items:
updates = {"subject": item["subject"].copy() if item.get("subject") else []}
updates["subject"].append(
dict(
code="wiretext",
name=get_media_type_name("wiretext", item.get("language")),
scheme=media_type_scheme,
)
)

service.system_update(item["_id"], updates, item)
print(".", end="", flush=True)
time.sleep(int(sleep_secs))
print("done.")
6 changes: 3 additions & 3 deletions server/cp/common_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

AUTH_PROVIDERS.extend([{
"_id": "gip",
"name": lazy_gettext("Google"),
"auth_type": AuthProviderType.GOOGLE_OAUTH.value,
"name": lazy_gettext("Firebase"),
"auth_type": AuthProviderType.FIREBASE,
}, {
"_id": "azure",
"name": lazy_gettext("Azure"),
"auth_type": AuthProviderType.SAML.value,
"auth_type": AuthProviderType.SAML,
}])
2 changes: 2 additions & 0 deletions server/cp/mgmt_api/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@
CACHE_DEFAULT_TIMEOUT = 3600
# Redis host (used only if CACHE_TYPE is redis)
CACHE_REDIS_URL = os.environ.get('REDIS_URL', 'redis://localhost:6379')
# fix superdesk cache config
CACHE_URL = CACHE_REDIS_URL

APM_SERVICE_NAME = "CP NewsPro Management API"
Loading

0 comments on commit f9776bf

Please sign in to comment.