Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cloudera/hue into feat/storage-br…
Browse files Browse the repository at this point in the history
…owser-16
  • Loading branch information
ramprasadagarwal committed Jan 30, 2025
2 parents bb5f10e + 93f0ebd commit 4f2b360
Show file tree
Hide file tree
Showing 71 changed files with 1,486 additions and 364 deletions.
18 changes: 18 additions & 0 deletions apps/beeswax/src/beeswax/migrations/0004_alter_compute_is_ready.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2025-01-09 11:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('beeswax', '0003_compute_namespace'),
]

operations = [
migrations.AlterField(
model_name='compute',
name='is_ready',
field=models.BooleanField(default=True, null=True),
),
]
2 changes: 1 addition & 1 deletion apps/beeswax/src/beeswax/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ class Compute(models.Model):
default='sqlalchemy'
)
namespace = models.ForeignKey(Namespace, on_delete=models.CASCADE, null=True)
is_ready = models.BooleanField(default=True)
is_ready = models.BooleanField(default=True, null=True)
external_id = models.CharField(max_length=255, null=True, db_index=True)
ldap_groups_json = models.TextField(default='[]')
settings = models.TextField(default='{}')
Expand Down
2 changes: 1 addition & 1 deletion apps/filebrowser/src/filebrowser/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def chown(request):
path = request.POST.get('path')
user = request.POST.get("user")
group = request.POST.get("group")
recursive = request.POST.get('recursive', False)
recursive = coerce_bool(request.POST.get('recursive', False))

# TODO: Check if we need to explicitly handle encoding anywhere
request.fs.chown(path, user, group, recursive=recursive)
Expand Down
7 changes: 7 additions & 0 deletions apps/oozie/src/oozie/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
),
)

OOZIE_HS2_JDBC_URL = Config(
key="oozie_hs2_jdbc_url",
help="The JDBC URL for HiveServer2 action",
type=str,
default=""
)


def get_oozie_job_count():
'''Returns the maximum of jobs fetched by the API depending on the Hue version'''
Expand Down
4 changes: 2 additions & 2 deletions apps/oozie/src/oozie/models2.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from liboozie.oozie_api import get_oozie
from liboozie.submission2 import Submission, create_directories
from notebook.models import Notebook
from oozie.conf import REMOTE_SAMPLE_DIR
from oozie.conf import OOZIE_HS2_JDBC_URL, REMOTE_SAMPLE_DIR
from oozie.importlib.workflows import InvalidTagWithNamespaceException, MalformedWfDefException, generate_v2_graph_nodes
from oozie.utils import UTC_TIME_FORMAT, convert_to_server_timezone, utc_datetime_format

Expand Down Expand Up @@ -830,7 +830,7 @@ def to_xml(self, mapping=None, node_mapping=None, workflow_mapping=None):
workflow_mapping = {}

if self.data['type'] in ('hive2', 'hive-document') and not self.data['properties']['jdbc_url']:
self.data['properties']['jdbc_url'] = _get_hiveserver2_url()
self.data['properties']['jdbc_url'] = OOZIE_HS2_JDBC_URL.get() if OOZIE_HS2_JDBC_URL.get() else _get_hiveserver2_url()

if self.data['type'] == 'fork':
links = [link for link in self.data['children'] if link['to'] in node_mapping]
Expand Down
3 changes: 3 additions & 0 deletions desktop/conf.dist/hue.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1689,6 +1689,9 @@ submit_to=True
# Parameters are $TIME and $USER, e.g. /user/$USER/hue/workspaces/workflow-$TIME
## remote_data_dir=/user/hue/oozie/workspaces

# JDBC URL for Hive2 action
## oozie_hs2_jdbc_url=jdbc:hive2://localhost:10000/default

# Maximum of Oozie workflows or coodinators to retrieve in one API call.
## oozie_jobs_count=100

Expand Down
3 changes: 3 additions & 0 deletions desktop/conf/pseudo-distributed.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,9 @@
# Parameters are $TIME and $USER, e.g. /user/$USER/hue/workspaces/workflow-$TIME
## remote_data_dir=/user/hue/oozie/workspaces

# JDBC URL for Hive2 action
## oozie_hs2_jdbc_url=jdbc:hive2://localhost:10000/default

# Maximum of Oozie workflows or coodinators to retrieve in one API call.
## oozie_jobs_count=100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def login(request,
saml_request = base64.b64encode(binary_type(request_xml))

http_response = render(request, post_binding_form_template, {
'request': request,
'target_url': location,
'params': {
'SAMLRequest': saml_request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Ace } from '../../../../../ext/ace';

import { CURSOR_POSITION_CHANGED_EVENT } from '../../aceEditor/AceLocationHandler';
import ReactExampleGlobal from '../../../../../reactComponents/ReactExampleGlobal/ReactExampleGlobal';
import { useHuePubSub } from '../../../../../utils/hooks/useHuePubSub';
import { useHuePubSub } from '../../../../../utils/hooks/useHuePubSub/useHuePubSub';
import SqlExecutable from '../../../execution/sqlExecutable';

import './ReactExample.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import FileIcon from '@cloudera/cuix-core/icons/react/DocumentationIcon';

import { i18nReact } from '../../../utils/i18nReact';
import useDebounce from '../../../utils/useDebounce';
import useLoadData from '../../../utils/hooks/useLoadData';
import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';

import { BrowserViewType, ListDirectory } from '../../../reactComponents/FileChooser/types';
import { LIST_DIRECTORY_API_URL } from '../../../reactComponents/FileChooser/api';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import StorageBrowserTab from './StorageBrowserTab/StorageBrowserTab';
import { ApiFileSystem, FILESYSTEMS_API_URL } from '../../reactComponents/FileChooser/api';

import './StorageBrowserPage.scss';
import useLoadData from '../../utils/hooks/useLoadData';
import useLoadData from '../../utils/hooks/useLoadData/useLoadData';
import LoadingErrorWrapper from '../../reactComponents/LoadingErrorWrapper/LoadingErrorWrapper';

const StorageBrowserPage = (): JSX.Element => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import PathBrowser from '../../../reactComponents/PathBrowser/PathBrowser';
import StorageDirectoryPage from '../StorageDirectoryPage/StorageDirectoryPage';
import { FILE_STATS_API_URL } from '../../../reactComponents/FileChooser/api';
import { BrowserViewType, FileStats } from '../../../reactComponents/FileChooser/types';
import useLoadData from '../../../utils/hooks/useLoadData';
import useLoadData from '../../../utils/hooks/useLoadData/useLoadData';

import './StorageBrowserTab.scss';
import StorageFilePage from '../StorageFilePage/StorageFilePage';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '../../../../reactComponents/FileChooser/api';

const mockSave = jest.fn();
jest.mock('../../../../utils/hooks/useSaveData', () => ({
jest.mock('../../../../utils/hooks/useSaveData/useSaveData', () => ({
__esModule: true,
default: jest.fn(() => ({
save: mockSave
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
CREATE_FILE_API_URL
} from '../../../../reactComponents/FileChooser/api';
import { FileStats } from '../../../../reactComponents/FileChooser/types';
import useSaveData from '../../../../utils/hooks/useSaveData';
import useSaveData from '../../../../utils/hooks/useSaveData/useSaveData';
import InputModal from '../../InputModal/InputModal';
import './CreateAndUploadAction.scss';
import DragAndDrop from '../../../../reactComponents/DragAndDrop/DragAndDrop';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Licensed to Cloudera, Inc. under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. Cloudera, Inc. licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@use 'variables' as vars;

.antd.cuix {
.hue-change-owner-group {
display: flex;
flex-direction: column;
flex: 1;
gap: 8px;

&__header-note {
padding: 8px;
background-color: vars.$fluidx-gray-200;
margin-bottom: 8px;
}

&__form {
display: flex;
flex-direction: column;
flex: 1;
gap: 16px;
}

&__entity {
display: flex;
flex-direction: column;
}

&__dropdown {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 8px;
}

&__checkbox {
display: flex;
gap: 8px;
}

&__label {
color: vars.$fluidx-gray-700;
}
}
}
Loading

0 comments on commit 4f2b360

Please sign in to comment.